# NOT RUN {
## Example parallels the R builtin cancor and the
## yacca cca example
data(LifeCycleSavings)
pop <- LifeCycleSavings[, 2:3]
oec <- LifeCycleSavings[, -(2:3)]
## Perform Commonality Coefficient Analysis
canonCommonData<-canonCommonality(pop,oec,1)
## Use HS dataset in MBESS
require ("MBESS")
data(HS)
attach(HS)
## Create canonical variable sets
MATH_REASON<-HS[,c("t20_deduction","t22_problem_reasoning")]
MATH_FUND<-HS[,c("t21_numerical_puzzles","t24_woody_mccall","t10_addition")]
## Perform Commonality Coefficient Analysis
canonCommonData<-canonCommonality(MATH_FUND,MATH_REASON,1)
detach(HS)
# }
Run the code above in your browser using DataLab