I'm having trouble figuring out difference between the predict(nu0) and predict(xb) options in a margins statement following the execution of an xtnbreg statement.
The outcome is the number of events, so I'm not sure why the predict(nu0) is giving me such a higher number than the data suggests it should be. The results using the predict(xb) option are much more in line with the data. I must be missing something obvious.
Here is my code.
Results of first margins statement:
Adjusted predictions Number of obs = 2,275
Model VCE : OIM
Expression : Linear prediction, predict()
Delta-method
Margin Std. Err. z P>z [95% Conf. Interval]
_at
1 4.255655 .2001827 21.26 0.000 3.863304 4.648006
2 4.256663 .2000239 21.28 0.000 3.864623 4.648703
3 4.257671 .1998727 21.30 0.000 3.865928 4.649415
Results of second margins statement:
Adjusted predictions Number of obs = 2,275
Model VCE : OIM
Expression : Predicted number of events (assuming u_i=0), predict(nu0)
Delta-method
Margin Std. Err. z P>z [95% Conf. Interval]
_at
1 89.33351 17.88302 5.00 0.000 54.28343 124.3836
2 89.42362 17.88686 5.00 0.000 54.36602 124.4812
3 89.51383 17.89137 5.00 0.000 54.44739 124.5803
Summary of the outcome variable:
The outcome is the number of events, so I'm not sure why the predict(nu0) is giving me such a higher number than the data suggests it should be. The results using the predict(xb) option are much more in line with the data. I must be missing something obvious.
Here is my code.
Code:
xtnbreg _freq weeks_pre interven weeks_post i.month incidents percent_black percent_hispanic percent_renters percent_poverty temperature, fe exposure(total_pop) margins, predict(xb) atmeans at(weeks_pre=(159(1)161) weeks_post = 0 interven= 0 ) noatlegend margins, predict(nu0) atmeans at(weeks_pre=(159(1)161) weeks_post = 0 interven= 0 ) noatlegend
Adjusted predictions Number of obs = 2,275
Model VCE : OIM
Expression : Linear prediction, predict()
Delta-method
Margin Std. Err. z P>z [95% Conf. Interval]
_at
1 4.255655 .2001827 21.26 0.000 3.863304 4.648006
2 4.256663 .2000239 21.28 0.000 3.864623 4.648703
3 4.257671 .1998727 21.30 0.000 3.865928 4.649415
Results of second margins statement:
Adjusted predictions Number of obs = 2,275
Model VCE : OIM
Expression : Predicted number of events (assuming u_i=0), predict(nu0)
Delta-method
Margin Std. Err. z P>z [95% Conf. Interval]
_at
1 89.33351 17.88302 5.00 0.000 54.28343 124.3836
2 89.42362 17.88686 5.00 0.000 54.36602 124.4812
3 89.51383 17.89137 5.00 0.000 54.44739 124.5803
Summary of the outcome variable:
Mean | SD | Min. | Max. | |
Outcome | 10.98 | 10.41 | 0 | 77 |
Comment