Learn R Programming

s20x (version 3.1-40)

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 for backtransformation 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