## Question

GLM/GLMNET Multinomial/Binomial error

Professor,

When I run my NYSE data through Option 2 of Logistic Regression: Regularized LR, I receive an error stating...

#Error in lognet(x, is.sparse, ix, jx, y, weights, offset, alpha, nobs, :

#one multinomial or binomial class has 1 or 0 observations; not allowed

I understand that I am getting the error because the NYSE data has columns of just 0 or 1 (Volume and DV).

How are we supposed to run the GLMNET on data that we know has 0s and 1s that are important to the final outcome?

yTEST, yTRAIN, yTRAINbig, yVAL are all large factors

the piece of code I am running is: LR.2 <- glmnet(x=data.matrix(BasetableTRAIN),y=yTRAIN,family='binomial')

Thanks

## Answers and follow-up questions

** Answer or follow-up question 1**Dear student,

Make sure to do a search on the questions on the site before posting.

I've answered this question yesterday:

http://www.ballings.co/qa/question.php?nbr=68

Let me know if you need more explanations.

Thanks,

Michel Ballings

Sign in to be able to add an answer or mark this question as resolved.