Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: RE: predicted probabilities for Poisson regression


From   "Maarten Buis" <M.Buis@fsw.vu.nl>
To   <statalist@hsphsun2.harvard.edu>
Subject   st: RE: predicted probabilities for Poisson regression
Date   Fri, 25 Feb 2005 10:37:54 +0100

Dear Rudy,

Within the Poisson distribution the mean is the rate at which the event occurs (and also the variance). When you do poisson regression, you assume that different individuals experience different rates at which the event occurs, and that these different rates are determined by the explanatory variables. -predict mean, n- will give for each individual the mean from the poisson distribution. Alternatively, if you want to know the mean of an individual with certain characteristics you could compute it, store the results in a local, and use that local in the -pprob command-. The example below uses the auto dataset and assumes that trunk is a count. 

------begin example----
clear
sysuse auto
replace weight = weight /1000  
poisson trunk weight foreign
summarize weight

/*mean of foreign cars with average weight*/
di exp(_b[_cons]+_b[weight]*r(mean)+_b[foreign])

/*mean of domestic cars with average weight*/
di exp(_b[_cons]+_b[weight]*r(mean))

/*probabilities of foreign cars with mean weight*/
local mean = exp(_b[_cons]+_b[weight]*r(mean)+_b[foreign])
pprob, mean(`mean') n(10) 
-------end example-----------

Hope this helps,
Maarten

Rudy Fichtenbaum wrote:
 I am trying to run a poisson regression and then get the predicted probabilities. I
found the program pprob where you put the command  pprob , mean() n()
graph.  This works fine but I am not sure where I get the mean value. 
 

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   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   |   What's new   |   Site index