[R-sig-ME] glmmPQL simplification

Toby Marthews toby.marthews at ouce.ox.ac.uk
Sun Jan 23 02:57:41 CET 2011


Hi Iker,
Not sure you're approaching things the right way here:
(i) Brian Ripley stated once “I have no idea where you got the idea that anova could be used with glmmPQL” (on http://www.biostat.wustl.edu/archives/html/s-news/2002-06/msg00055.html) which would be a short answer to this question. Also see http://www.mail-archive.com/r-help@stat.math.ethz.ch/msg46894.html .
(ii) However, people do get around this in various ways, e.g. by changing the class of the glmmPQL object returned, though note that this is probably inadvisable: http://markmail.org/message/jddj6aq66wdidrog#query:how%20to%20use%20anova%20with%20glmmPQL+page:1+mid:jddj6aq66wdidrog+state:results
(iii) Lastly, if you're trying to do model simplification, the p-values are already there in the summary table you posted. Why not remove the least significant term (starting with sexM:weatherpc1 not weatherpc1:tlength) and look at the new summary table rather than that anova() test?
Toby

________________________________________
From: r-sig-mixed-models-bounces at r-project.org [r-sig-mixed-models-bounces at r-project.org] On Behalf Of Iker Vaquero Alba [karraspito at yahoo.es]
Sent: 22 January 2011 17:50
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] glmmPQL simplification

   Hello:

   I am trying to fit a mixed effects model with the glmmPQL function, as I get an error message trying to fit the same model with lmer.

   When I try to simplify the model, removing some of the interactions, I get this message:

    "Error in anova.glmmPQL(fledgecoltailmodel1, s.fledgecoltailmodel1.1) :
  'anova' is not available for PQL fits"

   So, I don't know what to do or what function to use to reliably simplify the model and drop some of the interaction terms. Can you give me any indication? Any little help would be greatly appreciated.

   > fledgecoltailmodel1<-glmmPQL(nfledge~sex*briventral*inslarge*weatherpc1*tlength-sex:briventral:inslarge:weatherpc1:tlength-sex:briventral:inslarge:weatherpc1-sex:briventral:inslarge:tlength-sex:briventral:weatherpc1:tlength-sex:inslarge:weatherpc1:tlength-briventral:inslarge:weatherpc1:tlength-sex:briventral:inslarge-sex:briventral:weatherpc1-sex:briventral:tlength-sex:inslarge:weatherpc1-sex:inslarge:tlength-sex:weatherpc1:tlength-briventral:inslarge:weatherpc1-briventral:inslarge:tlength-briventral:weatherpc1:tlength-inslarge:weatherpc1:tlength,random=~1|site/pair,family=poisson)
iteration 1
iteration 2
iteration 3
> summary(fledgecoltailmodel1)
Linear mixed-effects model fit by maximum likelihood
 Data: NULL
  AIC BIC logLik
   NA  NA     NA

Random effects:
 Formula: ~1 | site
         (Intercept)
StdDev: 3.425823e-07

 Formula: ~1 | pair %in% site
        (Intercept)     Residual
StdDev:   0.2358495 2.329028e-07

Variance function:
 Structure: fixed weights
 Formula: ~invwt
Fixed effects: nfledge ~ sex * briventral * inslarge * weatherpc1 * tlength -      sex:briventral:inslarge:weatherpc1:tlength - sex:briventral:inslarge:weatherpc1 -      sex:briventral:inslarge:tlength - sex:briventral:weatherpc1:tlength -      sex:inslarge:weatherpc1:tlength - briventral:inslarge:weatherpc1:tlength -      sex:briventral:inslarge - sex:briventral:weatherpc1 - sex:briventral:tlength -      sex:inslarge:weatherpc1 - sex:inslarge:tlength - sex:weatherpc1:tlength -      briventral:inslarge:weatherpc1 - briventral:inslarge:tlength -      briventral:weatherpc1:tlength - inslarge:weatherpc1:tlength
                           Value  Std.Error DF   t-value p-value
