Announcement

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

  • Split Sample for Lasso using Cross Validation?

    Dear Statalist members,

    I am bulding a model using Lasso and Elastic Net. To compare the predictive performance of both models, I split the sample randomly into an training and validation set using
    Code:
    splitsample, generate(svar) nsplit(2) cluster(pid) split(0.6 0.4) rseed(123)
    Now my superviser asked me, why I don´t use cross validation to asses the performances. Actually, my answer would be that I do not see the need for it.
    My questions:
    Is it possible to generate an indicator variable for the two samples using cross valdation? (Somehow this contradicts my understanding of the topic)
    If it is possible: is it necessary and would there be a problem with using cross validation for the sample split and then cross validation for selecting the optimal tuning parameter?

    I´d highly appreciate your advice in this regard.

    Best
    Franziska
Working...
X