I've got a non-linear model that I've been applying to some data of repeated binary outcomes. I have data for multiple years, and I'd like to add random effects (by year) for two of my parameters. Looking at the lme4 package in R, it seems that it supports non-Gaussian error structure and nonlinear models, but not simultaneously. Is there a way around this, or another package I could be using? I hear ADMB has a steep learning curve, so I'd prefer not to tackle that.
Without random effects, my model is quite simple--only 4 parameters and I've been able to fit it using a formula call to the mle2 function from the bbmle package.
glmer()would be appropriate, withfamily=binomial. "Survival data" outcomes are usually time-to-event, which wouldn't be binary. – guest Mar 8 '12 at 6:15glmerrequired a linear formula but perhaps I've misunderstood the differences betweenglmerandnlmer. – shujaa Mar 8 '12 at 18:08glmer()requires a linear formula but you get to pick the link function, and to use multiple terms in the linear formula, so there is considerable flexibility - but it won't fit everything. Other non-SAS alternatives are i) to write your own R code that integrates the random effects out of the likelihood, then maximizes ii) use WinBUGS/JAGS. – guest Mar 10 '12 at 19:28