Duncan Murdoch <[EMAIL PROTECTED]> writes: > This isn't really something that can be proved by a test. Perhaps the > current implementation makes those equal only because 500 is even, or > divisible by 5, or whatever... > > I think the intention is that those should be equal, but in a quick > search I've been unable to find a documented guarantee of that. So I > would take a defensive stance and assume that there may be conditions > where c(rnorm(m), rnorm(n)) is not equal to rnorm(m+n). > > If someone can point out the document I missed, I'd appreciate it.
I think it's a fair assumption that *uniform* random numbers have the property, since these are engines that produce a continuous stream of values, of which we select the next n and m values. As long as the normal.kind (see ?RNGkind) is "Inversion", we can be sure that the property carries to rnorm, but it might not be the case for other methods. In particular the ones that generate normal variates in batches are suspect. However, empirically, I can't seem to provoke the effect with any of R's built-in generators. One *could* of course check the source code and see whether there is state information being kept between invokations... -- O__ ---- Peter Dalgaard Ă˜ster Farimagsgade 5, Entr.B c/ /'_ --- Dept. of Biostatistics PO Box 2099, 1014 Cph. K (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - ([EMAIL PROTECTED]) FAX: (+45) 35327907 ______________________________________________ [email protected] mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide! http://www.R-project.org/posting-guide.html
