Learn R Programming

Sleuth2 (version 1.0-3)

case1702: Love and Marriage

Description

Thirty couples participated in a study of love and marriage. Wives and husbands responded separately to four questions:
  1. What is the level of passionate love you feel for your spouse?
  2. What is the level of passionate love your spouse feels for you?
  3. What is the level of compassionate love you feel for your spouse?
  4. What is the level of compassionate love your spouse feels for you?
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.

Usage

case1702

Arguments

source

Ramsey, F.L. and Schafer, D.W. (2002). The Statistical Sleuth: A Course in Methods of Data Analysis (2nd ed), Duxbury.

References

Johnson, R.A. and Wichern, D.W. (1988). Applied Multivariate Statistical Analysis (2nd ed), Prentice-Hall.

Examples

Run this code
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 <- tospousecan.from <- fromspousecan.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"))

Run the code above in your browser using DataLab