Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: Predicted events with -xtnbreg- and -xtpoisson-


From   Dendy Macaulay <dendym@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: Predicted events with -xtnbreg- and -xtpoisson-
Date   Thu, 20 Jan 2011 18:59:27 -0500

I am using I am using Stata/IC 10.1 for Windows to try to predict the
number of events from a negative binomial regression with panel data.
Specifically, I am running -xtnbreg- with random effects.  In the
prediction, I do not want to assume the random effects are zero.

The command I am using is the following:

xtnbreg visits intervention study age, re level(95)
predict phat, xb

Do I need to exponentiate phat to get the predicted number of events?
replace phat = exp(phat)


I also want to predict the number of events from a Poisson count
model.  Specifically, I am running -xtpoisson- with random effects
with the same panel data.

The command is the following:
xtpoisson days_stayed intervention study age, re level(95)
predict phat, xb
replace phat = exp(phat)

With -xtpoisson- it seems to require exponentiation to get the
predicted number of events.  Could you please confirm this is correct?

Thank you so much!
Dendy Macaulay

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index