Announcement

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

  • Interaction Between a Dummy Variable and a Continuous Variable?


    Hello
    I am newbie to Stata and Statistic.
    I have run the interaction term only in my stata
    ologit Bribe i.Rela#c.Anti $cov
    To the best of my knowledge, there has to be a reference group (ex Rela1) and this category cannot show up in the result table. But it is still there.
    When I run ologit Bribe i.Rela_ref $cov, the Rela1 was reference one and didnt show up. How can I understand the coeffiecent of the former case?
    Thank you
    Click image for larger version

Name:	Screenshot 2024-01-16 121333.png
Views:	1
Size:	24.8 KB
ID:	1739956


    ologit Bribe i.Rela $cov

    Click image for larger version

Name:	Screenshot 2024-01-16 .png
Views:	1
Size:	42.0 KB
ID:	1739955


    Last edited by Thalia Tran; 15 Jan 2024, 23:36.

  • #2
    Thalia:
    welocme to this forum.
    The best way to investigate this issue is to take a look at the coefficient matrix:
    Code:
    . use "C:\Program Files\Stata18\ado\base\a\auto.dta"
    (1978 automobile data)
    
    . ologit rep78 i.foreign##c.mpg
    
    Iteration 0:  Log likelihood = -93.692061  
    Iteration 1:  Log likelihood = -79.023882  
    Iteration 2:  Log likelihood = -78.095359  
    Iteration 3:  Log likelihood = -78.071936  
    Iteration 4:  Log likelihood = -78.071908  
    Iteration 5:  Log likelihood = -78.071908  
    
    Ordered logistic regression                             Number of obs =     69
                                                            LR chi2(3)    =  31.24
                                                            Prob > chi2   = 0.0000
    Log likelihood = -78.071908                             Pseudo R2     = 0.1667
    
    -------------------------------------------------------------------------------
            rep78 | Coefficient  Std. err.      z    P>|z|     [95% conf. interval]
    --------------+----------------------------------------------------------------
          foreign |
         Foreign  |   3.015042   2.328281     1.29   0.195    -1.548304    7.578389
              mpg |   .0755395   .0662507     1.14   0.254    -.0543095    .2053886
                  |
    foreign#c.mpg |
         Foreign  |  -.0183244   .0981388    -0.19   0.852    -.2106729    .1740241
    --------------+----------------------------------------------------------------
            /cut1 |  -1.730257   1.435715                     -4.544206    1.083693
            /cut2 |   .0627867   1.291372                     -2.468255    2.593829
            /cut3 |   2.685685   1.338266                      .0627317    5.308638
            /cut4 |   4.741767   1.436722                      1.925843     7.55769
    -------------------------------------------------------------------------------
    
    . mat list e(b)
    
    e(b)[1,9]
              rep78:       rep78:       rep78:       rep78:       rep78:           /:           /:           /:           /:
                 0b.           1.               0b.foreign#   1.foreign#                                                    
            foreign      foreign          mpg       co.mpg        c.mpg         cut1         cut2         cut3         cut4
    y1            0    3.0150423    .07553953            0   -.01832441   -1.7302568    .06278669    2.6856848    4.7417665
    
    .
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment

    Working...
    X