Announcement

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

  • Marginal effects of a multivariate probit model

    Dear Statalisters,

    I am struggling to estimate the marginal effects for my MVP model. I have gone through the previous posts (eg: https://www.statalist.org/forums/for...variate-probit). However, I am unable to run these codes effectively.

    My model has 5 dependent variables within the multivariate model. Currently my codes look smth like:

    mvprobit (y1 x1 x2....x15) (y2 x1 x2....x15) (y3 x1 x2...x15) (y4 x1 x2....x15) (y5 x1 x2....x15)

    Can someone please help me with coding and estimating the marginal effects of the explanatory variables in my MVP model?

    Thank you for your help.

  • #2
    Took this from:
    HTML Code:
    https://www.researchgate.net/post/How_to_estimate_Marginal_effects_of_Multivariate_Probit_model_using_STATA
    I'm not sure this is legit, but it works. Used biprobit to check.

    Code:
    clear
    
    set obs 1000
    
    g x1 = rnormal()
    g x2 = rnormal()
    
    g y1 = 2*x1 + 1*x2 + rnormal() > 0.5
    g y2 = -2*x1 + 2*x2 + rnormal() > 0.5
    
    mvprobit (y1 x1 x2) (y2 x1 x2)
    mvppred pred_xb, xb
    gen coef_x1_1 = _b[y1:x1]
    gen coef_x2_1 = _b[y1:x2]
    gen coef_x1_2 = _b[y2:x1]
    gen coef_x2_2 = _b[y2:x2]
    
    gen ME_x1_1 = normalden(pred_xb1)*coef_x1_1
    gen ME_x2_1 = normalden(pred_xb1)*coef_x2_1
    gen ME_x1_2 = normalden(pred_xb2)*coef_x1_2
    gen ME_x2_2 = normalden(pred_xb2)*coef_x2_2
    
    summ ME_*
    
    biprobit (y1 x1 x2) (y2 x1 x2)
    margins, dydx(*) predict(pmarg1)
    margins, dydx(*) predict(pmarg2)
    Running them individually will give you the same margins, I think.
    Last edited by George Ford; 08 Dec 2023, 15:07.

    Comment


    • #3
      Hi George, thank you so much!
      Last edited by Lily Ksh; 08 Dec 2023, 16:13.

      Comment

      Working...
      X