##---- Should be DIRECTLY executable !! ----
library("psychTools")
data(peas)
# Visualize the peas data
library(ggplot2)
ggplot(peas,aes(parent,child)) +
geom_count() + scale_radius(range=c(0,5)) +
xlim(c(13.5,24))+ylim(c(13.5,24))+ coord_fixed() +
theme(legend.position="bottom")
# Compute one of the coefficients
xicor(peas$parent,peas$child,pvalue=TRUE)
xicor(peas$child,peas$parent)
# Compute all the coefficients
xicor(peas)
Run the code above in your browser using DataLab