set.seed(8675309)
 # NOTE: following inverts rstream::rstream.sample using stats::qchisq
 vchisq(3, df = 3, ncp = 2)
 set.seed(8675309)
 # NOTE: following inverts rstream::rstream.sample using stats::qchisq
 vchisq(3, 3, stream = 1)
 vchisq(3, 3, stream = 2)
 set.seed(8675309)
 # NOTE: following inverts rstream::rstream.sample using stats::qchisq
 vchisq(1, 3, stream = 1)
 vchisq(1, 3, stream = 2)
 vchisq(1, 3, stream = 1)
 vchisq(1, 3, stream = 2)
 vchisq(1, 3, stream = 1)
 vchisq(1, 3, stream = 2)
 set.seed(8675309)
 variates <- vchisq(100, 3, stream = 1)
 set.seed(8675309)
 variates <- vchisq(100, 3, stream = 1, antithetic = TRUE)
Run the code above in your browser using DataLab