PsyAcad | R Documentation |
A researcher collected data on three psychological variables, four academic variables (standardized test scores) and gender for 600 college freshman. She is interested in how the set of psychological variables relates to the academic variables and gender. In particular, the researcher is interested in how many dimensions (canonical variables) are necessary to understand the association between the two sets of variables.
data("PsyAcad")
A data frame with 600 observations on the following 8 variables.
LocControl
locus of control, a numeric vector
SelfConcept
self concept, a numeric vector
Motivation
motivation, a numeric vector
Read
reading score, a numeric vector
Write
writing score, a numeric vector
Math
mathematics score, a numeric vector
Science
science score, a numeric vector
Sex
a factor with levels M
, F
Taken from http://www.stats.idre.ucla.edu/r/dae/canonical-correlation-analysis
data(PsyAcad)
PsyAcad$Sex <- as.numeric(PsyAcad$Sex)
PsyAcad.can <- cancor(cbind(LocControl, SelfConcept, Motivation) ~
Read + Write + Math + Science + Sex, data = PsyAcad)
PsyAcad.can
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.