cmpoutput | R Documentation |
Compares output observations from two or more groups.
cmpoutput(name, ve_npcs, data, obs_lvls, lim_npcs = TRUE, mnv_test = "Pillai")
name |
Comparison name (useful when calling this function to perform multiple comparisons). |
ve_npcs |
Percentage ( |
data |
A n x m matrix, where n is the total number of output observations (runs) and m is the number of variables (i.e. output length). |
obs_lvls |
Levels or groups associated with each observation. |
lim_npcs |
Limit number of principal components used for MANOVA to minimum number of observations per group? |
mnv_test |
The name of the test statistic to be used in MANOVA, as
described in |
Object of class cmpoutput
containing the following data:
n x n matrix containing projections of output data in the principal components space. Rows correspond to observations, columns to principal components.
Levels or groups associated with each observation.
Percentage of variance explained by each principal component.
Number of principal components specified in ve_npcs
OR
which explain the variance percentages given in ve_npcs
.
Percentage (between 0 and 1) of variance explained by the q principal components (i.e. number of dimensions) used in MANOVA.
Comparison name (useful when calling this function to perform multiple comparisons).
P-values for the performed statistical tests, namely:
List of p-values for the MANOVA test for each
number of principal component in npcs
.
Vector of p-values for the parametric test applied to groups along each principal component (t-test for 2 groups, ANOVA for more than 2 groups).
Vector of p-values for the non-parametric test applied to groups along each principal component (Mann-Whitney U test for 2 groups, Kruskal-Wallis test for more than 2 groups).
Same as field parametric
, but
p-values are adjusted using weighted Bonferroni procedure.
Percentages of explained variance are used as weights.
Same as field nonparametric
, but
p-values are adjusted using weighted Bonferroni procedure.
Percentages of explained variance are used as weights.
Objects returned by the manova
function for each value specified in ve_npcs
.
List of objects returned by applying
t.test
(two groups) or
aov
(more than two groups) to each principal
component.
List of objects returned by applying
wilcox.test
(two groups) or
kruskal.test
(more than two groups) to each
principal component.
# Comparing the first output ("Pop.Sheep") of one the provided datasets.
cmp <-
cmpoutput("SheepPop", 0.8, pphpc_ok$data[["Pop.Sheep"]], pphpc_ok$obs_lvls)
# Compare bogus outputs created from 2 random sources, 5 observations per
# source, 20 variables each, yielding a 10 x 20 data matrix.
data <- matrix(c(rnorm(100), rnorm(100, mean = 1)), nrow = 10, byrow = TRUE)
olvls <- factor(c(rep("A", 5), rep("B", 5)))
cmp <- cmpoutput("Bogus", 0.7, data, olvls)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.