Dear Stata Users,
I am running a regression through the lasso command in Stata 16. My aim is to use a data-driven approach to find a more parsimonious model.
This is the command
. lasso logit event1 (ib1.ukborn ib1.sex c.agen ib1.educ2) i.tenure3 i.save i.contr2 i.finnow2 i.finfut i.tercile i.means_ben
> efits22 [iw=weightres4] if agen>29&agen<36&tercile<6&jbstat!=7&evunion==2&ten ure3<4&save<2&finfut<4&finnow2<4&mach2!=., selectio
> n(adaptive)
These are the two first lines of the output.
Lasso step 1 of 2:
note: 2.ukborn dropped because it is constant
note: 2.educ2 dropped because it is constant
I do not understand why the levels of these variables, which should be forced to be in the model,are dropped.
They are generally estimated by logit regressions (without lasso).
Thank you in advance.
Lydia
Related Posts with Forced variables dropped when using lasso
Interval regression with fixed effectsI'm looking for a command that implements interval regression with fixed effects and does not necess…
Nearest matching (without replacements)Hi everyone, I have the following dataset for which I need to do a 1-by-1 match of companies (wo re…
Reporting observations and adj R^2 at the end of the table using outreg2Hi, I am using outreg2 to get the regression output. But outreg2 report results the following way. …
Pre and post treatmentHello, I have done RCT random assigned to treatment A and B and follow at 1 and 2 months. I want to …
Summing Variable accounted missing valuesDear Statalist, hope everyone is in good health I want to sum x and y variable in STATA by followin…
Subscribe to:
Post Comments (Atom)
0 Response to Forced variables dropped when using lasso
Post a Comment