Wednesday, June 2, 2021

lasso relative importance of covariates to response variable

Has anyone worked out yet how to graph the relative importance of covariates selected after running the Stata lasso command? Example data is below:

Code:
webuse auto
set seed 1234
lasso linear mpg i.foreign i.rep78 headroom weight turn gear_ratio price trunk length displacement
lassocoef

No comments:

Post a Comment