Announcement

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

  • Applying -suest- to logistic models

    Hi everyone!

    I am working with a dataset containing data collected from two population groups (i.e., group=0 or 1, with everyone answered to the same questions). I have a binary dependent variable and a set of independent variables containing both binary and continuous variables. I fit a logistic regression model for each group and am trying to compare the differences in coefficients of my IVs from the two models. My understanding is that I can use the -suest- command for the comparison (as suggested in the Stata manual: chrome-extension://efaidnbmnnnibpcajpcglclefindmkaj/https://www.stata.com/manuals/rsuest.pdf), but I got feedback from other people saying that -suest- is not the appropriate command. Can somebody please provide some insights on whether -suest- is applicable to logistic coefficients and if not, what would be some reasonable alternatives?

    Thank you all so much in advance!

  • #2
    WJ:
    example 3, -suest- entry, Stata .pdf manual is actually on -logit-.
    In addition:
    Code:
    . use "C:\Program Files\Stata17\ado\base\a\auto.dta"
    (1978 automobile data)
    
    . logit foreig price
    
    Iteration 0:   log likelihood =  -45.03321  
    Iteration 1:   log likelihood = -44.947363  
    Iteration 2:   log likelihood =  -44.94724  
    Iteration 3:   log likelihood =  -44.94724  
    
    Logistic regression                                     Number of obs =     74
                                                            LR chi2(1)    =   0.17
                                                            Prob > chi2   = 0.6784
    Log likelihood = -44.94724                              Pseudo R2     = 0.0019
    
    ------------------------------------------------------------------------------
         foreign | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
           price |   .0000353   .0000844     0.42   0.676    -.0001301    .0002006
           _cons |  -1.079792   .5878344    -1.84   0.066    -2.231927    .0723419
    ------------------------------------------------------------------------------
    
    . estimates store l_1
    
    . logit foreig mpg
    
    Iteration 0:   log likelihood =  -45.03321  
    Iteration 1:   log likelihood = -39.380959  
    Iteration 2:   log likelihood = -39.288802  
    Iteration 3:   log likelihood =  -39.28864  
    Iteration 4:   log likelihood =  -39.28864  
    
    Logistic regression                                     Number of obs =     74
                                                            LR chi2(1)    =  11.49
                                                            Prob > chi2   = 0.0007
    Log likelihood = -39.28864                              Pseudo R2     = 0.1276
    
    ------------------------------------------------------------------------------
         foreign | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
             mpg |   .1597621   .0525876     3.04   0.002     .0566922     .262832
           _cons |  -4.378866   1.211295    -3.62   0.000    -6.752961   -2.004771
    ------------------------------------------------------------------------------
    
    . estimates store l_2
    
    . suest l_1 l_2
    
    Simultaneous results for l_1, l_2                           Number of obs = 74
    
    ------------------------------------------------------------------------------
                 |               Robust
                 | Coefficient  std. err.      z    P>|z|     [95% conf. interval]
    -------------+----------------------------------------------------------------
    l_1_foreign  |
           price |   .0000353   .0000791     0.45   0.656    -.0001198    .0001904
           _cons |  -1.079792   .5537941    -1.95   0.051    -2.165209    .0056241
    -------------+----------------------------------------------------------------
    l_2_foreign  |
             mpg |   .1597621   .0514516     3.11   0.002     .0589188    .2606055
           _cons |  -4.378866   1.181227    -3.71   0.000    -6.694028   -2.063704
    ------------------------------------------------------------------------------
    
    .
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Originally posted by Carlo Lazzaro View Post
      WJ:
      example 3, -suest- entry, Stata .pdf manual is actually on -logit-.
      In addition:
      Code:
      . use "C:\Program Files\Stata17\ado\base\a\auto.dta"
      (1978 automobile data)
      
      . logit foreig price
      
      Iteration 0: log likelihood = -45.03321
      Iteration 1: log likelihood = -44.947363
      Iteration 2: log likelihood = -44.94724
      Iteration 3: log likelihood = -44.94724
      
      Logistic regression Number of obs = 74
      LR chi2(1) = 0.17
      Prob > chi2 = 0.6784
      Log likelihood = -44.94724 Pseudo R2 = 0.0019
      
      ------------------------------------------------------------------------------
      foreign | Coefficient Std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      price | .0000353 .0000844 0.42 0.676 -.0001301 .0002006
      _cons | -1.079792 .5878344 -1.84 0.066 -2.231927 .0723419
      ------------------------------------------------------------------------------
      
      . estimates store l_1
      
      . logit foreig mpg
      
      Iteration 0: log likelihood = -45.03321
      Iteration 1: log likelihood = -39.380959
      Iteration 2: log likelihood = -39.288802
      Iteration 3: log likelihood = -39.28864
      Iteration 4: log likelihood = -39.28864
      
      Logistic regression Number of obs = 74
      LR chi2(1) = 11.49
      Prob > chi2 = 0.0007
      Log likelihood = -39.28864 Pseudo R2 = 0.1276
      
      ------------------------------------------------------------------------------
      foreign | Coefficient Std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      mpg | .1597621 .0525876 3.04 0.002 .0566922 .262832
      _cons | -4.378866 1.211295 -3.62 0.000 -6.752961 -2.004771
      ------------------------------------------------------------------------------
      
      . estimates store l_2
      
      . suest l_1 l_2
      
      Simultaneous results for l_1, l_2 Number of obs = 74
      
      ------------------------------------------------------------------------------
      | Robust
      | Coefficient std. err. z P>|z| [95% conf. interval]
      -------------+----------------------------------------------------------------
      l_1_foreign |
      price | .0000353 .0000791 0.45 0.656 -.0001198 .0001904
      _cons | -1.079792 .5537941 -1.95 0.051 -2.165209 .0056241
      -------------+----------------------------------------------------------------
      l_2_foreign |
      mpg | .1597621 .0514516 3.11 0.002 .0589188 .2606055
      _cons | -4.378866 1.181227 -3.71 0.000 -6.694028 -2.063704
      ------------------------------------------------------------------------------
      
      .
      Hi Carlo,

      Thanks so much for the response! And yes, that's exactly what I was referring to in my original post (I also just realized that the link was messed up a little - my apologies). My understanding is that since this example (based on, according to the manual, Clogg's test) is provided by the developers, it should be a pretty strong justification for my use of the test. Thanks again for your help!

      Comment

      Working...
      X