|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
st: error, test command
Hi,
This is a follow up to my previous questions about seemingly unrelated
neg. binomial regression.
I tried the syntax that Maarten suggested so that I could estimate
regression coefficients using poisson or nbreg but then examine the
equality of coefficients across models where the dependent variables
have correlated error terms.
Anyway - I encountered an error when I ran the text command. I have
copied the log below - the error is at the bottom. You'll notice I
typed the variables incorrectly in the first attempt at test. but the
subsequent ones are correct as far as I can tell but I get the message
=exp required. Can anyone help?
Thanks in advance,
Rachel
------------------------------------------------------------------------------
nbreg inhom00z Zlm16pop0 Zmoved00 Zsouthx Zwestx Zlm152400 Zdiv00
disad00b
> geq00, offset (Zlm16pop0)
Fitting Poisson model:
Iteration 0: log likelihood = -923.36246
Iteration 1: log likelihood = -468.37081
Iteration 2: log likelihood = -326.83881
Iteration 3: log likelihood = -323.14576
Iteration 4: log likelihood = -323.13701
Iteration 5: log likelihood = -323.13701
Fitting constant-only model:
Iteration 0: log likelihood = -416.20561
Iteration 1: log likelihood = -396.32781
Iteration 2: log likelihood = -374.89068
Iteration 3: log likelihood = -372.30455
Iteration 4: log likelihood = -372.23629
Iteration 5: log likelihood = -372.23627
Fitting full model:
Iteration 0: log likelihood = -334.6409
Iteration 1: log likelihood = -321.89161
Iteration 2: log likelihood = -320.48908
Iteration 3: log likelihood = -320.43761
Iteration 4: log likelihood = -320.43757
Iteration 5: log likelihood = -320.43757
Negative binomial regression Number of obs = 210
LR chi2(8) = 103.60
Dispersion = mean Prob > chi2 = 0.0000
Log likelihood = -320.43757 Pseudo R2 = 0.1392
------------------------------------------------------------------------------
inhom00z | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
Zlm16pop0 | -.3117765 .0353887 -8.81 0.000 -.3811371
-.2424159
Zmoved00 | -.0276679 .0729742 -0.38 0.705 -.1706948 .115359
Zsouthx | .1557419 .0541749 2.87 0.004 .049561 .2619228
Zwestx | .020466 .0690727 0.30 0.767 -.1149141 .1558461
Zlm152400 | -.1314702 .0804378 -1.63 0.102 -.2891254 .026185
Zdiv00 | .1717862 .0590661 2.91 0.004 .0560188 .2875537
disad00b | .3586993 .0705421 5.08 0.000 .2204393 .4969594
geq00 | .1205101 .0580861 2.07 0.038 .0066634 .2343568
_cons | .5189547 .0616826 8.41 0.000 .3980589 .6398504
Zlm16pop0 | (offset)
-------------+----------------------------------------------------------------
/lnalpha | -3.234946 .5668594 -4.345969
-2.123922
-------------+----------------------------------------------------------------
alpha | .0393623 .0223129 .0129589 .1195618
------------------------------------------------------------------------------
Likelihood-ratio test of alpha=0: chibar2(01) = 5.40 Prob>=chibar2 =
0.010
.
.
.
.
.
.
.
.
.
.
est store A
nbreg fahom00z Zlm16pop0 Zmoved00 Zsouthx Zwestx Zlm152400 Zdiv00
disad00b
> geq00, offset (Zlm16pop0)
Fitting Poisson model:
Iteration 0: log likelihood = -946.34535
Iteration 1: log likelihood = -497.6123
Iteration 2: log likelihood = -333.24876
Iteration 3: log likelihood = -301.17508
Iteration 4: log likelihood = -300.87731
Iteration 5: log likelihood = -300.87713
Iteration 6: log likelihood = -300.87713
Fitting constant-only model:
Iteration 0: log likelihood = -364.68266
Iteration 1: log likelihood = -340.67341
Iteration 2: log likelihood = -330.80639
Iteration 3: log likelihood = -330.3392
Iteration 4: log likelihood = -330.33699
Iteration 5: log likelihood = -330.33699
Fitting full model:
Iteration 0: log likelihood = -302.87414
Iteration 1: log likelihood = -295.32709
Iteration 2: log likelihood = -294.5845
Iteration 3: log likelihood = -294.56911
Iteration 4: log likelihood = -294.56911
Negative binomial regression Number of obs = 210
LR chi2(8) = 71.54
Dispersion = mean Prob > chi2 = 0.0000
Log likelihood = -294.56911 Pseudo R2 = 0.1083
------------------------------------------------------------------------------
fahom00z | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
Zlm16pop0 | -.3088663 .0423061 -7.30 0.000 -.3917848
-.2259477
Zmoved00 | -.0970132 .0866383 -1.12 0.263 -.2668212 .0727948
Zsouthx | .1110062 .0637743 1.74 0.082 -.0139892 .2360016
Zwestx | -.0476187 .0822826 -0.58 0.563 -.2088897 .1136522
Zlm152400 | -.1368972 .0959437 -1.43 0.154 -.3249433 .0511489
Zdiv00 | .0864774 .0697904 1.24 0.215 -.0503092 .223264
disad00b | .2989974 .0838875 3.56 0.000 .1345808 .463414
geq00 | .122274 .0681371 1.79 0.073 -.0112723 .2558204
_cons | .2317943 .0708109 3.27 0.001 .0930075 .3705812
Zlm16pop0 | (offset)
-------------+----------------------------------------------------------------
/lnalpha | -2.671513 .441221 -3.53629
-1.806736
-------------+----------------------------------------------------------------
alpha | .0691475 .0305093 .0291212 .1641892
------------------------------------------------------------------------------
Likelihood-ratio test of alpha=0: chibar2(01) = 12.62 Prob>=chibar2 =
0.000
.
.
.
.
.
.
.
.
.
.
.
.
.
.
est store B
nbreg achom00z Zlm16pop0 Zmoved00 Zsouthx Zwestx Zlm152400 Zdiv00
disad00b
> geq00, offset (Zlm16pop0)
Fitting Poisson model:
Iteration 0: log likelihood = -2692.6555
Iteration 1: log likelihood = -1399.0585
Iteration 2: log likelihood = -621.42969
Iteration 3: log likelihood = -602.99678
Iteration 4: log likelihood = -602.79745
Iteration 5: log likelihood = -602.79742
Fitting constant-only model:
Iteration 0: log likelihood = -577.95248
Iteration 1: log likelihood = -562.27874
Iteration 2: log likelihood = -557.60684
Iteration 3: log likelihood = -557.60587
Iteration 4: log likelihood = -557.60587
Fitting full model:
Iteration 0: log likelihood = -498.7968
Iteration 1: log likelihood = -461.52861
Iteration 2: log likelihood = -455.30786
Iteration 3: log likelihood = -454.75591
Iteration 4: log likelihood = -454.75423
Iteration 5: log likelihood = -454.75423
Negative binomial regression Number of obs = 210
LR chi2(8) = 205.70
Dispersion = mean Prob > chi2 = 0.0000
Log likelihood = -454.75423 Pseudo R2 = 0.1845
------------------------------------------------------------------------------
achom00z | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
Zlm16pop0 | -.2193838 .0380156 -5.77 0.000 -.2938931
-.1448745
Zmoved00 | -.0350098 .066984 -0.52 0.601 -.166296 .0962765
Zsouthx | .0723201 .0499032 1.45 0.147 -.0254883 .1701285
Zwestx | -.0905799 .0627815 -1.44 0.149 -.2136294 .0324696
Zlm152400 | -.0649757 .070411 -0.92 0.356 -.2029787 .0730274
Zdiv00 | .2421721 .0535014 4.53 0.000 .1373113 .3470329
disad00b | .5916695 .0655731 9.02 0.000 .4631486 .7201903
geq00 | .1488697 .0538531 2.76 0.006 .0433196 .2544198
_cons | 1.250852 .0530721 23.57 0.000 1.146832 1.354871
Zlm16pop0 | (offset)
-------------+----------------------------------------------------------------
/lnalpha | -1.920635 .1816138 -2.276592
-1.564678
-------------+----------------------------------------------------------------
alpha | .1465139 .026609 .1026334 .2091553
------------------------------------------------------------------------------
Likelihood-ratio test of alpha=0: chibar2(01) = 296.09 Prob>=chibar2 =
0.000
.
.
.
.
.
.
.
.
est store C
nbreg sthom00z Zlm16pop0 Zmoved00 Zsouthx Zwestx Zlm152400 Zdiv00
disad00b
> geq00, offset (Zlm16pop0)
Fitting Poisson model:
Iteration 0: log likelihood = -3242.2146
Iteration 1: log likelihood = -1570.4278
Iteration 2: log likelihood = -696.70995
Iteration 3: log likelihood = -396.97348
Iteration 4: log likelihood = -391.57155
Iteration 5: log likelihood = -391.55003
Iteration 6: log likelihood = -391.55003
Fitting constant-only model:
Iteration 0: log likelihood = -445.0893
Iteration 1: log likelihood = -422.86326
Iteration 2: log likelihood = -420.73533
Iteration 3: log likelihood = -420.69854
Iteration 4: log likelihood = -420.69854
Fitting full model:
Iteration 0: log likelihood = -383.62199
Iteration 1: log likelihood = -372.76658
Iteration 2: log likelihood = -370.07918
Iteration 3: log likelihood = -369.97963
Iteration 4: log likelihood = -369.97937
Iteration 5: log likelihood = -369.97937
Negative binomial regression Number of obs = 210
LR chi2(8) = 101.44
Dispersion = mean Prob > chi2 = 0.0000
Log likelihood = -369.97937 Pseudo R2 = 0.1206
------------------------------------------------------------------------------
sthom00z | Coef. Std. Err. z P>|z| [95% Conf.
Interval]
-------------+----------------------------------------------------------------
Zlm16pop0 | -.1307622 .0377607 -3.46 0.001 -.2047718
-.0567526
Zmoved00 | .0190134 .0746751 0.25 0.799 -.1273471 .1653738
Zsouthx | .2091034 .0584856 3.58 0.000 .0944738 .323733
Zwestx | .2922971 .0711273 4.11 0.000 .1528901 .431704
Zlm152400 | -.0495248 .0779821 -0.64 0.525 -.2023668 .1033173
Zdiv00 | .0494047 .0595084 0.83 0.406 -.0672296 .166039
disad00b | .5765776 .0721757 7.99 0.000 .4351158 .7180393
geq00 | .0819123 .0588768 1.39 0.164 -.0334841 .1973088
_cons | .6996401 .0611943 11.43 0.000 .5797015 .8195787
Zlm16pop0 | (offset)
-------------+----------------------------------------------------------------
/lnalpha | -2.272485 .2921092 -2.845008
-1.699962
-------------+----------------------------------------------------------------
alpha | .1030558 .0301035 .0581338 .1826906
------------------------------------------------------------------------------
Likelihood-ratio test of alpha=0: chibar2(01) = 43.14 Prob>=chibar2 =
0.000
.
.
.
.
.
*
* 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/