Hello everyone,

I try to loop a lasso regression but I do not know how to store the beta coefficients.

I use the the command -lasso2- from SSC.

The loop looks like this:

Code:
forvalues i = 1(1)10 {
                lasso2 y x1 x2 x3 x4 if time < `i', lic(bic) postres
        }
I tried to use the answer from the following post, but it seems not to work for the command -lasso2-: https://stackoverflow.com/questions/...e-coefficients

Best regards,
Steven