Skip to content
Prev 6069 / 20628 Next

using hglm to fit a gamma GLMM with nested randomeffects?

On Wed, 18 May 2011, Benjamin Caldwell wrote:

            
I would say so, but not using the formula interface ie you would have to 
specify the Z matrix.
This is coming from model.matrix.default AIUI, which does not understand 
the "/" operator.  But anyway,

#
# mother is nested in community
#
library(mlmRev)
data(guImmun)
hglm(fixed= immun=="Y" ~ kid2p + mom25p + ord, random=~ 1|mom + 1|comm,
      data=guImmun, family=binomial())
Error in hglm.formula(fixed = immun == "Y" ~ kid2p + mom25p + ord, random 
= ~1 |  :
   Currently only one random term is supported.


If I just fit ~1|mom, it runs an awfully long time
This should work.  Is there missing data [not being handled correctly]? 
Maybe try data=subset(rws30.BL, complete.cases(post.f.crwn ...


Just 2c, David Duffy.

PS Another alternative, which will definitely work, is to use BUGS.