cancorr {mulSEM} | R Documentation |
Canonical Correlation Analysis
Description
It conducts a canonical correlation analysis using the OpenMx package. Missing data are handled with the full information maximum likelihood method when raw data are available. It provides standard errors on the estimates.
Usage
cancorr(X_vars, Y_vars, data=NULL, Cov, numObs,
model=c("CORR-W", "CORR-L", "COV-W", "COV-L"),
extraTries=50, ...)
Arguments
X_vars |
A vector of characters of the X variables. |
Y_vars |
A vector of characters of the Y variables. |
data |
A data frame of raw data. |
Cov |
A covariance or correlation matrix if |
numObs |
A sample size if |
model |
Four models defined in Gu, Yung, and Cheung
(2019). |
extraTries |
This function calls |
... |
Value
A list of output with class CanCor
. It stores the model in
OpenMx objects. The fitted object is in the slot of mx.fit
.
Note
cancorr
expects that there are equal or more number of
variables in Y_vars
. If there are fewer variables in
Y_vars
, you may swap between X_vars
and Y_vars
.
Author(s)
Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>
References
Gu, F., Yung, Y.-F., & Cheung, M. W.-L. (2019). Four covariance structure models for canonical correlation analysis: A COSAN modeling approach. Multivariate Behavioral Research, 54(2), 192-223. https://doi.org/10.1080/00273171.2018.1512847