[R-sig-eco] AIC / BIC vs P-Values in lmer

Dunbar, Michael mdu at ceh.ac.uk
Thu Aug 5 18:01:10 CEST 2010


Hi Andy

I don't think you're right, although there are two different questions. One is whether introducing a higher level grouping where the structure is nested allows any variance to be defined at that level. It obviously depends on the data, but by and large the answer is yes, because the model isn't fitting the variance to family level then allocating what's left to order level. It's partitioning the variance between those levels, subject to some model assumptions, e.g. that variance within orders and families is constant across the data. E.g. for examples with a taxonomic hierarchy see http://nora.nerc.ac.uk/8161/ and http://nora.nerc.ac.uk/3792/

The other question is whether changing the random effects structure will change the significance of the fixed effects. That's a more difficult question to answer, it will depend for one on how the fixed effects map onto the random effects, e.g. whether a fixed effect is a property of an order or a family or an individual. Perhaps if the fixed effects are defined at the family or individual level it won't matter, but I wouldn't like to make a definitive statement on that. I've a feeling that there are plenty of situations where it could matter.

Cheers
Mike 


-----Original Message-----
From: r-sig-ecology-bounces at r-project.org [mailto:r-sig-ecology-bounces at r-project.org] On Behalf Of Crowe, Andrew
Sent: 05 August 2010 16:18
To: Ben Bolker; r-sig-ecology at r-project.org
Subject: Re: [R-sig-eco] AIC / BIC vs P-Values in lmer

In this case where a family is completely contained within an order, I think that once the variance at family level has been fit there is no remaining variance left to explain at the order level.  Thus you should get the same values for the fixed effects with both model specifications.  Where a grouping nests into multiple higher level groups is where you need to specify the interaction in the random term.
 
Andrew
 
Dr Andrew Crowe
 
Lancaster Environment Centre
Lancaster University
Lancaster    LA1 4YQ
UK

________________________________

From: r-sig-ecology-bounces at r-project.org on behalf of Ben Bolker
Sent: Thu 05/08/2010 3:13 PM
To: r-sig-ecology at r-project.org
Subject: [R-sig-eco] AIC / BIC vs P-Values in lmer



Thanks (forehead slap -- I knew that but it escaped me -- Manuel
Morales also pointed this out, off-list).

  Isn't the difference between

(1|order/family)

and

(1|family)

