[R-sig-ME] "General" (non-Bernoulli) binomial models in GLMMadaptive.

Rolf Turner r@turner @end|ng |rom @uck|@nd@@c@nz
Sun Aug 4 11:00:55 CEST 2019

I am just now launching forth into the use of the GLMMadaptive package.

As far as I can discern, from reading the help for mixed_model() and the 
vignette GLMMadaptive_basics, the package can only fit *Bernoulli* 
models in the binomial() family.  Is my reading correct?  Will more 
general binomial models be added in the future?

The only way that I can see as of the present, to fit a general model, 
is to replicated each row of the relevant data frame "nsucc"  and 
"nfail" times (where "nsucc" and "nfail" are the respective numbers of 
successes and failures corresponding to the given row).  The y-value 
corresponding to each of the "nsucc" replicates would be 1 and that 
corresponding to each of the "nfail" replicates would be 0.

While this strategy is, I guess, perfectly do-able, it seems to me to be 
somewhat wasteful and could lead to a data frame of unwieldy size if the 
numbers of trials in the original data were at all large.

My other thought was to take y to be the *proportion* of successes and 
set a weights argument equal to the number of trials (as one can 
apparently do with glm() --- I've never actually tried this!).  However 
it seems that mixed_model() does not have a "weights" argument.

Advice gratefully received.



Added in press ( :-) ): I have just discovered that mixed_model() in the 
"development version" of GLMMadaptive, on github, *does* have a weights 
argument. I shall now install the development version and experiment.

I would however still appreciate comments and advice.  E.g. will the 
weights argument in mixed_model() work in the way that I am hoping?  Is 
this the recommended approach to fitting a "general" binomial model?



Honorary Research Fellow
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276

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