Re: [R] significance for a random effect in Mixed Model ANOVA

2007-10-15 Thread joris . dewolf
Nathaniel, If you are interested in the particular subject, you should consider them as a fixed effect, which wil give you what you want. If your subjects are really random, the only thing you could be interested in, is whether considering the subjects as a grouping is helping you in improving

Re: [R] Simulate data based on correlation coefficient

2007-10-07 Thread joris . dewolf
Try this: rnormcor <- function(x,rho) rnorm(1,rho*x,sqrt(1-rho^2)) a <- rnorm(1000,0,1) b <- sapply(a, rnormcor, rho = 0.7) cor(a,b) Joris "Gustavo"

Re: [R] mean of subset of rows

2007-10-01 Thread joris . dewolf
data <- data.frame(ID = rep(letters[1:4],5),size=rnorm(20,0,1)) aggregate(data$size, by = list(data$ID),mean) <[EMAIL PROTECTED] e.ehu.es>

Re: [R] seq() question

2007-09-29 Thread joris . dewolf
Has something do with the precision. Check this: all.equal(1.1, brks[4], tolerance = 0) all.equal(1.2, brks[5], tolerance = 0) all.equal(1.2, brks[5]) "Derek Ogle"