# NOT RUN {
# data that simulate those from De Leo & Wulfert (2013)
CANCOR(data = na.omit(data_CCA_De_Leo),
set1 = c('Tobacco_Use','Alcohol_Use','Illicit_Drug_Use','Gambling_Behavior',
'Unprotected_Sex','CIAS_Total'),
set2 = c('Impulsivity','Social_Interaction_Anxiety','Depression',
'Social_Support','Intolerance_of_Deviance','Family_Morals',
'Family_Conflict','Grade_Point_Average'),
plot = TRUE, plotCV = 1, plotcoefs='structure',
verbose = TRUE)
# }
# NOT RUN {
# data from Tabachnik & Fidell (2013, p. 589)
CANCOR(data = data_CCA_Tabachnik,
set1 = c('TS','TC'),
set2 = c('BS','BC'),
plot = TRUE, plotCV = 1, plotcoefs='structure',
verbose = TRUE)
# UCLA dataset
UCLA_CCA_data <- read.csv("https://stats.idre.ucla.edu/stat/data/mmreg.csv")
colnames(UCLA_CCA_data) <- c("LocusControl", "SelfConcept", "Motivation",
"read", "write", "math", "science", "female")
summary(UCLA_CCA_data)
CANCOR(data = UCLA_CCA_data,
set1 = c("LocusControl","SelfConcept","Motivation"),
set2 = c("read","write","math","science","female"),
plot = TRUE, plotCV = 1, plotcoefs='standardized',
verbose = TRUE)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab