data(withinBetween)
statsBy
can decompose the observed correlation in the between and within correlations. sim.multilevel
can produce similar data.
Pedhazur, E.J. (1997) Multiple regression in behavioral research: explanation and prediction. Harcourt Brace.
Revelle, W. An introduction to psychometric theory with applications in R (in prep) Springer. Draft chapters available at
data(withinBetween)
pairs.panels(withinBetween,bg=c("red","blue","white","black")[withinBetween[,1]],pch=21,ellipses=FALSE)
stats <- statsBy(withinBetween,'Group')
print(stats,short=FALSE)
Run the code above in your browser using DataLab