Being an Undergrad in Statistics, we require the daily usage of R as a Statistical Software for simulations. But unfortunately I am facing some issues with the set.seed() command for generating the pseudo random numbers.
The problem is, running a particular (say set.seed(987654321)) seed and then drawing random numbers from let's say specific distributions like normal (using rnorm()) and Chi Squared ( using rchisq()) is giving me different results on two different machines whereas I am using the same and the most latest versions of both R-studio and the base R (Gui). Why this is happening?
Any help in this regard, will be highly appreciated.
Same here. However, running a second time without reseeding yields a different result. That was the motivation for my question above.
rchisq(5, df = 0, ncp = 2.)
#> [1] 7.920865 3.955410 0.904365 1.988855 0.000000
rchisq(5, df = 0, ncp = 2.)
#> [1] 4.407804 0.000000 1.226219 0.000000 14.338174