On Sun, 24 May 1998, patrik ohagen wrote:
>
> dear list,
>
> I am trying to run a simulation using S-PLUS v4.0 on a windows/95
> machine. I am comparing different estimators of a covariance matrix. When
> I use cov.mve within my "for loop" all estimates, p-values,...turn out to
> be the same in all iterations of the "for loop".
>
> Does cov.mve reset the .Random.seed object in some sophisticated way ?
There seems to be a bug in 4.0 release 3:
set.seed(123)
library(MASS)
for(i in 1:3) {
print(.Random.seed)
print(cov.mve(hills)$obj)
}
3.3 on Windows, 3.4 on Solaris:
[1] 21 14 49 16 41 1 32 22 36 23 28 3
Minimum volume ellipsoid with 660 samples of sizes
between 4 and 15 of which 17 were singular
[1] 0.1055796
[1] 29 11 13 56 61 2 31 24 52 44 57 3
Minimum volume ellipsoid with 660 samples of sizes
between 4 and 15 of which 21 were singular
[1] 0.1508284
[1] 45 55 50 53 39 3 50 63 27 39 43 1
Minimum volume ellipsoid with 660 samples of sizes
between 4 and 15 of which 18 were singular
[1] 0.1608706
4.0 rel 3 on Windows:
[1] 21 14 49 16 41 1 32 22 36 23 28 3
Minimum volume ellipsoid with 660 samples of sizes
between 4 and 15 of which 21 were singular
[1] 18362.8
[1] 57 27 41 42 44 3 59 45 59 47 9 1
Minimum volume ellipsoid with 660 samples of sizes
between 4 and 15 of which 21 were singular
[1] 18362.8
[1] 57 27 41 42 44 3 59 45 59 47 9 1
Minimum volume ellipsoid with 660 samples of sizes
between 4 and 15 of which 21 were singular
[1] 18362.8
It seems that cov.mve always sets the random seed to a particular value
on 4.0 rel 3. This seems both undocumented and undesirable. (Presumably
the definition of objective has been changed too.)
--
Brian D. Ripley, ripley@stats.ox.ac.uk
Professor of Applied Statistics, http://www.stats.ox.ac.uk/~ripley/
University of Oxford, Tel: +44 1865 272861 (self)
1 South Parks Road, +44 1865 272860 (secr)
Oxford OX1 3TG, UK Fax: +44 1865 272595
-----------------------------------------------------------------------
This message was distributed by s-news@wubios.wustl.edu. To unsubscribe
send e-mail to s-news-request@wubios.wustl.edu with the BODY of the
message: unsubscribe s-news
|