Announcement

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

  • suest for probit model with margins

    Dear Statalist,

    I have partitioned the entire sample into 2 groups based on whether a dummy variable (say the variable is called xxx) that equals 0 or 1, and run probit regressions separately for the 2 subsamples. Then I want to run -suest- to see whether the difference between the coefficients of x1 for the two subgroups is statistically significant, with the following code (note: estout is from the Stata Journal/ SSC):

    Code:
    probit y x1 x2 x3 x4 i.industry i.year if xxx==1 ,vce(cluster symbol)
    eststo model_1a: margins, dydx(*) post
    
    probit y x1 x2 x3 x4 i.industry i.year if xxx==0 ,vce(cluster symbol)
    eststo model_1b: margins, dydx(*) post
    Then when I do
    Code:
    suest model_1a model_1b
    it says model_1a was estimated with a nonstandard vce (delta)
    r(322);

    So following https://www.statalist.org/forums/for...enerates-error and https://www.statalist.org/forums/for...bit-or-regress, I add expression(normal(xb())) in my code (so the entire line of code is eststo model_1b: margins, dydx(*) expression(normal(xb())) post), but the error persists.

    I wonder what I have done wrong and how to solve this issue? Thanks a lot in advance!
    Last edited by Flora Yin; 08 Jan 2022, 09:27.

  • #2
    run the models without the vce command. Then add the vce command to suest.

    Comment


    • #3
      Thanks a lot! It works!

      Comment

      Working...
      X