infections: Infection Count Data for Poisson Regression
Description
A simulated dataset giving the number of infections recorded for
100 patients over a one-year follow-up in a placebo-controlled study. It is
designed for teaching Poisson regression of a count outcome on a treatment
group and a continuous covariate.
Usage
data("infections")
Arguments
Format
A data frame with 100 rows and 4 columns.
id
patient identifier (1 to 100).
treatment
the treatment group, "placebo" or "treated".
age
the patient's age, in years.
count
the number of infections recorded during the one-year
follow-up (a count outcome).
data(infections)
head(infections)
# Poisson regression of the infection count on treatment and agefit <- glm(count ~ treatment + age, family = poisson, data = infections)
summary(fit)