I am trying to use glmmLasso
to run a multilevel logistic regression model, as I believe I am getting some wonky results due to sparse data bias. My outcome variable is a binary (0, 1) variable and my grouping variable is ID. Here is my code:
m1 <- glmmLasso(outcome ~ c.AGE + c.BSS + c.negative.emotion +
c.PSI_Total + c.MEPS_Ratio + c.OTT_Ratio + c.AAQ_Total +
c.BHS_Total, rnd=list(ID=~1 + c.negative.emotion),
lambda=100, data=data.set.3, family=binomial(link="logit"))
This is the error I am receiving:
Error in grad.lasso[b.is.0] <- score.beta[b.is.0] - lambda.b * sign(score.beta[b.is.0]) : NAs are not allowed in subscripted assignments In addition: Warning message: In Ops.factor(y, Mu) : ‘-’ not meaningful for factors
I am unsure why I am getting this error. I did see another post about this error on StackOverflow but I was unable to use the fix for my data. There are no NA
s in the dataset. I've attached the dataset in CSV format here.