that the former fits two variance terms, one for differences among orders and
one for families (implicitly, within orders)?  I think they're
different (it should
be very easy to tell from the model output -- although if the data are scarce
it could be that among-order variance is estimated to be effectively zero,
in which case the results wouldn't differ much).

On Thu, Aug 5, 2010 at 9:23 AM, Crowe, Andrew <a.crowe at lancaster.ac.uk> wrote:
> Chris/Ben
>
> The lack of effect of the REML parameter is simply explained by the fact you are fitting a binomial model.  This causes the lmer call to default to a glmer call in which the REML parameter is ignored.  I also note that you are specifying order/family in the random term, which I assume are the taxanomic definitions of family and order.  As family is completey nested in order so that order:family is as unique as family, no additional variance is explained by order over family so I believe that you should just be able to specify (1|family) for your random intercept.
>
> Regards
>
> Andrew
>
> Dr Andrew Crowe
>
> Lancaster Environment Centre
> Lancaster University
> Lancaster    LA1 4YQ
> UK
>
> ________________________________
>
> From: r-sig-ecology-bounces at r-project.org on behalf of Chris Mcowen
> Sent: Thu 05/08/2010 2:04 PM
> To: Ben Bolker
> Cc: r-sig-ecology at r-project.org
> Subject: Re: [R-sig-eco] AIC / BIC vs P-Values in lmer
>
>
>
> I have just tried it with REML=FALSE and once again there is no difference in the AIC/BIC values between the two models? I have given two examples this time but have tried it with 10 models with no difference.
>
> Thanks,
> Chris
>
>
> 1
>
> MODEL WITH REML=FALSE
>
>> model01 <- lmer(threatornot~1+(1|order/family) + seasonality + pollendispersal +  breedingsystem*fruit + habit + lifeform +  woodyness, family=binomial,REML=FALSE )
>
>
> Generalized linear mixed model fit by the Laplace approximation
> Formula: threatornot ~ 1 + (1 | order/family) + seasonality + pollendispersal +      breedingsystem * fruit + habit + lifeform + woodyness
>  AIC  BIC logLik deviance
>  1399 1479 -683.6     1367
> Random effects:
>  Groups       Name        Variance Std.Dev.
>  family:order (Intercept) 0.27526  0.52466
>  order        (Intercept) 0.00000  0.00000
> Number of obs: 1116, groups: family:order, 43; order, 9
>
> Fixed effects:
>                        Estimate Std. Error z value Pr(>|z|)
> (Intercept)             0.384574   0.734960   0.523  0.60079
> seasonality2           -1.127996   0.353013  -3.195  0.00140 **
> pollendispersal2        0.693255   0.314600   2.204  0.02755 *
> breedingsystem2         0.761067   0.493404   1.542  0.12296
> breedingsystem3         1.226269   0.557236   2.201  0.02776 *
> fruit2                  1.047648   0.616723   1.699  0.08937 .
> habit2                 -1.146334   0.551682  -2.078  0.03772 *
> habit3                 -0.731207   0.872805  -0.838  0.40216
> habit4                 -0.190900   0.551427  -0.346  0.72920
> lifeform2              -0.295342   0.182667  -1.617  0.10592
> lifeform3              -0.376204   0.501825  -0.750  0.45345
> woodyness2              0.006274   0.390241   0.016  0.98717
> breedingsystem2:fruit2 -1.273811   0.651011  -1.957  0.05039 .
> breedingsystem3:fruit2 -1.633424   0.744563  -2.194  0.02825 *
>
>
> MODEL WITHOUT REML=FALSE
>
> model126 <- lmer(threatornot~1+(1|order/family) + seasonality + pollendispersal +  breedingsystem*fruit + habit + lifeform +  woodyness, family=binomial)
>
> Generalized linear mixed model fit by the Laplace approximation
> Formula: threatornot ~ 1 + (1 | order/family) + seasonality + pollendispersal +      breedingsystem * fruit + habit + lifeform + woodyness
>  AIC  BIC logLik deviance
>  1399 1479 -683.6     1367
> Random effects:
>  Groups       Name        Variance Std.Dev.
>  family:order (Intercept) 0.27526  0.52466
>  order        (Intercept) 0.00000  0.00000
> Number of obs: 1116, groups: family:order, 43; order, 9
>
> Fixed effects:
>                        Estimate Std. Error z value Pr(>|z|)
> (Intercept)             0.384574   0.734960   0.523  0.60079
> seasonality2           -1.127996   0.353013  -3.195  0.00140 **
> pollendispersal2        0.693255   0.314600   2.204  0.02755 *
> breedingsystem2         0.761067   0.493404   1.542  0.12296
> breedingsystem3         1.226269   0.557236   2.201  0.02776 *
> fruit2                  1.047648   0.616723   1.699  0.08937 .
> habit2                 -1.146334   0.551682  -2.078  0.03772 *
> habit3                 -0.731207   0.872805  -0.838  0.40216
> habit4                 -0.190900   0.551427  -0.346  0.72920
> lifeform2              -0.295342   0.182667  -1.617  0.10592
> lifeform3              -0.376204   0.501825  -0.750  0.45345
> woodyness2              0.006274   0.390241   0.016  0.98717
> breedingsystem2:fruit2 -1.273811   0.651011  -1.957  0.05039 .
> breedingsystem3:fruit2 -1.633424   0.744563  -2.194  0.02825 *
>
> 2
>
> MODEL WITH REML=FALSE
>> model02 <- lmer(threatornot~1+(1|order/family) + seasonality + woodyness, family=binomial,REML=FALSE )
>
> Generalized linear mixed model fit by the Laplace approximation
> Formula: threatornot ~ 1 + (1 | order/family) + seasonality + woodyness
>  AIC  BIC logLik deviance
>  1395 1420 -692.6     1385
> Random effects:
>  Groups       Name        Variance Std.Dev.
>  family:order (Intercept) 0.49348  0.70248
>  order        (Intercept) 0.00000  0.00000
> Number of obs: 1116, groups: family:order, 43; order, 9
>
> Fixed effects:
>             Estimate Std. Error z value Pr(>|z|)
> (Intercept)    0.6034     0.4227   1.427  0.15346
> seasonality2  -1.1421     0.3453  -3.308  0.00094 ***
> woodyness2     0.5113     0.2559   1.998  0.04572 *
>
> MODEL WITHOUT REML=FALSE
> model03 <- lmer(threatornot~1+(1|order/family) + seasonality + woodyness, family=binomial)
> Generalized linear mixed model fit by the Laplace approximation
> Formula: threatornot ~ 1 + (1 | order/family) + seasonality + woodyness
>  AIC  BIC logLik deviance
>  1395 1420 -692.6     1385
> Random effects:
>  Groups       Name        Variance Std.Dev.
>  family:order (Intercept) 0.49348  0.70248
>  order        (Intercept) 0.00000  0.00000
> Number of obs: 1116, groups: family:order, 43; order, 9
>
> Fixed effects:
>             Estimate Std. Error z value Pr(>|z|)
> (Intercept)    0.6034     0.4227   1.427  0.15346
> seasonality2  -1.1421     0.3453  -3.308  0.00094 ***
> woodyness2     0.5113     0.2559   1.998  0.04572 *
>
>
> On 5 Aug 2010, at 13:51, Ben Bolker wrote:
>
> Chris Mcowen <chrismcowen at ...> writes:
>
>>
>> Hi Philip,
>>
>> Thanks very much for this, i was completely unaware. I  have read various
> papers using lmer to calculate the
>> AIC statistic and none have mentioned this?
>>
>> I have just run through a random section of my models with this correction,
> however the AIC / BIC values are
>> the same with the REML=F in and out?
>>
>> Chris
>
>  Try REML=FALSE instead ... ?  (You may have 'F' set to a value
> in your workspace.)  Otherwise I would find it very odd that the
> results are identical.
>
> _______________________________________________
> R-sig-ecology mailing list
> R-sig-ecology at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-ecology
>
>
>        [[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
>
>
>

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

_______________________________________________
R-sig-ecology mailing list
R-sig-ecology at r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-ecology

-- 
This message (and any attachments) is for the recipient ...{{dropped:6}}



More information about the R-sig-ecology mailing list