draw.noncentral.t {UnivRNG} | R Documentation |
This function implements pseudo-random number generation for a non-central t
distribution
\frac{Y}{\sqrt{U/\nu}}
where U
is a central chi-square random variable with \nu
degrees of freedom and Y
is an independent, normally distributed random variable with variance 1 and mean \lambda
.
draw.noncentral.t(nrep,nu,lambda)
nrep |
Number of data points to generate. |
nu |
Degrees of freedom of the desired non-central t distribution. |
lambda |
Non-centrality parameter of the desired non-central t distribution. |
A list of length five containing generated data, the theoretical mean, the empirical mean, the theoretical variance, and the empirical variance with names y, theo.mean, emp.mean, theo.var, and emp.var, respectively.
draw.noncentral.t(nrep=100000,nu=4,lambda=2)
draw.noncentral.t(nrep=100000,nu=5,lambda=1)