summary1way: One-way Analysis of Variance Summary

View source: R/summary1way.R

summary1wayR Documentation

One-way Analysis of Variance Summary

Description

Displays summary information for a one-way anova analysis. The lm object must come from a numerical response variable and a single factor. The output includes: (i) anova table; (ii) numeric summary; (iii) table of effects; (iv) plot of data with intervals.

Usage

summary1way(
  fit,
  digit = 5,
  conf.level = 0.95,
  inttype = "tukey",
  pooled = TRUE,
  print.out = TRUE,
  draw.plot = TRUE,
  ...
)

Arguments

fit

an lm object, i.e. the output from lm.

digit

decimal numbers after the point.

conf.level

confidence level of the intervals.

inttype

three options for intervals appeared on plot: 'hsd','lsd' or 'ci'.

pooled

two options: pooled or unpooled standard deviation used for plotted intervals.

print.out

if TRUE, print out the output on the screen.

draw.plot

if TRUE, plot data with intervals.

...

more options.

Value

Invisibly returns a list containing the one-way ANOVA summary components used in the printed teaching output. The list contains:

Df

degrees of freedom for between groups, within groups, and total.

Sum of Sq

sum of squares for between groups, within groups, and total.

Mean Sq

mean squares for between groups and within groups.

F value

the one-way ANOVA F statistic.

Pr(F)

the P-value associated with the F test.

Main Effect

the grand mean of the response.

Group Effects

group deviations from the grand mean.

The printed ANOVA table, numeric summary, effects table, and optional plot are the primary teaching interface. The returned list is invisible so classroom use can focus on the printed output while programmatic callers can still inspect the computed values.

See Also

summary2way, anova, aov, dummy.coef, onewayPlot

Examples


## Computer questionnaire data:
data(computer.df)
computer.df = within(computer.df, {
    selfassess = factor(selfassess)
})
computer.fit = lm(score ~ selfassess, data = computer.df)
result = summary1way(computer.fit)
result


s20x documentation built on July 1, 2026, 9:06 a.m.