[R] Newbie Poisson regression question

adelmaas@musc.edu adelmaas at musc.edu
Sun May 16 21:52:50 CEST 2004


Greetings.

I'm getting started learning R, and I'm trying to reproduce some models 
I've done previously in SAS.  I'm trying to fit simple Poisson 
regressions, and I keep getting impossible results:  the models predict 
negative numbers of cases for many observations.  The code for the 
models are:

Female.model <- glm(Observed ~ Black + Other, family = 
poisson(link=log), offset=log(PYAR), data=Females)

and

Male.model <- glm(Observed ~ Black + Other + 
poly(Minus.log.proportion.moved,3), family = poisson(link=log), 
offset=log(PYAR), data=Males)

where Observed is the number of cases of childhood ALL in a race-gender 
stratum of a county, Black and Other are Boolean variables what race a 
race-gender stratum of a county belongs to, Minus.log.proportion.moved 
is -log(proportion in county who moved between 1985 and 1990), PYAR is 
person-years at risk for a race-gender stratum of a county, and Females 
and Males are the data sets for females and males respectively.  As far 
as I can tell, this is set up the same way as examples of Poisson 
regressions in R I've found on the Net.  I've checked, and my data 
seems to be read in properly (code not shown).  Can anyone tell me if 
there's anything obviously wrong I've missed?  Thanks in advance for 
any help anyone can provide.

Aaron
Macintosh PowerBook G4 (867 MHz, 1 GB RAM, 40 GB hard drive, Mac OS X 
10.3.3, R 1.9.0)

-------------
Aaron Solomonâ­ (â¬ben Saul Josephâ­) â¬Adelman
E-mailâ­:  â¬adelmaas at musc.edu
Web siteâ­:  â¬httpâ­://â¬people.musc.eduâ­/â¬~adelmaasâ­/â¬
AOL Instant Messengerâ­ & â¬Yahooâ­! â¬Messenger:  â¬Hiergargo
AOL chat room:  Adelmania




More information about the R-help mailing list