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.
cancorr(X_vars, Y_vars, data=NULL, Cov, numObs,
model=c("CORR-W", "CORR-L", "COV-W", "COV-L"),
extraTries=50, ...)
A list of output with class CanCor
. It stores the model in
OpenMx objects. The fitted object is in the slot of mx.fit
.
A vector of characters of the X variables.
A vector of characters of the Y variables.
A data frame of raw data.
A covariance or correlation matrix if data
is not
available.
A sample size if data
is not available.
Four models defined in Gu, Yung, and Cheung
(2019). CORR
and COV
refer to the analysis of
correlation structure and covariance structure, respectively.
This function calls mxTryHard
to obtain the parameter estimates and their standard
errors. extraTries
indicates the number of extra runs. If
extraTries=0
, mxRun
is called.
Additional arguments sent to either
mxTryHard
or mxRun
.
Mike W.-L. Cheung <mikewlcheung@nus.edu.sg>
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
Thorndike00
, sas_ex1