Checks analysis with partial bootstrap resampling.
Usage
bootstrap(object, ...)
# S4 method for CA
bootstrap(object, n = 30)
# S4 method for PCA
bootstrap(object, n = 30)
Value
#'
Returns a BootstrapCA
or a BootstrapPCA
object.
References
Greenacre, Michael J. Theory and Applications of Correspondence Analysis. London: Academic Press, 1984.
Lebart, L., Piron, M. and Morineau, A. Statistique exploratoire multidimensionnelle: visualisation et inférence en fouille de données. Paris: Dunod, 2006.
Examples
## Bootstrap on CA
## Data from Lebart et al. 2006, p. 170-172
data("colours")
## Compute correspondence analysis
X <- ca(colours)
## Bootstrap (30 replicates)
Y <- bootstrap(X, n = 30)
if (FALSE) {
## Get replicated coordinates
get_replications(Y, margin = 1)
get_replications(Y, margin = 2)
}
## Plot with ellipses
viz_rows(Y)
viz_tolerance(Y, margin = 1, level = c(0.68, 0.95))
viz_columns(Y)
viz_tolerance(Y, margin = 2, level = c(0.68, 0.95))
## Plot with convex hulls
viz_columns(Y)
viz_hull(Y, margin = 2)
## Bootstrap on PCA
## Compute principal components analysis
data("iris")
X <- pca(iris)
#> 1 qualitative variable was removed: Species.
## Bootstrap (30 replicates)
Y <- bootstrap(X, n = 30)
## Plot with ellipses
viz_variables(Y)
viz_tolerance(Y, margin = 2, level = c(0.68, 0.95))