Code:
. sum photo_comments, detail
photo_comments
-------------------------------------------------------------
Percentiles Smallest
1% 0 0
5% 0 0
10% 0 0 Obs 5,866
25% 0 0 Sum of Wgt. 5,866
50% 18.5 Mean 5435.123
Largest Std. Dev. 27906.4
75% 1055 430655
90% 8770 481069 Variance 7.79e+08
95% 25388 803284 Skewness 19.18279
99% 122844 1139151 Kurtosis 616.2378When I run the margins command after xtnbreg, I get negative expected values for the count, which doesn't make sense. Do you have any explanations for why the predicted values are negative?
Code:
xtnbreg photo_comments c.z_altered##c.z_fem_beauty, exp(followers1) fe
Conditional FE negative binomial regression Number of obs = 481
Group variable: account_id Number of groups = 65
Obs per group:
min = 2
avg = 7.4
max = 34
Wald chi2(3) = 167.11
Log likelihood = -3886.7958 Prob > chi2 = 0.0000
--------------------------------------------------------------------------------------------
photo_comments | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------------------------+----------------------------------------------------------------
z_altered | -.7177536 .0586089 -12.25 0.000 -.8326249 -.6028823
z_fem_beauty | .2723421 .0607985 4.48 0.000 .1531793 .3915048
|
c.z_altered#c.z_fem_beauty | .3414562 .052084 6.56 0.000 .2393735 .443539
|
_cons | -17.93335 .0660347 -271.57 0.000 -18.06277 -17.80392
ln(followers1) | 1 (exposure)
--------------------------------------------------------------------------------------------
margins ,at(z_fem_beauty= (0 1) z_altered=(0 1))
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_at |
1 | -4.021224 .0660347 -60.90 0.000 -4.15065 -3.891798
2 | -3.748882 .0918066 -40.83 0.000 -3.92882 -3.568944
3 | -4.738978 .093584 -50.64 0.000 -4.922399 -4.555556
4 | -4.125179 .0923395 -44.67 0.000 -4.306161 -3.944197
------------------------------------------------------------------------------Code:
. xtpoisson photo_comments c.z_altered##c.z_fem_beauty, exp(followers1) fe
Conditional fixed-effects Poisson regression Number of obs = 481
Group variable: account_id Number of groups = 65
Obs per group:
min = 2
avg = 7.4
max = 34
Wald chi2(3) = 72928.93
Log likelihood = -1280726.3 Prob > chi2 = 0.0000
--------------------------------------------------------------------------------------------
photo_comments | Coef. Std. Err. z P>|z| [95% Conf. Interval]
---------------------------+----------------------------------------------------------------
z_altered | -.1015437 .0009827 -103.33 0.000 -.1034697 -.0996177
z_fem_beauty | .0826125 .001004 82.29 0.000 .0806448 .0845803
|
c.z_altered#c.z_fem_beauty | .119922 .0006979 171.84 0.000 .1185542 .1212898
ln(followers1) | 1 (exposure)
--------------------------------------------------------------------------------------------
. margins ,at(z_fem_beauty= (0 1) z_altered=(0 1))
------------------------------------------------------------------------------
| Delta-method
| Margin Std. Err. z P>|z| [95% Conf. Interval]
-------------+----------------------------------------------------------------
_at |
1 | 13.91212 . . . . .
2 | 13.99474 .001004 1.4e+04 0.000 13.99277 13.9967
3 | 13.81058 .0009827 1.4e+04 0.000 13.80865 13.81251
4 | 14.01311 .0010905 1.3e+04 0.000 14.01098 14.01525
------------------------------------------------------------------------------
No comments:
Post a Comment