(Intercept)            1.3502758 0.29547025 15  4.569921  0.0004
sexM                   0.0000013 0.00000137 11  0.913264  0.3807
briventral            -0.0000001 0.00000002 11 -2.154738  0.0542
inslarge               0.0179169 0.16643724  6  0.107649  0.9178
weatherpc1             0.0192141 0.21848655  6  0.087942  0.9328
tlength                0.0000001 0.00000004 11  1.901240  0.0838
sexM:briventral        0.0000000 0.00000000 11 -2.486618  0.0302
sexM:inslarge          0.0000009 0.00000029 11  3.284681  0.0073
briventral:inslarge    0.0000000 0.00000001 11  2.072806  0.0625
sexM:weatherpc1        0.0000001 0.00000010 11  0.639981  0.5353
briventral:weatherpc1  0.0000000 0.00000000 11  2.295970  0.0423
inslarge:weatherpc1   -0.0589347 0.13022509  6 -0.452560  0.6668
sexM:tlength           0.0000000 0.00000001 11 -1.594436  0.1391
briventral:tlength     0.0000000 0.00000000 11  1.142253  0.2776
inslarge:tlength       0.0000000 0.00000001 11 -3.174971  0.0088
weatherpc1:tlength     0.0000000 0.00000001 11 -0.653040  0.5271
 Correlation:
                      (Intr) sexM   brvntr inslrg wthrp1 tlngth sxM:br sxM:ns
sexM                   0.000
briventral             0.000  0.224
inslarge              -0.980  0.000  0.000
weatherpc1             0.811  0.000  0.000 -0.817
tlength                0.000 -0.088  0.637  0.000  0.000
sexM:briventral        0.000 -0.230  0.748  0.000  0.000  0.588
sexM:inslarge          0.000 -0.432 -0.054  0.000  0.000  0.644 -0.001
briventral:inslarge    0.000 -0.443 -0.406  0.000  0.000  0.133  0.026  0.317
sexM:weatherpc1        0.000  0.426  0.239  0.000  0.000 -0.295  0.149 -0.706
briventral:weatherpc1  0.000  0.203  0.021  0.000  0.000 -0.298 -0.183 -0.253
inslarge:weatherpc1   -0.815  0.000  0.000  0.826 -0.979  0.000  0.000  0.000
sexM:tlength           0.000 -0.895 -0.469  0.000  0.000 -0.341 -0.062  0.107
briventral:tlength     0.000  0.049 -0.889  0.000  0.000 -0.766 -0.874 -0.117
inslarge:tlength       0.000  0.403 -0.039  0.000  0.000 -0.747 -0.117 -0.952
weatherpc1:tlength     0.000 -0.414 -0.350  0.000  0.000  0.039 -0.270  0.518
                      brvntrl:n sxM:w1 brvn:1 insl:1 sxM:tl brvntrl:t inslr:
sexM
briventral
inslarge
weatherpc1
tlength
sexM:briventral
sexM:inslarge
briventral:inslarge
sexM:weatherpc1       -0.265
briventral:weatherpc1 -0.453     0.282
inslarge:weatherpc1    0.000     0.000  0.000
sexM:tlength           0.373    -0.242 -0.060  0.000
briventral:tlength    -0.039    -0.097  0.198  0.000  0.268
inslarge:tlength      -0.306     0.615  0.305  0.000 -0.054  0.213
weatherpc1:tlength     0.310    -0.831 -0.017  0.000  0.352  0.219    -0.369

Standardized Within-Group Residuals:
          Min            Q1           Med            Q3           Max
-1.980407e+00 -3.989934e-01 -6.236178e-07  3.989821e-01  1.979438e+00

Number of Observations: 48
Number of Groups:
          site pair %in% site
            10             25
> s.fledgecoltailmodel1.1<-update(fledgecoltailmodel1,~.-weatherpc1:tlength)
iteration 1
iteration 2
iteration 3
> anova(fledgecoltailmodel1,s.fledgecoltailmodel1.1)
Error in anova.glmmPQL(fledgecoltailmodel1, s.fledgecoltailmodel1.1) :
  'anova' is not available for PQL fits

   Thank you very much!!



   Iker Vaquero-Alba

   Centre for Ecology
and Conservation

   Daphne du Maurier
Building

   University of Exeter,
Cornwall Campus

   Treliever Road

   TR10 9EZ Penryn

   U.K.







        [[alternative HTML version deleted]]




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