Tell me more ×
Cross Validated is a question and answer site for statisticians, data analysts, data miners and data visualization experts. It's 100% free, no registration required.

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.

share|improve this question
2  
What's binary survival data? Do you mean repeated binary outcomes? (In which case glmer() would be appropriate, with family=binomial. "Survival data" outcomes are usually time-to-event, which wouldn't be binary. – guest Mar 8 '12 at 6:15
@guest, yes, I do mean repeated binary outcomes. I was under the impression that glmer required a linear formula but perhaps I've misunderstood the differences between glmer and nlmer. – shujaa Mar 8 '12 at 18:08
1  
glmer() 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

1 Answer

up vote 1 down vote accepted

It seems this is not possible in R; in thelme4 you can pick any two of {nonlinear, mixed effects, binomial error error distribution}, but not all three. A potential alternative is to use SAS, (this guide gives some examples. I'll post updates later if successful.

share|improve this answer
Only update is that I decided that I had enough data to call the error distribution normal, and lme4 works just fine for that. – shujaa May 23 '12 at 22:07

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.