Announcement

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

  • Error associated with suest in logstic regressions

    Dear Madam/Sir,

    Based on several posts in this forum, I tried to compare coefficients across logistic regressions in different subsamples below. However, I got the error message. Any advice to fix this error will be highly appreciated.

    logit gc hhi lev chlev zscore ploss lnage beta return idiorisk lnasset investment ffinancing ocf big4 roa tangible cf_vol abaccrual i.fyear i.sic2 if rd_high==1
    est store model1_srd
    logit gc hhi lev chlev zscore ploss lnage beta return idiorisk lnasset investment ffinancing ocf big4 roa tangible cf_vol abaccrual i.fyear i.sic2 if rd_high==2
    est store model2_srd
    suest model1_srd model2_srd, cluster(gvkey)
    test [model1_srd]hhi - [model2_srd]hhi = 0


    test [model1_srd]hhi - [model2_srd]hhi = 0
    equation [model1_srd] not found
    r(303);


    Sincerely,
    Joon

  • #2
    Run

    Code:
    suest model1_srd model2_srd, cluster(gvkey) coeflegend
    to see how to refer to these coefficients.

    Comment


    • #3
      logit gc i.rd_high#(c.hhi c.lev c.chlev c.zscore c.ploss c.lnage c.beta c.return c.idiorisk c.lnasset c.investment c.ffinancing c.ocf c.big4 c.roa c.tangible c.cf_vol c.abaccrual i.fyear i.sic2) , vce(cluster gvkey)

      then test

      Comment


      • #4
        Thanks, Andrew. I still see the same error message. Any other advice?

        logit gc hhi lev chlev zscore ploss lnage beta return idiorisk lnasset investment ffinancing ocf big4 roa tangible cf_vol abaccrual i.fyear i.sic2 if rd_high==1
        est store model1_srd
        logit gc hhi lev chlev zscore ploss lnage beta return idiorisk lnasset investment ffinancing ocf big4 roa tangible cf_vol abaccrual i.fyear i.sic2 if rd_high==2
        est store model2_srd
        suest model1_srd model2_srd, cluster(gvkey) coeflegend
        test [model1_srd]hhi - [model2_srd]hhi = 0

        . test [model1_srd]hhi - [model2_srd]hhi = 0
        equation [model1_srd] not found
        r(303);

        Comment


        • #5
          Thanks for your kind reply, George. Is your code testing the interaction effect? If so, I have already tried this. When the interaction effect is not significant, we try coefficient comparison test.

          Sincerely,
          Joon

          Comment


          • #6
            Originally posted by HJ Song View Post
            When the interaction effect is not significant, we try coefficient comparison test.
            Same thing. The direct comparison is obtained by entering the interaction using a double hash: ##

            Code:
            logit gc i.rd_high##(c.hhi c.lev... )


            I still see the same error message. Any other advice?

            . test [model1_srd]hhi - [model2_srd]hhi = 0
            equation [model1_srd] not found
            r(303);
            You are not using the exact expression from -coeflegend-. Note that you increase your chances of getting a helpful reply by enclosing a reproducible example (refer to FAQ Advice #12).

            Code:
            sysuse auto, clear
            logit foreign weight
            est sto m1
            logit foreign weight disp
            est sto m2
            suest m1 m2, coefl
            test _b[m1_foreign:weight] =  _b[m2_foreign:weight]
            Res.:

            Code:
            . suest m1 m2, coefl
            
            Simultaneous results for m1, m2                             Number of obs = 74
            
            ------------------------------------------------------------------------------
                         | Coefficient  Legend
            -------------+----------------------------------------------------------------
            m1_foreign   |
                  weight |  -.0025874  _b[m1_foreign:weight]
                   _cons |   6.282599  _b[m1_foreign:_cons]
            -------------+----------------------------------------------------------------
            m2_foreign   |
                  weight |   .0019774  _b[m2_foreign:weight]
            displacement |  -.0651206  _b[m2_foreign:displacement]
                   _cons |   3.369612  _b[m2_foreign:_cons]
            ------------------------------------------------------------------------------
            
            .
            . test _b[m1_foreign:weight] =  _b[m2_foreign:weight]
            
             ( 1)  [m1_foreign]weight - [m2_foreign]weight = 0
            
                       chi2(  1) =    5.49
                     Prob > chi2 =    0.0192

            Comment


            • #7
              Thanks a lot, Andrew. Your code works well. Have a great day.

              Comment


              • #8
                Code:
                sysuse auto, clear
                
                g group = runiform()>0.5
                
                logit foreign weight mpg if group==0
                est sto m1
                logit foreign weight mpg  if group==1
                eststo m2
                
                suest m1 m2, coefl
                test _b[m1_foreign:weight] =  _b[m2_foreign:weight]
                
                logit foreign weight mpg group c.group#(c.weight c.mpg) , r

                Comment

                Working...
                X