Principal Component Analysis (PCA) and a battery of inference tests via InPosition. The battery includes permutation and bootstrap tests.
epPCA.inference.battery(DATA, scale = TRUE, center = TRUE, DESIGN = NULL,
make_design_nominal = TRUE, graphs = TRUE, k = 0,
test.iters = 100, constrained = FALSE, critical.value = 2)
original data to perform a PCA on.
a boolean, vector, or string. See expo.scale
for details.
a boolean, vector, or string. See expo.scale
for details.
a design matrix to indicate if rows belong to groups.
a boolean. If TRUE (default), DESIGN is a vector that indicates groups (and will be dummy-coded). If FALSE, DESIGN is a dummy-coded matrix.
a boolean. If TRUE (default), graphs and plots are provided (via epGraphs
)
number of components to return.
number of iterations
a boolean. If a DESIGN matrix is used, this will constrain bootstrap resampling to be within groups.
numeric. A value, analogous to a z- or t-score to be used to determine significance (via bootstrap ratio).
Returns two lists ($Fixed.Data and $Inference.Data). For $Fixed.Data, see epPCA
, corePCA
for details on the descriptive (fixed-effects) results.
$Inference.Data returns:
Permutation tests of components. p-values ($p.vals) and distributions of eigenvalues ($eigs.perm) for each component
Bootstrap tests of measures (columns). See boot.ratio.test
output details.
epPCA.inference.battery
performs principal components analysis and inference tests on a data matrix.
If the expected time to compute the results (based on test.iters
) exceeds 1 minute, you will be asked (via command line) if you want to continue.
# NOT RUN {
data(words)
pca.words.res <- epPCA.inference.battery(words$data)
# }
Run the code above in your browser using DataCamp Workspace