Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.
From | Dendy Macaulay <dendym@gmail.com> |
To | statalist@hsphsun2.harvard.edu |
Subject | Re: Re: st: Predicted events with -xtnbreg- and -xtpoisson- |
Date | Fri, 21 Jan 2011 19:26:57 -0500 |
Austin Nichols <austinnichols@gmail.com>: Thank you for clarifying the random effect assumption. I want to know the average predicted number of events for the sample. Everyone has equal exposure. If I wanted to assume that the random effects are zero when calculating predictions, then I think I can use: predict phat, nu0 for -xtnbreg- to get the predicted number of events, correct? Dendy Macaulay <dendym@gmail.com> : You are always assuming the random effects are zero either way--if you don't want to, you have to generate random effects--depending on what you want to do, you might want to do this 100 or 1000 or more times and average across draws somehow. What do you want to do with these predictions? On Thu, Jan 20, 2011 at 6:59 PM, Dendy Macaulay <dendym@gmail.com> wrote: > 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/