Learn R Programming

eha (version 2.8.1)

swe07: Swedish population and deaths in ages 61--80, 2007.

Description

The Swedish population and No. of deaths by age and sex in the ages 61--80. Data from the year 2007.

Usage

data(swe07)

Arguments

Format

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.

Details

The average population is calculated as the mean of the population 1 January 2007 and 1 January 2008.

References

http://www.scb.se

Examples

Run this code
# 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