test1: Poor chi-square generator

Description Usage Arguments Details Value warning Author(s) References See Also Examples

View source: R/test1.R

Description

This function is a direct implementation of the transform principle for the chi-square distribution, with poor performances even though the output is correct.

Usage

1
test1(Nsim = 10^4, df = 6)

Arguments

Nsim

Number of simulations

df

Degrees of freedom

Details

This function replicates rchisq(Nsim,df) and thus should not be used.

Value

This function produces a numerical vector of size Nsim.

warning

For efficient chi-square simulation, make sure to use rchisq

Author(s)

Christian P. Robert and George Casella

References

From Chapter 2 of EnteR Monte Carlo Statistical Methods

See Also

test2,rchisq

Examples

1
2
mean(test1())
# produces [1] 6.02526

mcsm documentation built on May 2, 2019, 10:16 a.m.

Related to test1 in mcsm...