Re: [R] Coeficients estimation in a repeated measures linear model

2017-12-06 Thread Jim Lemon
Hi Sergio, You seem to be aiming for a univariate repeated measures analysis. Maybe this will help: subno<-rep(1:6,2) dat <- data.frame(subno=rep(1:6,2),,vals = c(ctrl, ttd), cond = c(rep("ctrl", 6), rep("ttd", 6)), ind = factor(rep(1:6, 2))) fit<-aov(vals~ind+cond+Error(subno),data=dat) fit su

Re: [R] Coeficients estimation in a repeated measures linear model

2017-12-06 Thread Bert Gunter
Sergio: 1. You do not have a "repeated measures linear model" . 2. This list is not designed to replace your own efforts to learn the necessary R background, in this case, factor coding and contrasts in linear models. I would suggest you spend some time with any of the many fine R linear model tu

[R] Coeficients estimation in a repeated measures linear model

2017-12-06 Thread Sergio PV
Dear Users, I am trying to understand the inner workings of a repeated measures linear model. Take for example a situation with 6 individuals sampled twice for two conditions (control and treated). set.seed(12) ctrl <- rnorm(n = 6, mean = 2) ttd <- rnorm(n = 6, mean = 10) dat <- data.frame(vals =