Plot of the factor effects with significance levels based on robust estimation of contrast standard errors.
LenthPlot(obj, alpha = 0.05, plt = TRUE, limits = TRUE,
xlab = "factors", ylab = "effects", faclab = NULL, cex.fac = graphics::par("cex.lab"),
cex.axis=graphics::par("cex.axis"), adj = 1, ...)
The function is called mainly for its side effect. It returns a vector with the value of alpha used, the estimated PSE, ME and SME.
object of class lm
or vector with the factor effects.
numeric. Significance level used for the margin of error (ME) and simultaneous margin of error (SME). See Lenth(1989).
logical. If TRUE
, a spikes plot with the factor effects is displayed.
Otherwise, no plot is produced.
logical. If TRUE
ME and SME limits are displayed and labeled.
character string. Used to label the x-axis. "factors" as default.
character string. Used to label the y-axis. "effects" as default.
list with components idx
(numeric vector)
and lab
(character vector). The idx
entries of
effects vector (taken from obj
) are labelled as lab
.
The rest of the effect names are blanked. If NULL
all factors
are labelled using the coefficients' name.
numeric. Character size used for the factor labels.
numeric. Character size used for the axis.
numeric between 0 and 1. Determines where to place the
"ME" (margin of error) and the "SME" (simultaneous margin of error) labels
(character size of 0.9*cex.axis
).
0 for extreme left hand side, 1 for extreme right hand side.
extra parameters passed to plot
.
Ernesto Barrios. Extension provided by Kjetil Kjernsmo (2013).
If obj
is of class lm
, 2*coef(obj)
is used as factor
effect with the intercept term removed. Otherwise, obj
should be a
vector with the factor effects. Robust estimate of the contrasts standard
error is used to calculate marginal (ME) and simultaneous margin
of error (SME) for the provided significance (1 - alpha
) level.
See Lenth(1989). Spikes are used to display the factor effects.
If faclab
is NULL
, factors are labelled with the effects or
coefficient names. Otherwise, those faclab\$idx
factors are labelled
as faclab\$lab
. The rest of the factors are blanked.
Lenth, R. V. (1989). "Quick and Easy Analysis of Unreplicated Factorials". Technometrics Vol. 31, No. 4. pp. 469--473.