Learn R Programming

s20x (version 3.3.0)

multipleComp: Multiple Comparisons

Description

Calculates and prints the estimate, multiple 95% confidence intervals, unadjusted, Tukey and Bonferroni p-values for all possible differences in means in a one-way ANOVA.

Usage

multipleComp(fit, conf.level = 0.95, FUN = identity)

Value

Returns a list of estimates, confidence intervals and p-values.

Arguments

fit

Output from the command [lm()].

conf.level

Confidence level for the confidence interval, expressed as a percentage.

FUN

Optional function to be applied to estimates and confidence intervals. Typically used for back-transformation operations.

Examples

Run this code
## computer data
data(computer.df)
fit = lm(score ~ factor(selfassess), data = computer.df)
multipleComp(fit)

## butterfat data
data("butterfat.df")
fit = lm(log(Butterfat) ~ Breed, data = butterfat.df)
multipleComp(fit, FUN = exp)

Run the code above in your browser using DataLab