I am brand new to LASSO. I have a problem in that I have a data set without about 440 usable cases only about 42 of them of one level of the DV (every level of the DV and predictor have two levels). I have 39 predictors and my understanding of logistic regression is that is simply too many for only this many cases. But I have had trouble using LASSO (or I am not sure I can use it anyhow given what I encountered). This is in SAS, I don't know R well enough to do this in that code. I split the total data set into two pieces one to choose the variables with lasso and a second to run the selected variables. There are about 230 usable cases for each data set about 10 percent at one level of the DV in each. The SAS code (I can not send the data because I work for a state agency) is:
ODS graphics on;
proc glmselect data=randomdata plots=all;
partition fraction(validate=.3);
class pd1 pd2 pd3 pd4 pd5 pd6 pd7 pd8 pd9 pd10 pd11 pd12 pd13 pd14 pd15 pd16 pd17
pd18 pd19 pd20 pd21 pd22 pd23 pd24 pd25 pd26 pd27 pd28 pd29 pd30 pd31 ;
model dvd = pd1 pd2 pd3 pd4 pd5 pd6 pd7 pd8 pd9 pd10 pd11 pd12 pd13 pd14 pd15 pd16 pd17
pd18 pd19 pd20 pd21 pd22 pd23 pd24 pd25 pd26 pd27 pd28 pd29 pd30 pd31
/ selection=lasso(stop=none choose=validate);
run;
proc glmselect data=randomdata plots=all;
partition fraction(validate=.3);
class pd1 pd2 pd3 pd4 pd5 pd6 pd7 pd8 pd9 pd10 pd11 pd12 pd13 pd14 pd15 pd16 pd17
pd18 pd19 pd20 pd21 pd22 pd23 pd24 pd25 pd26 pd27 pd28 pd29 pd30 pd31 ;
model dvd = pd1 pd2 pd3 pd4 pd5 pd6 pd7 pd8 pd9 pd10 pd11 pd12 pd13 pd14 pd15 pd16 pd17
pd18 pd19 pd20 pd21 pd22 pd23 pd24 pd25 pd26 pd27 pd28 pd29 pd30 pd31
/ selection=lasso(adaptive stop=none choose=validate);
run;
ods graphics off;
When I run this code I notice two warnings.
WARNING: The adaptive weights for the LASSO method are not uniquely determined because the full least squares model is singular.
and then in the Output:
Selection stopped because all candidate effects for entry are linearly dependent on effects in the model.
And the logistic regression I tested against the reduced data base gets the following warning:
There is a complete separation of data points. The maximum likelihood estimate does not exist.
I am not using this half of the data to estimate any regression just to choose variables with lasso/adaptive lasso. I use the other half of the original data held out and the list of variables to run logistic regression and ran into no issues of any kind. But I don't know if its valid to use the variables selected by lasso/adaptive lasso when you run into this issue - that is will lasso and adaptive lasso work when these issues occur.