Login  Register

Re: Negative binomial regression analysis: Different results in SPSS and STATA?

Posted by Ryan on Jan 26, 2014; 2:10pm
URL: http://spssx-discussion.165.s1.nabble.com/Negative-binomial-regression-analysis-Different-results-in-SPSS-and-STATA-tp5724145p5724154.html

Dear no-name <first names are always welcome!>,

I really do not have time to investigate. Moreover, I know nothing about STATA as I mentioned before. Having said that, I did notice something in your SPSS GENLIN code with which I generally disagree. You have forced the dispersion parameter to be 1.0. Instead, allow the dispersion parameter to be estimated by changing:

NEGBIN(1)

to

NEGBIN(MLE)

I bet STATA estimates the dispersion parameter. 

Also, since your first covariate is binary (coded 0/1, I believe), change this line:

GENLIN DVcount BY Controlvar1 (ORDER=ASCENDING) WITH Controlvar2 IV Moderator IVxModerator 

to

GENLIN DVcount WITH Controlvar1 Controlvar2 IV Moderator IVxModerator 

The line above suggests to me that all of your predictors are continuous and/or dichotomous (coded 0/1).

One last point: Did you create the interaction term outside of GENLIN? You can construct the interaction term within GENLIN--not that it should really make a difference.

Even after all of these changes, your results may not be identical due to other issues I mentioned in a previous post. Still, my guess is they'll be much closer.

Ryan


On Sun, Jan 26, 2014 at 6:50 AM, Student073 <[hidden email]> wrote:
Rich, Ryan, thanks you!

These are the results I got. I tested the moderating effect of "moderator"
on the relation between IV and DV. Although none of the analyses showed a
significant result, I'm still alarmed the results were so different... Even
in SPSS, there's a considerable difference in the significance levels if I
use the "model-based estimators" compared to the "robust estimation".

What should I do to get the more accurate outcome??? Thanks again!!

STATA

. nbreg DVcount Controlvar1 Controlvar2 IV Moderator IVxModer

Fitting Poisson model:

Iteration 0:   log likelihood = -55609.736
Iteration 1:   log likelihood = -45032.466  (backed up)
Iteration 2:   log likelihood =  -27555.08  (backed up)
Iteration 3:   log likelihood = -19627.822
Iteration 4:   log likelihood = -8845.6562
Iteration 5:   log likelihood = -8488.7504
Iteration 6:   log likelihood = -8388.2676
Iteration 7:   log likelihood = -8388.1451
Iteration 8:   log likelihood = -8388.1451

Fitting constant-only model:

Iteration 0:   log likelihood = -5506.8228
Iteration 1:   log likelihood = -4983.0922
Iteration 2:   log likelihood = -3158.2798
Iteration 3:   log likelihood = -3157.9536
Iteration 4:   log likelihood = -3157.9535

Fitting full model:

Iteration 0:   log likelihood = -3078.1447
Iteration 1:   log likelihood = -3027.5247
Iteration 2:   log likelihood = -3024.3007
Iteration 3:   log likelihood = -3024.2785
Iteration 4:   log likelihood = -3024.2785

Negative binomial regression                      Number of obs   =
5447
                                                  LR chi2(5)      =
267.35
Dispersion     = mean                             Prob > chi2     =
0.0000
Log likelihood = -3024.2785                       Pseudo R2       =
0.0423

------------------------------------------------------------------------------
     DVcount |      Coef.   Std. Err.            z       P>|z|       [95%
Conf. Interval]
-------------+----------------------------------------------------------------
 Controlvar1 |   .4006587   .1612887     2.48   0.013     .0845387
.7167787
 Controlvar2 |   .0192326   .0034626     5.55   0.000      .012446
.0260192
          IV      |   .0699464   .0091503     7.64   0.000     .0520122
.0878806
   Moderator |   .2164698   .0293511     7.38   0.000     .1589428
.2739968
    IVxModer |  -.0018834    .003332    -0.57   0.572    -.0084139
.0046471
       _cons   |   -1.74222   .1218459   -14.30   0.000    -1.981034
-1.503407
-------------+----------------------------------------------------------------
    /lnalpha |   2.803212   .0562555                      2.692953
2.913471
-------------+----------------------------------------------------------------
       alpha |   16.49756   .9280785                      14.77525
18.42063
------------------------------------------------------------------------------
Likelihood-ratio test of alpha=0:  chibar2(01) = 1.1e+04 Prob>=chibar2 =
0.000


SPSS

MODEL BASED ESTIMATOR

* Generalized Linear Models.
GENLIN DVcount BY Controlvar1 (ORDER=ASCENDING) WITH Controlvar2 IV
Moderator IVxModerator
  /MODEL Controlvar1 Controlvar2 IV Moderator IVxModerator INTERCEPT=YES
 DISTRIBUTION=NEGBIN(1) LINK=LOG
  /CRITERIA METHOD=FISHER(1) SCALE=1 COVB=MODEL MAXITERATIONS=100
MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012
ANALYSISTYPE=3(WALD) CILEVEL=95 CITYPE=WALD LIKELIHOOD=FULL
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION.


ROBUST ESTIMATION

* Generalized Linear Models.
GENLIN DVcount BY Controlvar1 (ORDER=ASCENDING) WITH Controlvar2 IV
Moderator IVxModerator
  /MODEL Controlvar1 Controlvar2 IV Moderator IVxModerator INTERCEPT=YES
 DISTRIBUTION=NEGBIN(1) LINK=LOG
  /CRITERIA METHOD=FISHER(1) SCALE=1 COVB=ROBUST MAXITERATIONS=100
MAXSTEPHALVING=5 PCONVERGE=1E-006(ABSOLUTE) SINGULAR=1E-012
ANALYSISTYPE=3(WALD) CILEVEL=95 CITYPE=WALD LIKELIHOOD=FULL
  /MISSING CLASSMISSING=EXCLUDE
  /PRINT CPS DESCRIPTIVES MODELINFO FIT SUMMARY SOLUTION.

NBR_SPSS.doc
<http://spssx-discussion.1045642.n5.nabble.com/file/n5724152/NBR_SPSS.doc>




--
View this message in context: http://spssx-discussion.1045642.n5.nabble.com/Negative-binomial-regression-analysis-Different-results-in-SPSS-and-STATA-tp5724145p5724152.html
Sent from the SPSSX Discussion mailing list archive at Nabble.com.

=====================
To manage your subscription to SPSSX-L, send a message to
[hidden email] (not to SPSSX-L), with no body text except the
command. To leave the list, send the command
SIGNOFF SPSSX-L
For a list of commands to manage subscriptions, send the command
INFO REFCARD