onewayPlot: One-way Analysis of Variance Plot

Description Usage Arguments Methods (by class) See Also Examples

Description

Displays stripplot/boxplot of the reponse variable with intervals by factor levels. It is used as part of a one-way ANOVA analysis.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
onewayPlot(x, ...)

## Default S3 method:
onewayPlot(
  x,
  f,
  conf.level = 0.95,
  interval.type = "tukey",
  pooled = TRUE,
  strip = TRUE,
  vert = TRUE,
  verbose = FALSE,
  ylabel = deparse(terms(formula)[[2]]),
  flabel = deparse(terms(formula)[[3]]),
  ...
)

## S3 method for class 'formula'
onewayPlot(
  formula,
  data = parent.frame(),
  conf.level = 0.95,
  interval.type = "tukey",
  pooled = TRUE,
  strip = TRUE,
  vert = TRUE,
  verbose = FALSE,
  ylabel = deparse(terms(formula)[[2]]),
  flabel = deparse(terms(formula)[[3]]),
  ...
)

## S3 method for class 'lm'
onewayPlot(x, ..., ylabel = nms[1], flabel = nms[2])

Arguments

x

a vector of responses, a formula object or an lm object

...

optional arguments.

f

if x is a vector of responses then f contains the group labels for each observation in x. That is, the ith value in f says which group the ith observation of x belongs to.

conf.level

confidence level of the intervals.

interval.type

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

pooled

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

strip

if strip=F, boxplots are displayed instead.

vert

if vert=F, horizontal stripplots are displayed instead (boxplots can only be displayed vertically).

verbose

if true, print intervals on console.

ylabel

can be used to replace variable name of y by another string.

flabel

can be used to replace variable name of f by another string.

formula

a symbolic description of the model to be fit.

data

an optional data frame in which to evaluate the formula.

Methods (by class)

See Also

summary1way, t.test.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
##see example in 'summary1way'

##computer data:
data(computer.df)
onewayPlot(score~selfassess, data = computer.df)


##apple data:
data(apples.df)
twosampPlot(Weight~Propagated, data = apples.df)

##oyster data:
data(oysters.df)
onewayPlot(log(Oysters)~Site, data = oysters.df)

##oyster data:
data(oysters.df)
oyster.fit = lm(log(Oysters)~Site, data = oysters.df)
onewayPlot(oyster.fit)

s20x documentation built on Aug. 23, 2021, 9:15 a.m.

Related to onewayPlot in s20x...