Quantcast
Channel: Active questions tagged r - Stack Overflow
Viewing all articles
Browse latest Browse all 205343

glmmLasso R Error:Error in grad.lasso[b.is.0]

$
0
0

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 NAs in the dataset. I've attached the dataset in CSV format here.


Viewing all articles
Browse latest Browse all 205343

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>