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]

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


From   Austin Nichols <[email protected]>
To   [email protected]
Subject   Re: st: Predicted events with -xtnbreg- and -xtpoisson-
Date   Fri, 21 Jan 2011 15:24:55 -0500

Dendy Macaulay <[email protected]> :

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 <[email protected]> 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/


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