anova2: Two-way analysis of variance

Description Usage Arguments Value Examples

View source: R/ch13-fn.R

Description

Two-way analysis of variance

Usage

1
2
anova2(y, f1, f2, xl1, xl2, yl, step = 0:7, alp = 0.05, inter = TRUE,
  maxim = TRUE, nb = 4, dig = 4)

Arguments

y

Response variable data

f1

Levels of factor1 (same length as y)

f2

Levels of factor2 (same length as y)

xl1

Label of x-axis (default=name of f1)

xl2

Legend label (default=name of f2)

yl

Label of y-axis (default=name of y)

step

Steps of the analysis of variance, Default: 0:7

alp

Level of significance, Default: 0.05

inter

Logical value for including interaction, Default: TRUE

maxim

Logical value for maximization problem, Default: TRUE

nb

Number of best level to be compared, Default: 4

dig

Number of digits below the decimal point, Default: 4

Value

None.

Examples

1
2
3
4
5
6
Yield = c(76,79,81,79,83,85, 79,81,84,86,89,88, 87,91,91,94,88,86, 79,82,85,84,77,76)
f1 = c(rep(100,6), rep(150,6), rep(200,6), rep(250,6))
f2 = rep(c(1,1,2,2,3,3), 4)
Temp = as.factor(f1)
Press = as.factor(paste0(f2, "Psig"))
anova2(Yield, Temp, Press)

tjssu/Rstat documentation built on Aug. 8, 2020, 12:38 p.m.