case1702 {Sleuth2} | R Documentation |
Thirty couples participated in a study of love and marriage. Wives and husbands responded separately to four questions:
Each response was recorded on a five-point scale: 1=None, 2=Very Little, 3=Some, 4=A Great Deal and 5=A Tremendous Amount.
case1702
A data frame with 30 observations on the following 9 variables.
Couple
Hps
Wps
Hcs
Wcs
Hpy
Wpy
Hcy
Wcy
Ramsey, F.L. and Schafer, D.W. (2002). The Statistical Sleuth: A Course in Methods of Data Analysis (2nd ed), Duxbury.
Johnson, R.A. and Wichern, D.W. (1988). Applied Multivariate Statistical Analysis (2nd ed), Prentice-Hall.
str(case1702) # feelings about spouse tospouse <- with(case1702, cbind(Hps, Wps, Hcs, Wcs)) # perceived feelings from spouse fromspouse <- with(case1702, cbind(Hpy, Wpy, Hcy, Wcy)) cca <- cancor(tospouse,fromspouse) # Examine loadings of first canonical variables: par(mfrow=c(2,1)) barplot(cca$xcoef[,1], ylab="first 'to spouse' loadings", names=c("Hps","Wps","Hcs","Wcs")) barplot(cca$ycoef[,1], ylab="first 'from spouse' loadings", names=c("Hpy","Wpy","Hcy","Wcy")) # The first canonical variable for 'to spouse" is mostly Hcs # The first canonical variable for 'fom spouse' is mostly Hcy can.to <- tospouse can.from <- fromspouse can.to.1 <- can.to[,1] # first canonical variable can.from.1 <- can.from[,1] # first canonical variable pairs(cbind(can.to.1, case1702$Hcs, can.from.1, case1702$Hcy), labels=c("1st cv 'to'","husband's compassionate","1st cv 'from'","husband's perceived compassionate"))