An embedded and charset-unspecified text was scrubbed... Name: not available URL: <https://stat.ethz.ch/pipermail/r-sig-ecology/attachments/20120726/a1188677/attachment.pl>
Help: Specifying 'correct' degrees of freedom for within-subject factor in nlme repeated measures ANOVA
2 messages · Stephanie Avery-Gomm, Mollie Brooks
Specifying denominator degrees of freedom in models with random effects is still controversial. I think the bottom line is that if you want to get it right, do MCMC or bootstrapping instead. This FAQ page usually keeps up on the latest best practices in light of the difficulties http://glmm.wikidot.com/faq Scroll down to the section on Degrees of Freedom. It talks about df in the context of lme4, but the same ideas should apply to lme. You would probably get more responses on the R-sig-mixed list. cheers, Mollie
On 26 Jul 2012, at 12:55 PM, Stephanie Avery-Gomm wrote:
Hello, I am using nlme to do a mixed effect repeated measures ANCOVA, with two additional fixed factors but a limited sample size. *I am seeking clarification on how to/if I should adjust the inflated degrees of freedom for a within-subject factor as a way of dealing with the temporal pseudoreplication. *More information: At 3 Sites on a river I measured fish Population in approximately 9 stream Channel Units. Each Channel Unit was classified as a Habitat, with three levels (Glide, Riffle, Pool). I sampled each Channel Unit 3 times over the course of the summer, each time taking a Discharge Measurement (thus the exact Discharge differs a little from Site to Site, and so is a continuous variable). I want to know, does fish Population in stream habitats (Glides, Riffles, Pools) change as discharge decreases over the summer? Is there an interaction (I.e. Populations decrease in Riffles with decreasing Discharge, but increase in Pools?). Is fish Population different between habitats or between sites? The model I have settled on to answer this question looks like this: Pop.Model<-lme(Pop~Site+Habitat*Discharge, random=~1|ChannelUnit, correlation=corCAR1(),data=mydata) Inclusion of the three repeated measurements of Population in each Channel Unit results in temporal pseudoreplication *and the degrees of freedom for the within-subjects factor (Discharge) is 42, but I only have 26 Channel Units, so this is obviously inflated (should be 21). I read in The R Book (Crawley: *(Pg. 644, https://www.dropbox.com/s/4zqewxl44btqmzo/Crawley%20The%20R%20book.pdf*) that I can fix this by specifying the degrees of freedom. But how?* * Although I?ve read a ton online, including Bates info re: SAS vs R and degrees of freedom I find that I am still quite confused. If anyone can offer specific advice on how I can adjust my degrees of freedom for the within-subjects factor or explain in accessible terms why I don?t need to, I would be very grateful. * Just in case I haven't provided enough information, here is my data and r code. .csv file: https://www.dropbox.com/s/2ijgq74di3hmo8i/R.Help.csv .R file: https://www.dropbox.com/s/puj5maifxc2rfcg/R%20Help.R .doc with code & diagram: https://www.dropbox.com/s/29dtofc62t957co/R%20Help.doc Sincerely, Stephanie Avery-Gomm MSc. Candidate, Zoology Department University of British Columbia -- -- Stephanie Avery-Gomm Master's Candidate Zoology Department, University of British Columbia #4200-6270 University Blvd. Vancouver, B.C. V6T 1Z4 Email: Stephanie.AveryGomm at gmail.com Cell: 778 322 3483 Web: http://ca.linkedin.com/in/stephanieaverygomm [[alternative HTML version deleted]]
_______________________________________________ R-sig-ecology mailing list R-sig-ecology at r-project.org https://stat.ethz.ch/mailman/listinfo/r-sig-ecology