princomp
and prcomp
.
"screeplot"(x, bstick = FALSE, type = c("barplot", "lines"), npcs = min(10, if (is.null(x$CCA) || x$CCA$rank == 0) x$CA$rank else x$CCA$rank), ptype = "o", bst.col = "red", bst.lty = "solid", xlab = "Component", ylab = "Inertia", main = deparse(substitute(x)), legend = bstick, ...)
"screeplot"(x, bstick = FALSE, type = c("barplot", "lines"), npcs = 4, ptype = "o", bst.col = "red", bst.lty = "solid", xlab = "Component", ylab = "Inertia", main = deparse(substitute(x)), ...)
"screeplot"(x, bstick = FALSE, type = c("barplot", "lines"), npcs = min(10, length(x$sdev)), ptype = "o", bst.col = "red", bst.lty = "solid", xlab = "Component", ylab = "Inertia", main = deparse(substitute(x)), legend = bstick, ...)
"screeplot"(x, bstick = FALSE, type = c("barplot", "lines"), npcs = min(10, length(x$sdev)), ptype = "o", bst.col = "red", bst.lty = "solid", xlab = "Component", ylab = "Inertia", main = deparse(substitute(x)), legend = bstick, ...)
bstick(n, ...)
"bstick"(n, tot.var = 1, ...)
"bstick"(n, ...)
"bstick"(n, ...)
"bstick"(n, ...)
"bstick"(n, ...)
type == "lines"
or bstick = TRUE
, a
character indicating the type of plotting used for the lines;
actually any of the type
s as in plot.default
.bstick.default
.screeplot
draws a plot on the currently active device,
and returns invisibly the xy.coords
of the points or
bars for the eigenvalues.Function bstick
returns a numeric vector of broken stick
components.
prcomp
and princomp
. Function bstick
gives the brokenstick values which are ordered
random proportions, defined as $p[i] = tot/n sum(from x=i to n) 1/x$ (Legendre & Legendre 2012), where
$tot$ is the total and $n$ is the number of brokenstick
components (cf. radfit
). Broken stick has
been recommended as a stopping rule in principal component analysis
(Jackson 1993): principal components should be retained as long as
observed eigenvalues are higher than corresponding random broken stick
components.
The bstick
function is generic. The default needs the number of
components and the total, and specific methods extract this
information from ordination results. There also is a bstick
method for cca
. However, the broken stick model is not
strictly valid for correspondence analysis (CA), because eigenvalues
of CA are defined to be $<=1$, whereas="" brokenstick="" components="" have="" no="" such="" restrictions.="" the="" are="" not="" available="" for="" decorana where the sum of eigenvalues
(total inertia) is unknown, and the eigenvalues of single axes are not
additive in detrended analysis.
=1$,>
Legendre, P. and Legendre, L. (2012) Numerical Ecology. 3rd English ed. Elsevier.
cca
, decorana
, princomp
and
prcomp
for the ordination functions, and
screeplot
for the stock version. data(varespec)
vare.pca <- rda(varespec, scale = TRUE)
bstick(vare.pca)
screeplot(vare.pca, bstick = TRUE, type = "lines")
Run the code above in your browser using DataLab