Estimating the average marginal effects of a mixed logit within Apollo's post-estimation functions?
Posted: 21 May 2020, 22:47
Hello,
I was hoping for some guidance in estimating average marginal effects for the coefficients of a mixed logit. I was able to follow the instructions in the manual and a few of the posted examples to estimate average marginal effects for a multinomial logit, but am unable to determine how to apply Apollo's post-estimation functions to estimate the AMEs of a mixed logit.
The Procedure:
For each parameter, I will need to define the distribution of the respective betas according to the regression outputs (i.e., using the estimated mean and standard deviation) then draw N betas from said distribution. For each beta, I would use the apollo_predict function to find base predictions. Then, I would marginally increase the data and use apollo_predict again to find new predictions. I would use those two predictions (base and new) to calculate the AME, then take the arithmetic mean of those estimates across all N draws. Rinse and repeat for each mixed coefficient.
My questions are as follows:
(1) apollo_predict reads in the model in order to generate predictions, but I need to draw from the distributions of the betas. Is it possible to define a distribution for each beta and replace the betas in the original model for each draw or iteration? If so, how? If not, is there a better way to accomplish this?
(2) This procedure will only generate point estimates for the AMEs, but I want to be able to say something about the simulation error. Is there a good way to estimate the confidence intervals around AME estimates within Apollo?
Thank you for your time,
Brenna
I was hoping for some guidance in estimating average marginal effects for the coefficients of a mixed logit. I was able to follow the instructions in the manual and a few of the posted examples to estimate average marginal effects for a multinomial logit, but am unable to determine how to apply Apollo's post-estimation functions to estimate the AMEs of a mixed logit.
The Procedure:
For each parameter, I will need to define the distribution of the respective betas according to the regression outputs (i.e., using the estimated mean and standard deviation) then draw N betas from said distribution. For each beta, I would use the apollo_predict function to find base predictions. Then, I would marginally increase the data and use apollo_predict again to find new predictions. I would use those two predictions (base and new) to calculate the AME, then take the arithmetic mean of those estimates across all N draws. Rinse and repeat for each mixed coefficient.
My questions are as follows:
(1) apollo_predict reads in the model in order to generate predictions, but I need to draw from the distributions of the betas. Is it possible to define a distribution for each beta and replace the betas in the original model for each draw or iteration? If so, how? If not, is there a better way to accomplish this?
(2) This procedure will only generate point estimates for the AMEs, but I want to be able to say something about the simulation error. Is there a good way to estimate the confidence intervals around AME estimates within Apollo?
Thank you for your time,
Brenna