Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Tabulate predictive margins

    Dear all,

    I would like to create a publication quality table of my regression results and would appreciate some help.
    Specifically, I am using a panel multinomial logit model (xtmlogit), regressing a migration variable (0=decrease, 1=no effect, 2= increase) on a factor variable weather (0= precipitation, 1=temperature, 2=drought, 3=disaster). Now I would like to create a table showing the predictive margins for each of the three possible model outcomes at each of the four different values of the weather variable.

    I tried the following, but it did not work:

    xtmlogit Migration i.weather , vce(cluster ID)
    eststo multinomial_main
    foreach o in 1 2 3 {
    quietly margins weather, predict(outcome(`o')) post
    eststo multinomial_main_`o', title(Outcome `o')
    estimates restore multinomial_main
    }

    Can anyone help?
    Thanks a ton.


    Last edited by Barbora Sedova; 18 May 2023, 09:28. Reason: margins, esttab,
Working...
X