Dear STATA users,
Sorry to ask you 3 simple questions.

1.When we used lassopack for selecting predictors, if the predictor is a categorical variable, should we just put it in the code, or add "i." before the variable?

Should we use these code:
lasso2 AO agec i.sex i.edu3 i.jobm i.incomef i.snec i.dnec1 , plotpath(lambda)
cvlasso AO agec i.sex i.edu3 i.jobm i.incomef i.snec i.dnec1 , lopt seed(123)

Or these code:
lasso2 AO agec sex edu3 jobm incomef snec dnec1 , plotpath(lambda)
cvlasso AO agec sex edu3 jobm incomef snec dnec1 , lopt seed(123)

2. Must we use cvlasso to select the predictors?
When we finished the lasso2 code and at the bottom of the results, there is a explanation "Type "lasso2, lic(ebic)" to run the model selected by EBIC.


My question is which one should be based for model selection? EBIC or Lambda?

3. After we run the lasso code and get the final model, the p values for some predictors are more than 0.05, is it ok?



Many thanks and best wishes!
Jing Pan