powered by
The Swedish population and No. of deaths by age and sex in the ages 61--80. Data from the year 2007.
data(swe07)
A data frame with 80 rows and five variables.
pop
Average population size during the year 2007 by age and sex.
deaths
Number of deaths by age and sex during the year 2007.
sex
Sex.
age
Age.
log.pop
The logarithm of the first variable, pop. Included for convenience, may be used as an offset in a Poisson regression.
The average population is calculated as the mean of the population 1 January 2007 and 1 January 2008.
http://www.scb.se
# NOT RUN { data(swe07) fit <- glm(deaths ~ offset(log.pop) + sex * as.factor(age), family = poisson, data = swe07) drop1(fit, test = "Chisq") ## Proportional hazards? # }
Run the code above in your browser using DataLab