Skip to content
Prev 96554 / 398500 Next

[Fwd: Re: Parameterization puzzle]

Bother! This cold has made me accident-prone. I meant to hit Reply-all.
Clarification below.

-------- Original Message --------
Subject: Re: [R] Parameterization puzzle
Date: Fri, 21 Jul 2006 19:10:03 +1200
From: Murray Jorgensen <maj at waikato.ac.nz>
To: Prof Brian Ripley <ripley at stats.ox.ac.uk>
References: <44C063E5.3020703 at waikato.ac.nz> 
<Pine.LNX.4.64.0607210716270.12611 at gannet.stats.ox.ac.uk>

Apologies for a non-selfcontained example. Here is what I should have sent:

pyears <- scan()
18793 52407 10673 43248 5710 28612 2585 12663 1462 5317

deaths <- scan()
2 32 12 104 28 206 28 186 31 102

l <- log(pyears)
Smoke <- gl(2,1,10,labels=c("No","Yes"))
Age <- gl(5,2,10,labels=c("35-44","45-54","55-64","65-74","75-84"),
            ordered=TRUE)
mod1.glm <- glm(deaths ~ Age * Smoke + offset(l),family=poisson)
summary(mod1.glm)
age <- as.numeric(Age)
mod2.glm <- aso1.glm <- glm(deaths ~ poly(age,2) + Smoke +
                       poly(age,1):Smoke + offset(l),family=poisson)
summary(mod2.glm)


Cheers, Murray Jorgensen
Prof Brian Ripley wrote:
-- 
Dr Murray Jorgensen      http://www.stats.waikato.ac.nz/Staff/maj.html
Department of Statistics, University of Waikato, Hamilton, New Zealand
Email: maj at waikato.ac.nz                                Fax 7 838 4155
Phone  +64 7 838 4773 wk    Home +64 7 825 0441    Mobile 021 1395 862