Announcement

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

  • Get R-squared measure from IVLASSO

    Hello,

    I'm using IVLASSO command to estimate a model. Is it possible to get R-squared measure from the command? I checked the help file but could't find how to get R-squared of the estimated model. I'd appreciate it a lot if anyone can help!

    Thanks!
    Jiajing

  • #2
    Dear Jiajing,

    R-squared is seldom used in regards to a Lasso regression (for more on this I would suggest looking at https://stats.stackexchange.com/ques...g-lasso/350486). You can compare different model using various selection criteria such as BIC.

    Kind regards,
    Jordan

    Comment


    • #3
      Originally posted by Jordan Sydenham View Post
      Dear Jiajing,

      R-squared is seldom used in regards to a Lasso regression (for more on this I would suggest looking at https://stats.stackexchange.com/ques...g-lasso/350486). You can compare different model using various selection criteria such as BIC.

      Kind regards,
      Jordan
      Dear Jordan,

      Thanks for reply! I read the link, it's helpful. Now I see that R-squared is not a good measure here. But could you tell me how to get measure of BIC or cross-validated R squared from LASSO? Thanks!

      Regards,
      Jiajing

      Comment


      • #4
        I agree that R-squared is (usually) not a very meaningful or relevant measure in this context, but for different reasons.

        Jordan makes the point that R-squared should not be used to select a model (see the Stackexchange link). This is of course true -- not just for the lasso but generally. Model selection based on R-squared would lead to over-fitting: high in-sample fit but poor out-of-sample prediction performance. If you include more predictors into your model, R-squared will increase, even if the added predictors have no predictive power.

        But: Jiajing is not trying to select a model for prediction. He is using ivlasso to select optimal instruments in a structural model. As with prediction, adding too many instruments is problematic (inflated first-stage F statistic and bias). Fortunately, the approach put forward by Belloni, Chernozhukov, Hansen & Chen (2012, Econometrica) and implemented in ivlasso takes care of this: the tuning parameter of the lasso is chosen to control over-fitting. (More details in our Working Paper here: https://arxiv.org/abs/1901.05397)

        Now, Jiajing is asking for the R-squared of either the first stage or the structural equation. Unfortunately, ivlasso doesn't report these, but you could calculate the R-squared manually. One way would be to run the model selected by ivlasso in ivreg2 which reports R-squared for IV models.

        On Jiajing's last question: The BIC is reported by lasso2.

        I hope this helps.
        http://statalasso.github.io/

        Comment


        • #5
          Originally posted by Achim Ahrens View Post
          I agree that R-squared is (usually) not a very meaningful or relevant measure in this context, but for different reasons.

          Jordan makes the point that R-squared should not be used to select a model (see the Stackexchange link). This is of course true -- not just for the lasso but generally. Model selection based on R-squared would lead to over-fitting: high in-sample fit but poor out-of-sample prediction performance. If you include more predictors into your model, R-squared will increase, even if the added predictors have no predictive power.

          But: Jiajing is not trying to select a model for prediction. He is using ivlasso to select optimal instruments in a structural model. As with prediction, adding too many instruments is problematic (inflated first-stage F statistic and bias). Fortunately, the approach put forward by Belloni, Chernozhukov, Hansen & Chen (2012, Econometrica) and implemented in ivlasso takes care of this: the tuning parameter of the lasso is chosen to control over-fitting. (More details in our Working Paper here: https://arxiv.org/abs/1901.05397)

          Now, Jiajing is asking for the R-squared of either the first stage or the structural equation. Unfortunately, ivlasso doesn't report these, but you could calculate the R-squared manually. One way would be to run the model selected by ivlasso in ivreg2 which reports R-squared for IV models.

          On Jiajing's last question: The BIC is reported by lasso2.

          I hope this helps.
          Hi Achim,

          Thanks for your detailed explanation! I'll try to get R squared from ivreg2.

          Comment

          Working...
          X