Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to prevent elasticnet from generating postselection coefficients entirely?

    Hello,

    I am trying to fit a regularized logistic regression via `elasticnet logit`. My data has ~14000 observations and ~60 features. Some features may be colinear with each other. I do not have the domain expertise to properly handle these collinearities myself, I am relying on the ability of the software to handle them automatically.

    When fitting a ridge regression with cross-validation, by setting `alpha(0)`, I see the error `error in postselection b`. This error has arisen on the forum a couple times before (here and here), with no solution offered other than to try a different alpha/lambda selection approach. I would not like to try a different selection approach, as there is no reason why cross-validation cannot work for my use case.

    From searching around, I understand that "postselection" probably refers to the "postselection coefficients," which are the results of fitting an unregularized model only on the features chosen by lasso/elasticnet. However, when using ridge regression, which in general does not exclude any features, there would be no difference between the postselection model and an unregularized model. And when there are collinearities among the features, of course an unregularized model will not be able to be fit properly.

    So my question is: How can I avoid elasticnet generating these postselection coefficients? I have no use for them, and the attempt at their generation throws an unnecessary error which prevents me from using a completely legitimate model

  • #2
    One other thing I should mention (apologies, can't appear to edit) is that, in addition to the collinearities, I think the data may be linearly separable given the features in place. Which is why I need regularization and why postselection estimates fail. I know in this case the solution is usually to just do a better job with feature engineering, but unfortunately I do not have the privilege to do that in this instance, hence my reliance on regularization

    Comment

    Working...
    X