### Average Marginal Effects via runmlwin

Posted:

**Tue Apr 20, 2021 5:52 pm**Hello,

I hope you are well. I am trying compute AMEs for a multilevel multinomial logit after runmlwin and I have a couple of questions about these suggestions that Dr. Leckie provided earlier to another the forum participant in the thread below.

viewtopic.php?f=3&t=877&sid=292839f64dd ... 34bba713c4

If you are using MCMC estimation then things might actually be easier...

(1) Run the model for 1000 iterations and the save the chains as data. Or run it for 10000 iterations and set thinning to 10.

(2) Go back to the original data and expand the estimation sample by 1000 and then merge in the MCMC chains

(3) Calculate the AME in the usual way, but do it separately at each iteration of the MCMC chain

You will get 1000 values for the AME. The mean is your point estimate for the AME, the sd is your standard error.

Best wishes

George

My question is regarding the item 2) Go back to the original data and expand the estimation sample by 1000 and then merge in the MCMC chains. Does Dr. Leckie mean expand the original data set by 1000 times(each observation is multiplied by a 1000) or does he mean add a 1000 additional cases to it. Also when he says merge the mcmc chains into the original data set is he talking about about a one to one observation merge?

Another question I have is my analysis involves multilevel analysis - two levels - I assume that the earlier recommendation from Dr. Leckie to the other forum participant was for a single level multinomial logit. How would I take into account the random effect in the predictions? Thank you for any ideas you can provide.

Kofi

I hope you are well. I am trying compute AMEs for a multilevel multinomial logit after runmlwin and I have a couple of questions about these suggestions that Dr. Leckie provided earlier to another the forum participant in the thread below.

viewtopic.php?f=3&t=877&sid=292839f64dd ... 34bba713c4

If you are using MCMC estimation then things might actually be easier...

(1) Run the model for 1000 iterations and the save the chains as data. Or run it for 10000 iterations and set thinning to 10.

(2) Go back to the original data and expand the estimation sample by 1000 and then merge in the MCMC chains

(3) Calculate the AME in the usual way, but do it separately at each iteration of the MCMC chain

You will get 1000 values for the AME. The mean is your point estimate for the AME, the sd is your standard error.

Best wishes

George

My question is regarding the item 2) Go back to the original data and expand the estimation sample by 1000 and then merge in the MCMC chains. Does Dr. Leckie mean expand the original data set by 1000 times(each observation is multiplied by a 1000) or does he mean add a 1000 additional cases to it. Also when he says merge the mcmc chains into the original data set is he talking about about a one to one observation merge?

Another question I have is my analysis involves multilevel analysis - two levels - I assume that the earlier recommendation from Dr. Leckie to the other forum participant was for a single level multinomial logit. How would I take into account the random effect in the predictions? Thank you for any ideas you can provide.

Kofi