|
NAG[g05fec] NAG[nag_random_beta] - Pseudo-random real numbers from the beta distribution
|
|
Calling Sequence
g05fec(a, b, x, 'n'=n, 'fail'=fail)
nag_random_beta(. . .)
Parameters
|
a - float;
|
|
|
On entry: the argument, , of the beta distribution.
|
|
Constraint: . .
|
|
|
b - float;
|
|
|
On entry: the argument, , of the beta distribution.
|
|
Constraint: . .
|
|
|
x - Vector(1..n, datatype=float[8]);
|
|
|
On exit: the pseudo-random variates from the specified beta distribution.
|
|
|
'n'=n - integer; (optional)
|
|
|
Default value: the first dimension of the array x.
|
|
On entry: the number, , of pseudo-random numbers to be generated
|
|
Constraint: . .
|
|
|
'fail'=fail - table; (optional)
|
|
|
The NAG error argument, see the documentation for NagError.
|
|
|
|
Description
|
|
|
Purpose
|
|
nag_random_beta (g05fec) generates a vector of pseudo-random variates from a beta distribution with arguments and .
|
|
Error Indicators and Warnings
|
|
"NE_INT_ARG_LE"
On entry, n must not be less than or equal to 0: .
"NE_REAL_ARG_LE"
On entry, a must not be less than or equal to 0.0: .
|
|
|
Examples
|
|
>
|
a := 2:
b := 2:
n := 5:
x := Vector(5, datatype=float[8]):
NAG:-g05cbc(0):
NAG:-g05fec(a, b, x, 'n' = n):
|
|
|
See Also
|
|
Atkinson A C (1979) A family of switching algorithms for the computer generation of beta random variates Biometrika 66 141–5
Cheng R C H (1978) Generating beta variates with nonintegral shape parameters Comm. ACM 21 317–322
Dagpunar J (1988) Principles of Random Variate Generation Oxford University Press
Hastings N A J and Peacock J B (1975) Statistical Distributions Butterworths
g05 Chapter Introduction.
NAG Toolbox Overview.
NAG Web Site.
|
|