Skip to content
Prev 59921 / 398502 Next

help with glmmPQL

Hi, Deepayan: 

      Thanks much.  That's very helpful. 

ANDREW:  How difficult would it be for you to generate a Monte Carlo to 
simulate data according to your two models, e.g., "y ~ trt" and "y ~ trt 
+ I(week > 2)"?  If you did that, you could then fit both models to each 
set of simulated data, and compute and store logLR <- 
fit2$logLik-fit1$logLik for each one.  This will give you a reference 
distribution, from which you can estimate both the p-value and the 
statistical power of this analysis against your chosen alternatives. 

      If you do that, I suggest you use "GLMM" in library(lme4), not 
glmmPQL.  The "logLik" produced by glmmPLQ for model 2 was LESS THAN 
that for model 1.  If the function were maximizing the likelihood, 
fit2$logLik should be greater than fit1$logLik, not less. 

      Of course, of you simulate both models and compute the 
distribution of your favorite test statistic, you can get a p-value that 
is as good as your simulation.  I've done this kind of thing before, and 
it should be relatively easy in R using rnorm and rbinom. 

      hope this helps. 
      spencer graves
Deepayan Sarkar wrote: