I am conducting a prediction where I have a dummy variable on the LHS and several interacted variables on the RHS. For selecting good predictors, I am using the 'lasso probit' command.
Is there a way to estimate the Average Marginal Effects of the individual RHS variables?
I tried the following:
But here, I encounter the problem that some variables that LASSO selects are dropped due to the existence of singleton observations. I would appreciate any help with this!
Is there a way to estimate the Average Marginal Effects of the individual RHS variables?
I tried the following:
Code:
lasso probit y i.X1##i.X2##c.X3 if sample==1 predict y_hat local vars=e(allvars_sel) probit y`vars' if sample==1 margin, dydx(*) post