# data that simulate those from De Leo & Wulfert (2013)
CANCOR(data = data_CANCOR$DeLeo_2013,
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)
# \donttest{
# data from Ho (2014, Chapter 17)
CANCOR(data = data_CANCOR$Ho_2014,
set1 = c("willing_use","likely_use","intend_use","certain_use"),
set2 = c("perceived_risk","perceived_severity","self_efficacy",
"response_efficacy","maladaptive_coping","fear"),
plot = 'yes', plotCV = 1)
# data from Rencher (2002, pp. 366, 369, 372)
CANCOR(data = data_CANCOR$Rencher_2002,
set1 = c("y1","y2","y3"),
set2 = c("x1","x2","x3","x1x2","x1x3","x2x3","x1sq","x2sq","x3sq"),
plot = 'yes', plotCV = 1)
# data from Tabachnik & Fidell (2019, p. 451, 460) small dataset
CANCOR(data = data_CANCOR$TabFid_2019_small,
set1 = c('TS','TC'),
set2 = c('BS','BC'),
plot = TRUE, plotCV = 1, plotcoefs='structure',
verbose = TRUE)
# data from Tabachnik & Fidell (2019, p. 463) complete dataset
CANCOR(data = data_CANCOR$TabFid_2019_complete,
set1 = c("esteem","control","attmar","attrole"),
set2 = c("timedrs","attdrug","phyheal","menheal","druguse"),
plot = TRUE, plotCV = 1, plotcoefs='structure',
verbose = TRUE)
# UCLA dataset https://stats.oarc.ucla.edu/r/dae/canonical-correlation-analysis/
CANCOR(data = data_CANCOR$UCLA,
set1 = c("Locus_Control","Self_Concept","Motivation"),
set2 = c("Read","Write","Math","Science","Sex"),
plot = TRUE, plotCV = 1, plotcoefs='standardized',
verbose = TRUE)
# }
Run the code above in your browser using DataLab