An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-mixed-models/attachments/20121007/2c351206/attachment.pl>
Linear Mixed Effects vs. Repeated Measures
3 messages · Cortin A. Zelaznog, Michael Lawrence, iwhite@staffmail.ed.ac.uk
Using lme4 syntax, I believe you want:
lmer_fit1 = lmer(
data = df
, formula = Response ~ Year + (1+Year|Tree)
)
contrast this with a model that assumes a constant effect of Year
across levels of Tree:
lmer_fit2 = lmer(
data = df
, formula = Response ~ Year + (1|Tree)
)
anova(lmer_fit1,lmer_fit2)
On Sun, Oct 7, 2012 at 4:42 PM, Cortin A. Zelaznog <cortin08 at yahoo.com> wrote:
Hi All,
I have 46 replicate trees I sampled in a 2 year survey.
My objective is: To estimate the proportion of variation among-trees w/in year, and proportion variation due to among year and tree interaction.
Response Year Tree
23 A 1
12 A 2
54 A 3
23 B 1
12 B 2
9 B 3
The above is an example of my dataset
Circularity was violated, so instead of running a Repeated Measures I am running a mixed effects model. With trees as random and year as fixed. I'm then running a variance components analysis.
Q1. Is this a good way to test the above questions?
My model is this: lme <-lme(response~year,random=~1|tree/year,df)
I am not getting an interaction term here, nor do I when I run an aov model using tree*year as a factor.
Q2. I'm wondering why I'm not coming up with an interaction term for year and tree using aov or lme even though my variance comp. analysis says that most of the variation (55%) is due to year and tree interaction.
Thanks!!
[[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
Cortin, Won't a standard mixed model analysis be identical to a repeated measures analysis? The only way I can see that 'circularity' is violated here is that the residual variance differs in the two years. This is possible with lme, I don't know about lmer. Isn't tree x year the same as residual for your data?
On 10/07/2012 08:42 PM, Cortin A. Zelaznog wrote:
Hi All, I have 46 replicate trees I sampled in a 2 year survey. My objective is: To estimate the proportion of variation among-trees w/in year, and proportion variation due to among year and tree interaction. Response Year Tree 23 A 1 12 A 2 54 A 3 23 B 1 12 B 2 9 B 3 The above is an example of my dataset Circularity was violated, so instead of running a Repeated Measures I am running a mixed effects model. With trees as random and year as fixed. I'm then running a variance components analysis. Q1. Is this a good way to test the above questions? My model is this: lme<-lme(response~year,random=~1|tree/year,df) I am not getting an interaction term here, nor do I when I run an aov model using tree*year as a factor. Q2. I'm wondering why I'm not coming up with an interaction term for year and tree using aov or lme even though my variance comp. analysis says that most of the variation (55%) is due to year and tree interaction. Thanks!! [[alternative HTML version deleted]]
_______________________________________________ R-sig-mixed-models at r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-sig-mixed-models
The University of Edinburgh is a charitable body, registered in Scotland, with registration number SC005336.