case1803: Smoking and Lung Cancer

case1803R Documentation

Smoking and Lung Cancer

Description

In a retrospective case-control study, researchers identified 86 lung cancer patients and 86 controls (without lung cancer), and categorized them according to whether they were smokers or non-smokers. The goal is to see whether the odds of lung cancer are greater for smokers than for non-smokers.

Usage

case1803

Format

A data frame with 2 observations on the following 3 variables.

Smoking

a factor with levels "NonSmokers" and "Smokers"

Cancer

the number of who were lung cancer patients

Control

the number who were controls

Source

Ramsey, F.L. and Schafer, D.W. (2013). The Statistical Sleuth: A Course in Methods of Data Analysis (3rd ed), Cenage Learning.

References

Anderson, T.W., Reid, D.B.W. and Beaton, G. H. (1972). Vitamin C and the Common Cold, Canadian Medial Association Journal 107: 503–508.

Examples

str(case1803)
attach(case1803)
   
## INFERENCE
myTable   <- cbind(Cancer,Control)   # Make a 2-by-2 table of counts 
row.names(myTable)  <- Smoking   # Assign the levels of Smoking as row names  
myTable   

fisher.test(myTable,  alternative="greater")  # Alternative: that odds of Cancer 
  # in first row are greater.
fisher.test(myTable) # 2-sided alternative to get CI for odds ratio
myGlm1  <- glm(myTable ~ Smoking, family=binomial) # logistic reg (Ch 21)
summary(myGlm1)
exp(myGlm1$coef[2]) # 5.37963 : Estimated odds ratio
exp(confint(myGlm1)[2,]) #  1.675169 24.009510:  Approximate confidence interval
# Interpretation: The odds of cancer ar 5.4 times as large for smokers as for 
# non-smokers (95% confidence interval: 1.7 to 24.0 times as large).

detach(case1803)

Sleuth3 documentation built on Jan. 25, 2024, 3:01 p.m.