Learn R Programming

SMPracticals (version 1.4-3.1)

magnesium: Magnesium Treatment for Heart Attack Patients

Description

Data from 11 clinical trials to compare magnesium treatment for heart attacks with control.

Usage

data(magnesium)

Arguments

Format

A data frame with 22 observations on the following 4 variables.

trial

a factor with levels 1--11

group

Treatment indicator (factor)

m

Total patients in group

r

Number of deaths in group

References

Davison, A. C. (2003) Statistical Models. Cambridge University Press. Page 208.

Examples

Run this code
data(magnesium)
fit <- glm(cbind(r,m-r)~trial+group,binomial,data=magnesium[1:20,])
anova(fit,test="Chi")
summary(fit)

Run the code above in your browser using DataLab