Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


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

Re: st: RE: fitted values in xtmepoisson and xtpoisson


From   Dan MacNulty <macn0007@umn.edu>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: RE: fitted values in xtmepoisson and xtpoisson
Date   Tue, 11 May 2010 09:53:53 -0700

Thanks for spotting my error Garry; I did neglect to specify the -normal- option. And this highlights my core question: why do the marginal fitted values differ so much between poisson models where the random effects follow a normal versus a gamma distribution? Moreover, it seems the former provide a comparatively poor fit to the observed data. Specifically, the marginal fitted values from the poisson model with normally distributed random effects appear to underestimate the observed counts. This is illustrated with the following code:

. use http://www.stata-press.com/data/r10/epilepsy
. xtset  subject
. xtpoisson seizures lage, re normal
. predict xt_norm, nu0
. xtpoisson seizures lage, re
. predict xt_gamma, nu0
. twoway (lowess seizures lage) (line xt_norm lage, sort) (line xt_gamma lage, sort)

Garry Anderson wrote:
Dear Dan,

If you use the -,normal- option on the -xtpoisson- model the fitted
values are the same as -xtmepoisson-. That is, the -xtmepoisson- command
assumes that the random effects are normally distributed, whereas the
-xtpoisson- command assumes that they have a gamma distribution. Page
286 of the Stata 11 XT manual refers to -xtmepoisson- and says "Because
this is a simple random-intercept model, you can obtain equivalent
results by using
xtpoisson with the re and normal options."

Cheers, Garry

-----Original Message-----
From: owner-statalist@hsphsun2.harvard.edu
[mailto:owner-statalist@hsphsun2.harvard.edu] On Behalf Of Dan MacNulty
Sent: Tuesday, 11 May 2010 9:26 AM
To: statalist@hsphsun2.harvard.edu
Subject: st: fitted values in xtmepoisson and xtpoisson

Dear Statalist,
According to the STATA 10 documentation re:longitudinal/panel data
(p.264) the model specified as:

    xtmepoisson seizures treat lbas lbas_trt lage visit || subject:

...is equivalent to this model:

    xtpoisson seizures treat lbas lbas_trt lage visit, re

Yet, the population-averaged fitted values (i.e., predictions that
include only the fixed portion of the model) appear to differ
substantially between the two models. For the xtmepoisson model, I
generated these with the post-estimation command:

    predict newvar, fixedonly

For the xtpossion model, I generated the population-averaged fitted
values with the post-estimation command:

    predict newvar, nu0

I'd be very grateful if someone could explain why there's an apparent
difference in the population-averaged fitted values between these two
purportedly equivalent models.

thanks,
Dan MacNulty







*
*   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/

*
*   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/

*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index