[R-sig-ME] Wald's test

Ben Bolker bbolker at gmail.com
Tue Dec 4 15:12:35 CET 2012


[I'm taking the liberty of cc'ing r-sig-mixed-models ... I strongly
prefer *not* to answer mixed models questions offline, for a variety of
reasons.]

On 12-12-03 02:12 PM, Justin Chase wrote:
> Hi there Dr. Bolker.
> 
> I have a question regarding both your 2008 paper in TREE and your
> response to Helios de Rosario's mixed model question on the
> R-sig-mixed-models mailing list. I am analyzing count data (transformed
> for normality) from a slightly unbalanced split-plot lab experiment. I
> have two fixed factors, one whole-plot and one sub-plot, with "plot" as
> random factor. the model looks like this:
> 
> *y = µ + A_i + B_j + A*B_ij + C_k (B_i ) + A*C(B_i )_jk + e_l(ijk) *
> 
> I have been using the nlme package in R to test the significance of
> fixed factors and their interaction on my univariate data, following
> chapter 19 in The R Book (Crawley 2007). 

  I don't actually have Crawley's book (although I probably should, if
  only to find out what he's telling people to do).

> However, I'm not interested in
> analyzing coefficients of individual effects (treatment levels) like
> Bates does, but just want a significance test for whole factors. Because
> I don't want to prioritize either fixed factor, I prefer to generate
> type II SS estimates. Like Helios de Rosario, I used the Anova function
> in the car package to generate type II anova tables with Wald's Chi
> Square test and P values (because the F test is not available for this
> type of model). The results seem very reasonable and are fairly
> consistent with some least squares tests I've done on the same data
> using aov (reordering terms to get "type II" results). I've read your
> response to Helios's inquiry but unfortunately it was a bit over my
> head. According to your paper in TREE, my data should be analyzed with
> REML and F tests, but only Wald's X2 is available in R. Do you think I'm
> on the right track or should I just forget about using REML and analyze
> with aov on least squares fits (laboriously rearranging model terms to
> get type II tests)?

  Hmm.  Obviously I don't have your exact model, but I'm trying to
figure out what's wrong with, for example,

library(nlme)
fm1 <- lme(distance ~ age, data = Orthodont) # random is ~ age
anova(fm1,type="marginal")

##             numDF denDF  F-value p-value
## (Intercept)     1    80 467.4406  <.0001
## age             1    80  85.8464  <.0001

?  see anova.lme

Some of the complexity of the 2008 paper is due to the fact
that GLMMs are more challenging in several respects than LMMs.

> Also, should I be testing for overdispersion when using the Wald test,
> even though I'm just modelling Gaussian data with lme?

  No. The Gaussian family has an adjustable scale parameter (i.e.,
the variance is estimated from the data, rather than [as in the
binomial or Poisson families] fixed at a theoretical value)



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