Learn R Programming

heplots (version 0.9-10)

Hernior: Recovery from Elective Herniorrhaphy

Description

A data set on measures of post-operative recovery of 32 patients undergoing an elective herniorrhaphy operation, in relation to pre-operative measures.

Usage

data(Hernior)

Arguments

source

Mosteller, F. and Tukey, J. W. (1977), Data analysis and regression, Reading, MA: Addison-Wesley. Exhibit 8, 567-568. Their source: A study by B. McPeek and J. P. Gilbert of the Harvard Anesthesia Center.

Details

leave, nurse and los are outcome measures; the remaining variables are potential predictors of recovery status. The variable nurse is recorded as 1-4, with remaining (20) entries entered as "-" in both sources. It is not clear whether this means "none" or NA. The former interpretation was used in constructing the R data frame, so nurse==5 for these observations. Using Hernior$nurse[Hernior$nurse==5] <- NA would change to the other interpretation, but render nurse useless in a multivariate analysis. The ordinal predictors could instead be treated as factors, and there are also potential interactions to be explored.

References

Hand, D. J., Daly, F., Lunn, A. D., McConway, K. J. and Ostrowski, E. (1994), A Handbook of Small Data Sets, Number 484, 390-391.

Examples

Run this code
str(Hernior)
mod <- lm(cbind(leave, nurse, los) ~ age + sex +  pstat +  build + cardiac, data=Hernior)
Anova(mod, test="Roy") # actually, all tests are identical

clr <- c("red", "darkgray", "blue", "darkgreen", "magenta", "brown", "black")
heplot(mod, col=clr)
pairs(mod, col=clr)

# Add ellipse to test all 5 regressors simultaneously
hyp <- list("Regr" = c("age", "sexm", "pstat", "build", "cardiac"))
pairs(mod, hypotheses=hyp, col=clr)

Run the code above in your browser using DataLab