if(require(polycor)) {demo <- phi.demo()
round(demo$tetrachoric,2) #these should actually be all 1s but won't be
round(demo$phis,2) #compare the phi (lower off diagonal and polychoric correlations (upper off diagonal)
} else {print("I am sorry, this demo requires the polycor package")}
Run the code above in your browser using DataLab