Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: interaction term in negative binomial regression


From   "Scott Merryman" <[email protected]>
To   <[email protected]>
Subject   st: RE: interaction term in negative binomial regression
Date   Thu, 14 Apr 2005 21:34:52 -0500

One way, would be to compare the predicted probabilities which can
conveniently done with -prvalue- (which is part of J. Scott Long's
-spostado- package).

For example:

. sysuse auto
(1978 Automobile Data)

. gen foreXmpg = foreign*mpg

. poisson rep mpg foreign foreXmpg

Iteration 0:   log likelihood = -112.63814  
Iteration 1:   log likelihood = -112.63814  

Poisson regression                                Number of obs   =
69
                                                  LR chi2(3)      =
7.08
                                                  Prob > chi2     =
0.0694
Log likelihood = -112.63814                       Pseudo R2       =
0.0305

----------------------------------------------------------------------------
       rep78 |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+--------------------------------------------------------------
         mpg |   .0113925   .0172281     0.66   0.508    -.0223738
.0451589
     foreign |   .4614341   .5658458     0.82   0.415    -.6476034
1.570472
    foreXmpg |  -.0069618    .024157    -0.29   0.773    -.0543087
.0403851
       _cons |   .8814441   .3510788     2.51   0.012     .1933423
1.569546
----------------------------------------------------------------------------

. prvalue , x(foreign = 0  foreX = 0) rest(mean)
 
poisson: Predictions for rep78

Predicted rate: 3.08     95% CI [2.6    ,   3.65]

Predicted probabilities:

  Pr(y=0|x):   0.0461  Pr(y=1|x):   0.1418
  Pr(y=2|x):   0.2182  Pr(y=3|x):   0.2238
  Pr(y=4|x):   0.1722  Pr(y=5|x):   0.1060
  Pr(y=6|x):   0.0543  Pr(y=7|x):   0.0239
  Pr(y=8|x):   0.0092  Pr(y=9|x):   0.0031

          mpg    foreign   foreXmpg
x=  21.289855          0          0

. qui sum mpg

. local mean = r(mean)

. prvalue , x(foreign = 1  foreX = `mean') rest(mean)
 
poisson: Predictions for rep78

Predicted rate: 4.21     95% CI [3.28   ,    5.4]

Predicted probabilities:

  Pr(y=0|x):   0.0149  Pr(y=1|x):   0.0626
  Pr(y=2|x):   0.1317  Pr(y=3|x):   0.1847
  Pr(y=4|x):   0.1943  Pr(y=5|x):   0.1636
  Pr(y=6|x):   0.1147  Pr(y=7|x):   0.0690
  Pr(y=8|x):   0.0363  Pr(y=9|x):   0.0170

          mpg    foreign   foreXmpg
x=  21.289855          1  21.297297


Hope this helps,
Scott


> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Sheng Wang
> Sent: Monday, April 11, 2005 2:42 PM
> To: [email protected]
> Subject: st: interaction term in negative binomial regression
> 
> Dear all:
> 
> I have a question about how to interpret the interaction term in negative
> binomial regression results.
> 
> Below is the section from the stata output, gender and usage are two
> control
> variables. Dummy is a dummy variable created for 2 conditions (0 or 1).
> Extraversion is considered a continuous variable (1-5), and interaction is
> a
> product of the dummy variable and the mean-centered extraversion. I'd like
> to understand the different relationships between extraversion and
> quantity
> under condition =0 or condition =1? How can I calculate if there is a
> stronger relationship between extraversion and quantity under the two
> different conditions?
> 
> 
>     Quantity |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
> Interval]
> -------------+------------------------------------------------------------
> --
> --
>       gender |   1.215867   .3982474     3.05   0.002     .4353161
> 1.996417
>        usage |   .2103553   .1310798     1.60   0.109    -.0465563
> .467267
>        dummy |   4.035392   .6155144     6.56   0.000     2.829006
> 5.241778
> extraversion |   1.946443   1.131335     1.72   0.085    -.2709335
> 4.163819
>  interaction |  -2.616264   1.203618    -2.17   0.030    -4.975313
> -.2572159
>        _cons |  -10.07717   4.202655    -2.40   0.016    -18.31423
> -1.840122
> -------------+------------------------------------------------------------
> --
> --
> 
> 
> I would really appreciate any assistance with this issue.
> 
> Sincerely,
> 
> Sheng Wang
> The Ohio State University
> 
> 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index