Description Usage Arguments Value Examples
View source: R/draw.noncentral.t.R
This function implements pseudo-random number generation for a non-central t distribution
\frac{Y}{√{U/ν}}
where U is a central chi-square random variable with ν degrees of freedom and Y is an independent, normally distributed random variable with variance 1 and mean λ.
1 | 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.
1 2 3 | draw.noncentral.t(nrep=100000,nu=4,lambda=2)
draw.noncentral.t(nrep=100000,nu=5,lambda=1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.