fastBoot4CA: 'fastBoot4CA': create for a Correspondence Analysis (CA) a...

View source: R/InferencesMultinom4CA-3.R

fastBoot4CAR Documentation

fastBoot4CA: create for a Correspondence Analysis (CA) a Bootstrap Cube obtained from bootstrapping the observations from a contingency table.

Description

fastBoot4CA: Creates Bootstrap cubes for the I and J sets of a CA. The Bootstrap cubes are obtained from bootstrapping the entries/cells of the contingency table. fastBoot4CA uses the multinomial distribution to generate the Bootstrap samples (function rmultinom) fastBoot4CA uses the transition formula to get the values of the column factors. Gives also the bootstrap eigenvalues (if eigen = TRUE).

Usage

fastBoot4CA(
  X,
  Fi = NULL,
  Fj = NULL,
  delta = NULL,
  nf2keep = 3,
  nIter = 1000,
  critical.value = 2,
  eig = FALSE,
  alphaLevel = 0.05
)

Arguments

X

the data matrix

Fi

(default = NULL) the I-set factor scores (for the rows) from the analysis of X. if NULL, Boot4RowCA will compute them.

Fj

(default = NULL), the J-set factor scores (for the columns) from the analysis of X. if NULL, Boot4RowCA will compute them.

delta

(default = NULL), the singular values from the CA of X. If NULL (default), Boot4RowCA will compute them.

nf2keep

How many factors to keep for the analysis (Default = 3).

nIter

(Default = 1000). Number of Iterations (i.e. number of Bootstrap samples).

critical.value

(Default = 2). The critical value for a BR to be considered significant.

eig

if TRUE compute bootstrapped confidence intervals (CIs) for the eigenvalues (default is FALSE).

alphaLevel

the alpha level to compute confidence intervals for the eigenvalues (with CIS at 1-alpha). Default is .05

Details

Note: the rmultinom() function cannot handle numbers of observations that are too high (i.e., roughly larger than 10^9), so if the table total is larger than 10^8, the table is recoded so that its sum is roughly equal to 10^8. Planned development: A compact version that gives only bootstrap ratios (not the whole brick BootstrapBricks).

fastBoot4CA should be used only when the data consists in a real contingency table with a relatively large N. Bootstrap estimates are obtained by creating bootstrap contingency tables from a multinomial distribution. Permutation tests are obtained by creating contingency tables matching H0 (i.e., multinomial with Pij = Pi*Pj) Permutation tests will not work with MCA though because in MCA a variable is coded with a set of 0/1 columns (complete disjonctive coding scheme)—A coding scheme which implies that the columns are not independent (because they come in blocks).

Value

a list with 1) bootCube.i of Bootstrapped factor scores (I-set) 2) bootRatios.i: the bootstrap ratios (BR) for bootRatiosSignificant.i: the Significant BRs; a list with bootCube.j: An Items * Dimension * Iteration Brick of Bootstrapped factor scores (J-set); bootRatios.j: the bootstrap ratios (BR); bootRatiosSignificant.j: the Significant BRs; eigenValues the nIter * nL table of eigenvalues; eigenCIs: the CIs for the eigenvalues.

Author(s)

Hervé Abdi


HerveAbdi/data4PCCAR documentation built on Sept. 11, 2022, 4:19 p.m.