[R] Direct (null) hypothesis testing using GLMMs - possible?

Ben Bolker bbolker at gmail.com
Wed Nov 27 00:27:55 CET 2013


Tomer Czaczkes <Tomer.Czaczkes <at> biologie.uni-regensburg.de> writes:

> 
> Dear Forumites,
> 
> Hi, I'm a long time eavesdropper, first time poster, but I simply couldn't
> find any answer to this perhaps rather naive question:
> 
> I am trying to see if my data is significantly different from a null
> hypothesis using GLMMs.
> 
> I would like to run a GLMM because I have random effects. In the future I
> might want to do a similar thing with a non-Gaussian distribution structure
> as well.

  That could be considerably more difficult. There is some literature on
non-Gaussian random effects, but you'd probably have to write your own mixed
model code in AD Model Builder or WinBUGS/JAGS/Stan.

> In my current example, I have a series of proportions - in this case the
> proportion of ants on one of two available paths. My null-hypothesis is 0.5:
> that the ants choose a path randomly, so there will be a more or less amount
> of ants on both paths at any given time.
> The only way I could think of doing this would be to make a dummy dataset
> with a mean of 0.5 and a reasonable variance, put both the dummy data and
> real data into one dataframe, and test whether data type (dummy or real) is
> a significant predictor of "proportion of ants choosing side X".
> 
>  Is there any more elegant way of doing this with a GLMM? Alternatively, can
> anyone suggest an alternative way to do such a thing? I will want to add
> interactions to the model as well. I generally use the LME4 package, and the
> lmer function.
> 
> Many thanks for you attention, and I hope my first foray into forum-posting
> wasn't hopelessly naive or misplaced...
> 
> Tommy

  Well, it's a little bit misplaced (in general questions about mixed
models are better off on r-sig-mixed-models at r-project.org), but actually
your question is not specific to GLMMs, but applies more generally to
generalized linear models (without the mixed part).

  If you have binomial data (i.e. you know the total number, as well
as the proportion), and if you use a symmetric link function (such as
the default logit, or the probit) then an estimated intercept of 0
corresponds to a probability of 0.5, and so the hypothesis test of
intercept=0 corresponds to a test against the null hypothesis that
the probability is 0.5.

  Hope that helps.



More information about the R-help mailing list