What are the variables in $idemographics? I get the error r(198) when I use the same datset, saying that: "depvar may not be specified in (alwaysvars) othervars"
Yes, you will get an error with that command because variable q104 is included in the variable list vlcontinuous. You can issue *vl drop (q104), system* to drop this variable from the system-defined variable lists, then re-run the *lasso linear* command. You can also type *help lasso* and view the PDF documentation; there you will see fully worked examples that you can reproduce in your copy of Stata.
After using the *lasso* command, you can use the *lassocoef* command to display the selected variables. Please type *help lassocoef* to learn more and feel free to email us at tech-support@stata.com for any other questions.
Nice lecture! If you have time to answer - why are my CVPLOT and COEFPATH plots "inverted" when compared to yours? So, my CVPLOT increases on the side of smaller lambda?
It sounds like you specified the *xunits(lnlambda)* option for *cvplot* -- this option plots the CV function as lambda increases. If you have any other questions, please email us at tech-support@stata.com with more details about the commands you used.
@@statacorp Many thanks for your prompt answer! Interestingly, CV function is actually higher at lower lambda whichever way the graph is oriented. As suggested, I will send a query to STATA tech support
Please email our team at tech-support@stata.com with the list of commands you are using, and if possible, a copy of the dataset you are using and we will be happy to help.
Currently, *lasso* does not support ordinal dependent variables. If you have any other questions, please email us at tech-support@stata.com and someone will be happy to answer them.
Hi everyone, I have been trying to conduct a similar analysis but the command does not read my dummy variable group, keeps returning error 111 or 2000, any ideas oon what might be wrong?
The return code 111 indicates that the variable does not exist. This may be due to a typo. The return code 2000 indicates that there are no observations. You can email us at tech-support@stata.com with a copy of the data you're using and the commands you are running and we'll be happy to take a look.
No, our lasso tools were introduced in Stata 16. You can contact tech-support@stata.com and someone on our Technical Services team may have other options for you.
What are the variables in $idemographics? I get the error r(198) when I use the same datset, saying that: "depvar may not be specified in (alwaysvars) othervars"
Yes, you will get an error with that command because variable q104 is included in the variable list vlcontinuous. You can issue *vl drop (q104), system* to drop this variable from the system-defined variable lists, then re-run the *lasso linear* command. You can also type *help lasso* and view the PDF documentation; there you will see fully worked examples that you can reproduce in your copy of Stata.
Will there be bias in the results if you do this but without specifying if variables are categorical or continous?
so how do I know what is the model selected by LASSO? Like
what is the empirical specification?
After using the *lasso* command, you can use the *lassocoef* command to display the selected variables. Please type *help lassocoef* to learn more and feel free to email us at tech-support@stata.com for any other questions.
Nice lecture! If you have time to answer - why are my CVPLOT and COEFPATH plots "inverted" when compared to yours? So, my CVPLOT increases on the side of smaller lambda?
It sounds like you specified the *xunits(lnlambda)* option for *cvplot* -- this option plots the CV function as lambda increases. If you have any other questions, please email us at tech-support@stata.com with more details about the commands you used.
@@statacorp Many thanks for your prompt answer! Interestingly, CV function is actually higher at lower lambda whichever way the graph is oriented. As suggested, I will send a query to STATA tech support
Great explanation thanks 🙏
Hi. I am a student I need some help for performing Stata task
When I run the lasso linear command, I get an error saying no observations. Can you explain why this happens?
Please email our team at tech-support@stata.com with the list of commands you are using, and if possible, a copy of the dataset you are using and we will be happy to help.
Thank you! Can we use it with clm models? (Ordinal regression)
Currently, *lasso* does not support ordinal dependent variables. If you have any other questions, please email us at tech-support@stata.com and someone will be happy to answer them.
@@statacorp thank you!
Dear StataCorp LLC, can you teach me how I set Lasso regression in Stata?
Does that also apply to VARs?
Hi everyone, I have been trying to conduct a similar analysis but the command does not read my dummy variable group, keeps returning error 111 or 2000, any ideas oon what might be wrong?
The return code 111 indicates that the variable does not exist. This may be due to a typo. The return code 2000 indicates that there are no observations. You can email us at tech-support@stata.com with a copy of the data you're using and the commands you are running and we'll be happy to take a look.
Why is $idemographics put in a parenthesis?
When I enter the "if sample =1" condition it gives me "invalid syntax" error message
typical. You should use "=="
Does this work for stata 13.0????
No, lasso was introduced in Stata 16.
can I use lasso regression in stata13??
No, our lasso tools were introduced in Stata 16. You can contact tech-support@stata.com and someone on our Technical Services team may have other options for you.
great! Thanks
Pro tip: watch movies at Kaldrostream. I've been using them for watching a lot of movies these days.
@Messiah Ben yea, been watching on KaldroStream for months myself :D
@Messiah Ben yea, I've been using kaldrostream for months myself :D