[R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Chee Chen
Dear All, I would like to ask for your help on reproducibility of random sampling with replacement. For example, one re-samples the rows with replacement of a residual matrix and uses the new residual matrix thus obtained to produce a statistic ; repeat this for a certain number of times. My

Re: [R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Rui Barradas
Hello, Inline. Em 01-01-2014 22:12, Chee Chen escreveu: Dear All, I would like to ask for your help on reproducibility of random sampling with replacement. For example, one re-samples the rows with replacement of a residual matrix and uses the new residual matrix thus obtained to produce a

Re: [R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Rolf Turner
Why on earth would you expect S and T to be the same given what you have done. I am unable to rightly apprehend the confusion of ideas that could provoke such a question, (Charles Babbage). You have to set the *same* seed before each construction. I.e. do set.seed(123) before creating S; then

Re: [R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Jeff Newmiller
If you want to reproduce the same sequence twice, then you need to set the seed at the beginning of each calculation. You are only doing it for the second calculation below. --- Jeff NewmillerThe

Re: [R] Question: reproducibility of random sampling with replacement

2014-01-01 Thread Bert Gunter
You have to set the same seed before each random number generation! You did not do this. Bert Gunter Genentech Nonclinical Biostatistics (650) 467-7374 Data is not information. Information is not knowledge. And knowledge is certainly not wisdom. H. Gilbert Welch On Wed, Jan 1, 2014 at 2:12