Perhaps you might want to abstract your code a bit and try something like:
X = rnorm(500) # Some Data
replicate(1e4, mean(sample(X, 500, replace = T)))
Obviously you can set up a loop over your data sets as needed.
Michael
On Sat, Nov 12, 2011 at 6:46 PM, Francesca wrote:
> Dear Contributors,
Dear Contributors,
I am trying to perform a simulation over sample data,
but I need to reproduce the same simulation over 4 groups of data. My
ability with for loop is null, in particular related
to dimensions as I always get, no matter what I try,
"number of items to replace is not a multiple
2 matches
Mail list logo