[R] writing a package for generalized linear mixed modesl

ripley@stats.ox.ac.uk ripley at stats.ox.ac.uk
Mon Apr 1 18:18:06 CEST 2002

On Mon, 1 Apr 2002, Jason Liao wrote:

> Happy new month, everyone!
> I am planning to write a NIH grant proposal to study ways to speed
> Monte Carlo based maximum likelihood algorithm for hierarchical models
> with a focus on generalized linear mixed models (GLM with random
> effects). I thought it would be nice and also increase the chance of
> funding if I could produce an R package in the process. I understand
> that Prof. Pinheiro ang Bates have produced LME for linear mixed models
> and NLME for non-linear mixed models. But these do not fit logistic
> mixed models or Poisson mixed models. SAS Proc NLMIXED can fit simple

GLME (beta, S-PLUS only) does.

> logistic or Poisson mixed models but the syntax is not specific for
> generalized mixed models. There can be only one level of random
> effects. STATA version 7 can fit random intercept models but not more.
> There are also some standalone programs such as MIXOR by Don Hendeker
> of Chicago. But it is hard to use a stnadalone program for data
> analysis efficiently because you have to convert the data set and you
> lose all the familiar tools for data transformation and graphics.
> I would appeciate your comments on the following points:
> 1. Is there a strong need for a package for generalized linear mixed
> models? Could someone have already written or in the process of writing
> one?

See package GLMMgibbs on CRAN, function glmmPQL in package MASS and
function glmm (only a random intercept) in one of Jim Lindsey's packages.

GLMMs are half a chapter in the upcoming fourth edition of Venables &

> 3. How big is the undertaking? I have some R code for GLMM that runs at
> an acceptable speed. I can see that some part can benifit from
> converting to C or Fortran. I am not familiar with R's interface with C
> and Fortran. I do not know either how to make the package available for
> different platforms. Will the multi-platform issue become easier if I
> stay with 100% pure R?

100% pure R would be unacceptably slow.

I would rate this as a research problem, and a major undertaking.
GLMMgibbs is an existence proof, but not able to handle many quite simple

Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272860 (secr)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

r-help mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html
Send "info", "help", or "[un]subscribe"
(in the "body", not the subject !)  To: r-help-request at stat.math.ethz.ch

More information about the R-help mailing list