I run a lasso for inference model using double selection:
dsregress depvar i.variable_of_interest1 i.variable_of_interest2, controls($cont i.($cat)) rseed(12345)
And store the estimates:
estimates store ds_plugin
I can look at the controls selected for the dependent variable:
lassocoef(ds_plugin, for (dapvar))
What I would like to do is look at the controls selected for the variables of interest - so at the moment I am writing:
lassocoef(ds_plugin, for (variable_of_interest1))
However I get an error with this:
can not find result for variable_of_interest1
r(111)
I am inputting the same code as in the lasso manual so am unsure why it is not working for me. If anyone could explain that would be really helpful
Related Posts with How to get controls selected for the variables of interest using lasso for inference
Tests for regression analysis (panel data)Hello, I'm analysing the effect of R&D expenditure on firm's ESG score and the moderating effec…
Store mean of many variables in a new fileHello, everyone! Suppose there are v1, v2, v3, t1, t2 five variables, now I want to calculate mean …
Select a certain number of variables from .dat fileHello everyone, I have a big .dat file that makes my laptop freeze every single time that I try to …
SEM - reporting results estimate store - esttabGood morning, how I can store and report results in sem? Usually, I work with estimates store [...] …
Extract numbers and stringsHello, I am wondering if there is a way in Stata where you can extract both numbers and strings. I w…
Subscribe to:
Post Comments (Atom)
0 Response to How to get controls selected for the variables of interest using lasso for inference
Post a Comment