[R-sig-ME] mixed effect model with repeated measures in R

Ned Dochtermann ned.dochtermann at gmail.com
Thu Jan 10 20:51:42 CET 2013


In regards to degrees of freedom, the difficulty is that there won't 
often be clear (or correct) methods to calculate degrees of freedom. 
While other software packages and libraries may present estimates of 
df's, that doesn't mean they're correct.

If I recall correctly, this article mentions some of the problems with 
df's from mixed-effects models:
Baayen, R. H., D. J. Davidson, and D. M. Bates. 2008. Mixed-effects 
modeling with crossed random effects for subjects and items. Journal of 
Memory and Language 59:390-412.

Having asked about the same sort of issue I've learned that the choice 
the lme4 developers had was to either present what are necessarily 
incorrect estimates of df's or present none. They decided to present none.
For those of us working in fields where df's and p-values are de rigueur 
this can be frustrating but I understand why they made that choice. You 
can, of course, determine what the range of df's would be for yourself 
and work within that. This approach, which is what I'd guess SAS, JMP, 
ASReml, and other tools do.

Good luck.
Ned



On 1/10/2013 12:18 PM, r-sig-mixed-models-request at r-project.org wrote:
 > Message: 3
 > Date: Thu, 10 Jan 2013 16:12:12 +0100
 > From: Thijs vanden Bergh <bergh.thijsvanden at gmail.com>
 > To: Billy <billy.requena at gmail.com>
 > Cc: r-sig-mixed-models at r-project.org
 > Subject: Re: [R-sig-ME] mixed effect model with repeated measures in R
 > Message-ID:
 > <CAJkOg=xCGeCgs9xQZemgcL-DnAovDEpgdxAL_JL_kQM183vNCw at mail.gmail.com>
 > Content-Type: text/plain
 >
 > I did try lmer from lme4 and indeed came to the same coding
 >
 > However, I  abandoned lmer for two reasons:
 > 1) I prefer to be able to present degrees of freedom and
 > 2)  the design i have is a bit more complicated than what i presented 
as it
 > actually is a 3*3 design.
 > Getting pairwise contrasts from LanguageR > pvals.fnc costs a lot of time
 > (the function itself and recoding the contrasts)
 >
 > The bit of code i presented largely exagerates differences in Met among
 > days (I used it to verify how the random effect for Date was working 
out).
 > Generally Met levels decrease slowly through time (they depend 
strongly on
 > the amount of solar radiation and the experiment runs from high summer to
 > autumn) but early in the season there are some bad weather days where
 > levels of Met are much reduced
 > Therefore i wanted to model them using a random effect rather than a 
fixed
 > factor which would assume a linear relationship with the progressing 
of the
 > season.
 >
 > Concerning the normality problem that you bring up: should data not 
just be
 > normally distributed within one day?
 >
 > thanks for all help,
 >
 > Th


-- 
Ned A. Dochtermann
Assistant Professor / Department of Biological Sciences
NORTH DAKOTA STATE UNIVERSITY
p: 701.231.7353 / f: 701.231.7149 / www.ndsu.edu

https://sites.google.com/site/neddochtermann/
ned.dochtermann at ndsu.edu



More information about the R-sig-mixed-models mailing list