psych (version 1.0-42)

phi.demo: Create demo data for psychometrics

Description

A not very interesting demo of what happens if bivariate continuous data are dichotomized. Bascially a demo of r, phi, and polychor.

Usage

phi.demo(n=1000,r=.6, cuts=c(-2,-1,0,1,2))

Arguments

n
number of cases to simulate
r
correlation between latent and observed
cuts
form dichotomized variables at the value of cuts

Value

  • a matrix of correlations and a graphic plot)

Details

A demonstration of the problem of different base rates on the phi correlation, and how these are partially solved by using the polychoric correlation. Not one of my more interesting demonstrations. See http://personality-project.org/r/simulating-personality.html and http://personality-project.org/r/r.datageneration.html for better demonstrations of data generation.

References

http://personality-project.org/r/simulating-personality.html and http://personality-project.org/r/r.datageneration.html for better demonstrations of data generation.

See Also

VSS.simulate,item.sim

Examples

Run this code
round(phi.demo() ,2)  #compare the phi (lower off diagonal and polychoric correlations (upper off diagonal)

Run the code above in your browser using DataCamp Workspace