Skip to content
Prev 180273 / 398513 Next

Simulation

On 14/05/2009, at 10:04 AM, Carl Witthoft wrote:

            
I really don't get this.  The OP wanted 1000 independent samples,
each of size 100.  Whether she does

set.seed(42)
M <- matrix(rnorm(100*1000),nrow=1000) # Each row is a sample.

or

L <- list()
set.seed(42)
for(i in 1:1000) L[[i]] <- rnorm(100) # Each list entry is a sample.

she gets this, i.e. the desired result.  Setting a seed serves to make
the results reproducible.  This works via either approach.  Making  
results
reproducible in this manner is advisable, but seed-setting is nothing  
that the OP
needs to be *warned* about.

	cheers,

		Rolf Turner

######################################################################
Attention:\ This e-mail message is privileged and confid...{{dropped:9}}