[R-sig-ME] Binomial generalised linear mixed model using JuliaCall.
Rolf Turner
r.turner at auckland.ac.nz
Wed Apr 18 02:16:34 CEST 2018
Hi all.
I seem to have managed (not quite sure how! :-) ) with considerable
assistance from the maintainer of the JuliaCall package, to get that
package running.
I am however having a struggle to figure out how to fit the sort of
model that I am interested in. The vignette that Doug Bates provided a
while back gives an example of fitting a linear mixed model, and I have
managed to reproduce that example. (My results differed from those that
Doug's vignette showed, ever so slightly in the values of some of the
variance components, but I'm not going to worry my pretty little head
about that.)
Now I want to proceed to my "real problem" which is to fit a
*generalised* linear mixed model, of the binomial persuasion, and I
cannot find my way to documentation on how to do this.
The syntax for the sort of fit that I want would be, in the glmer()
context, of the form:
fit <- glmer(cbind(Dead,Alive) ~ (Trt+0)/prd + (prd | Rep),data=Dat,
family=binomial(link=logit))
where "Trt" is a factor (fixed effect), "prd" is a numeric predictor,
and "Rep" is a factor (random effect).
Can anyone instruct me (in very simple terms please, I'm slow!) as to
what the analogous syntax would be using the MixedModels package in
Julia? Or point me at an elementary tutorial on doing this?
I have the impression, from one item that I saw on StackExchange, that
MixedModels doesn't really handle general binomial models, only
Bernoulli models. Consequently one has to expand out one's data set
creating one row for each success ("Dead" in my case) and one row for
each failure ("Alive"). Is this correct, or is there an easier way to
go about it?
Thanks for any words of wisdom.
cheers,
Rolf Turner
Technical Editor ANZJS
Department of Statistics
University of Auckland
Phone: +64-9-373-7599 ext. 88276
More information about the R-sig-mixed-models
mailing list