cancor.phylog {PHYLOGR} | R Documentation |
Canonical Correlation Analysis from Simulated Data Sets
Description
Performs a canonical correlation analysis on two sets of simulated data and returns the canonical correlations.
Usage
cancor.phylog(data1, data2, max.num=0, exclude.tips=NULL,lapply.size=100,
xcenter=TRUE, ycenter=TRUE)
Arguments
data1 |
the columns from a data set returned from read.sim.data that you want to use as the first set in the canonical correlation analysis. The first column MUST be sim.counter and the second Tips. |
data2 |
the columns from a data set returned from read.sim.data that you want to use as the second set in the canonical correlation analysis. The first column MUST be sim.counter and the second Tips. |
max.num |
if different from 0, the maximum number of simulations to analyze. |
exclude.tips |
an optional vector giving the names of tips to exclude from the analyses. |
lapply.size |
a tuning parameter that can affect the speed of calculations; see Details in phylog.lm. |
xcenter |
should the x columns be centered? defaults to yes; see cancor. |
ycenter |
should the y columns be centered? defaults to yes; see cancor. |
Value
A list (of class phylog.cancor) with components
call |
the call to the function |
CanonicalCorrelations |
the canonical correlations. The one with sim.counter=0 corresponds to the original (”real”) data. |
WARNING
It is necessary to be careful with the null hypothesis you are testing and how the null data set —the simulations— are generated. For instance, suppose you want to examine the canonical correlations between sets x and y; you will probably want to generate x and y each with the observed correlations within each set so that the correlations within each set are maintained (but with no correlations among sets). You probably do not want to generate each of the x's as if they were independent of each other x, and ditto for y, since that will destroy the correlations within each set; see some discussion in Manly, 1997.
Author(s)
Ramon Diaz-Uriarte and Theodore Garland, Jr.
References
Diaz-Uriarte, R., and Garland, T., Jr., in prep. PHYLOGR: an R package for the analysis of comparative data via Monte Carlo simulations and generalized least squares approaches.
Krzanowski, W. J. (1990) Principles of multivariate analysis Oxford University Press.
Manly,B. F. J. (1997) Randomization, bootstraping, and Monte Carlo methods in biology, 2nd ed. Chapman & Hall.
Morrison, D. F. (1990) Multivariate statistcal methods, 3rd ed. McGraw-Hill.
See Also
read.sim.data
, summary.phylog.cancor
Examples
data(SimulExample)
ex1.cancor <- cancor.phylog(SimulExample[,c(1,2,3,4,5)],SimulExample[,c(1,2,6,7,8)])
ex1.cancor
summary(ex1.cancor)
plot(ex1.cancor)