Re: [R] Generating repeated measures data

2012-02-21 Thread sarahzhu
hi i checked the package "corcounts", but it seems to be used for generating high dimensional correlated count data. is it also proper for generating data with N=50 for instance? thanks -- View this message in context: http://r.789695.n4.nabble.com/Generating-repeated-measures-data-tp3388807p4

Re: [R] Generating repeated measures data

2011-03-19 Thread Michael Dewey
At 00:37 19/03/2011, John Sorkin wrote: How would one generate data to be used in a simulation of a repeated measures ANOVA given a known (1) within-person correlation with known (2) mean and SD of data obtained at each of three times of observation? You do not say which distribution you want

Re: [R] Generating repeated measures data

2011-03-18 Thread Joshua Wiley
Hi John, This is not advanced enough for serious applications, but if you are just looking for a simple way to make example data, you could do something like: gencor <- function(order, mu, sd, r) { X <- matrix(rnorm(prod(order), mean = mu, sd = sd), nrow = order[1], ncol = order[2]) R <- matr