1
$\begingroup$

I'm working with the epilepsy data set from Applied Longitudinal Analysis by Fitzmaurice et al. (http://www.hsph.harvard.edu/fitzmaur/ala/epilepsy.txt). In this trial, 59 patients are split into a control and treatment group and followed for 8 weeks. A baseline measure of the amount of seizures in the prior 8 weeks before the study is also available. I'm interested in the effect of Progabide on the amount of seizures at the end of 8 weeks. I have fit the following random effects model using the lme4 package:

red <- glmer(Counts ~ 1 + offset(l.offset) + Progabide + base.nah + Progabide*base.nah + (1|ID) + (base.nah|ID), family=poisson, data=grouped).

This model works and gives me very similar results to the case study in the textbook. However, subject 49 is an outlier/anomaly so I try to fit the model:

red.49 <- glmer(Counts ~ 1 + offset(l.offset) + Progabide + base.nah + Progabide*base.nah + (1|ID) + (base.nah|ID), family=poisson, data=grouped[grouped$ID!=49,]).

All I have done is taken out subject 49 and have not changed or edit the covariates in any way. However, when I run this new model, I get the following error:

Warning messages: 1: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : unable to evaluate scaled gradient 2: In checkConv(attr(opt, "derivs"), opt$par, ctrl = control$checkConv, : Model failed to converge: degenerate Hessian with 1 negative eigenvalues

I'm not sure why I am getting this error when I haven't really changed anything. I've looked at different solutions on here and through google, but none seem to resolve my issue. Do you have any insight on this?

Code for MWE:

library(lme4)
library(nlme)
epi <- read.table('http://www.hsph.harvard.edu/fitzmaur/ala/epilepsy.txt', header=FALSE)
names(epi) <- c('ID', 'Progabide', 'Age', 'Prev.8wks', '2wk','4wk','6wk','8wk')
long.ID <- rep(epi$ID, each=5)
long.Pro <- rep(epi$Progabide, each=5)
long.Age <- rep(epi$Age, each=5)
counts <- epi[,c(4:8)]
long.counts <- c(t(counts))
times <- rep(c(0,2,4,6,8), 59)
frame <- data.frame(ID = long.ID, Progabide = long.Pro, Age = long.Age, Week = times, Counts = long.counts)
grouped = groupedData(Counts ~ Progabide | ID, data = frame)
grouped$offset <- rep(c(8,2,2,2,2),59)
grouped$l.offset <- log(grouped$offset)
grouped$base.nah <- rep(c(0,1,1,1,1), 59)
red <- glmer(Counts ~  1 + offset(l.offset) + Progabide + base.nah + Progabide*base.nah + (1|ID) + (base.nah|ID), family=poisson, data=grouped )
grouped.49 <- grouped[grouped$ID!=49,] 
red.49 <- glmer(Counts ~  1 + offset(l.offset) + Progabide + base.nah + Progabide*base.nah + (1|ID) + (base.nah|ID), family=poisson, data=grouped.49)
## for some reason, not working
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.