draw.noncentral.t {UnivRNG} | R Documentation |
Generates variates from doubly non-central t distribution
Description
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
.
Usage
draw.noncentral.t(nrep,nu,lambda)
Arguments
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. |
Value
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.
Examples
draw.noncentral.t(nrep=100000,nu=4,lambda=2)
draw.noncentral.t(nrep=100000,nu=5,lambda=1)
[Package UnivRNG version 1.2.3 Index]