[R-sig-ME] df numbers in lmer

peter dalgaard pdalgd at gmail.com
Wed May 11 13:45:48 CEST 2011


On May 10, 2011, at 15:13 , Ben Bolker wrote:

> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> On 05/10/2011 08:14 AM, Zofia Prokop wrote:
>> Hello,
>> 
>> I'm wondering how to obtain df-s associated with t values for fixed factors
>> in lmer. I need them in order to calculate the effect sizes (Pearson's r)
>> for those fixed factors.
>> 
>> One method of calculating df number I came across is to take the total
>> number of observation minus the number(s) of levels of random factor(s). But
>> I have my doubts, such as
>> 
>> (1) what about the number of fixed factors in the model - shouldn't it be
>> subtracted as well?
>> 
>> (2) I can see how this method can be applied to models where random factors
>> are crossed with fixed factors but what about when they are nested? Or in
>> case of more comlex designs? The model I'm struggling with at the moment is
>> such:
>> I have 10 females and 10 males crossed in a full factorial design, resulting
>> in 100 offspring trait means (one per each pairing). Fixed factors are:
>> female category and male category (2 levels each). I'm fitting a model:
>> 
>> siz <- lmer(sz~femcat+malecat+(1|femid)+(1|maleid))
>> 
>> What about those df-s for femcat and malecat?
>> 
>> I'd be very grateful for advice as well as literature suggestions (I'm very
>> new to mixed modelling and trying to get my head around it).
>> 
>> -Zofia
>> 
> 
>  As you may well have seen, this is a giant can of worms.  See for
> example <http://glmm.wikidot.com/faq>.  I agree that if you are going to
> do this by subtracting 'parameters' from the total number of
> observations, you should subtract the number of fixed effect parameters
> as well.
> 
>  I would guess at 100-20-3 for your df, keeping in mind that this is
> going to be approximate.

Hm? My guess would be 8... "femcat" contrasts would be tested by averaging over males, leading to effectively 10 females divided into 2 groups and "malecat" vice versa.

How did Pearson's r and the df enter into the effect size issue, however? 


-- 
Peter Dalgaard
Center for Statistics, Copenhagen Business School
Solbjerg Plads 3, 2000 Frederiksberg, Denmark
Phone: (+45)38153501
Email: pd.mes at cbs.dk  Priv: PDalgd at gmail.com




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