I'm new to this site and also completely inept at statistics and R currently.
I'm working on a project where I'm trying to determine significant predictors of growth in a multivariate model. It's been suggested to me to use Lasso Regression due to my sample size and needs, and I learned how to do Lasso in R. I am hoping to get AICc values to determine significance of predictors in the best fit model from the regression.
I saw a post on here (which I can't comment on yet) detailing how to get AICc from glmnet models. I ran into an error following the steps laid out in that post. This is what I entered and the error returned:
> fit0 = glmnet(x0, y0, family = "multinomial")
Error in lognet(xd, is.sparse, ix, jx, y, weights, offset, alpha, nobs, :
one multinomial or binomial class has 1 or 0 observations; not allowed
y0 is my response data which is 82 observations, and x0 is a data matrix of 82 data points each for 14 predictor variables. I verified that the data was entered correctly. Can someone explain this error message to me? Is this method of calculating AIC incompatible with Lasso Regression models? If so, any alternatives?
For reference, this was the rest of the script for calculating AICc from glmnet:
fit <- glmnet(x, y, family = "multinomial")
tLL <- fit$nulldev - deviance(fit)
k <- fit$df
n <- fit$nobs
AICc <- -tLL+2*k+2*k*(k+1)/(n-k-1)
AICc
I'm assuming it's a simple fix but I'm at a loss of where to go to get answers since I'm a complete novice. Help is appreciated