df numbers in lmer
-----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. Ben Bolker -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAk3JOe0ACgkQc5UpGjwzenN6tACcDVSQErDnA0HODI2MW7nLojM4 86kAnR41SgAsO1bEYlLyBpCvUTY6sufr =b1Ik -----END PGP SIGNATURE-----