* to my knowledge the TMB package would be the most
straightforward/modern way to fit GNLMMs in R, but you would have to
figure out how to write the TMB code.
On 2019-02-10 4:50 a.m., Rolf Turner wrote:
It is not clear to me from the help file whether the nlmer() function
from the lme4 package can be used to fit non-linear mixed models when
the response has a discrete distribution, in particular a binomial
distribution. I'd like to fit a mixed binomial model in which the
success probability *cannot* be expressed as "linkinv(linear predictor)"
where "linkinv()" is the inverse of one of the "standard" link functions
(logit, probit, or cloglog) and the linear predictor is linear in the
model parameters, but has to be expressed as a more complicated
non-linear function of the parameters and the predictors.
If it is possible, how should the response appear in the formula? Should
it be given in the form
cbind(successes,failures) ~ ... ?
And how should the non-linear function be structured so as to
accommodate the two-column nature of the response?
I *might* be able to figure all this out by experimenting, but the range
of possible wrong approaches and wrong garden paths down which to lead
myself kind of overwhelms me.
So I thought I'd ask here and maybe save myself a bit of time. :-)
Rolf Turner
P. S. It's quite possible that my question makes no real sense at all.
If so, please feel free to tell me so, but a bit of elaboration as to
why would be appreciated.
R. T.