[R] Help please! How to code a mixed-model with 2 within-subject factors using lme or lmer?

2008-09-14 Thread roberto toro
Hello, I'm using aov() to analyse changes in brain volume between males and females. For every subject (there are 331 in total) I have 8 volume measurements (4 different brain lobes and 2 different tissues (grey/white matter)). The data looks like this: Subject Sex LobeTissue Volume

[R] Help please! How to code a mixed-model with 2 within-subject factors using lme or lmer?

2008-09-14 Thread roberto toro
Thanks for answering Mark! I tried with the coding of the interaction you suggested: tfac-with(vlt,interaction(Lobe,Tissue,drop=T)) mod-lme(Volume~Sex*Lobe*Tissue,random=~1|Subject/tfac,data=vlt) But is it normal that the DF are 2303? DF is 2303 even for the estimate of LobeO that has only

Re: [R] moving from aov() to lmer()

2008-09-13 Thread roberto toro
Hello, I'm using this command to analyse changes in brain volume: mod1-aov(Volume~Sex*Lobe*Tissue+Error(Subject/(Lobe*Tissue)),data.vslt) I'm comparing males/females. For every subject I have 8 volume measurements (4 different brain lobes and 2 different tissues (grey/white matter)).