s-news
[Top] [All Lists]

GLMM in S-plus with count data and repeated measures

To: s-news@lists.biostat.wustl.edu
Subject: GLMM in S-plus with count data and repeated measures
From: kapigian@nature.berkeley.edu
Date: Sun, 24 Oct 2004 13:36:50 -0700 (PDT)
Importance: Normal
User-agent: SquirrelMail/1.4.3
Hello all-

I'm fairly new to S-plus and I've been trying to implement a generalized
linear mixed model with negative binomial errors (from some insect count
data).  My variables are as follows:

"count" = insect count data from branch samples
"mass" = offset to account for different sizes of samples
"type" = fixed effect with 2 levels
"collection" = 2 collection periods on same trees (repeated measure)
"site" = random effect

I used the GlmmPQL frunction from the MASS library.  I estimated theta
using the "glm.nb" function, here is the call:

glmmPQL(count~ type*collection + offset(log(mass)),
random=~collection|site, family=negative.binomial(theta=1.17))

I've attached the output summary below, but my questions are:
1.  Does this seem like the right approach for these data?
2.  Do I have the syntax right, particularly with regards to the repeated
measure (collection)?

Any thoughts, criticisms, advice would be much appreciated!

--Kyle Apigian
kapigian@nature.berkeley.edu

-----------------------------------------------------------
Linear mixed-effects model fit by maximum likelihood
 Data: NULL
       AIC      BIC    logLik
  905.5136 934.7615 -444.7568

Random effects:
 Formula:  ~ collection | site
 Structure: General positive-definite
               StdDev   Corr
(Intercept) 1.0083883 (Inter
 collection 0.6298937 -0.987
   Residual 0.8824405

Variance function:
 Structure: fixed weights
 Formula:  ~ invwt
Fixed effects: count ~ type * collection + offset(log(mass))
                   Value Std.Error  DF   t-value p-value
    (Intercept)  3.394008 0.4086388 275  8.305642  <.0001
           type -0.566635 0.1952115 275 -2.902671  0.0050
     collection -1.887850 0.2638352 275 -7.155412  <.0001
type:collection  0.311640 0.1384645 275  2.250682  0.0131

Standardized Within-Group Residuals:
       Min         Q1        Med        Q3      Max
 -1.160909 -0.7231607 -0.2896666 0.5418532 5.702982

Number of Observations: 286
Number of Groups: 8
---------------------------------------------------------------







<Prev in Thread] Current Thread [Next in Thread>