Conduct MANOVA using PCA Scores and Factors in a Spectra Object
This function provides a convenient interface for carrying out manova using the scores from PCA and the factors (groups) stored in a
Spectra object. The function will do anova as well, if you only provide one vector of scores, though this is probably of limited use. A
Spectra object contains group information stored in its
spectra$groups element, but you can also use
splitSpectraGroups to generate additional groups/factors that might be more useful than the original.
An object of S3 class
An object of class
An integer vector giving the PCA scores to use as the response in the manova analysis.
A character vector giving the factors to be used in the manova. They will be searched for within the
Additional arguments to be passed downstream, in this case to
This function is an extraordinarily thin wrapper which helps the user to avoid writing a very tedious
The results of the analysis print to the console unless assigned. If assigned, the object class is one of several described in
aov depending upon the data passed to it.
Bryan A. Hanson, DePauw University. firstname.lastname@example.org
splitSpectraGroups which can be used to create additional factor elements in the
"Spectra" object, which can then be used with this function.
1 2 3 4 5 6 7 8 9
data(metMUD2) # Original factor encoding: levels(metMUD2$groups) # Split those original levels into 2 new ones (re-code them) new.grps <- list(geneBb = c("B", "b"), geneCc = c("C", "c")) mM3 <- splitSpectraGroups(metMUD2, new.grps) # Now do the PCA and anova pca <- c_pcaSpectra(mM3) hypTestScores(mM3, pca, fac = c("geneBb", "geneCc"))
Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.