Learn R Programming

psych (version 1.0-65)

sim: Functions to simulate psychological/psychometric data

Description

A number of functions in the psych package will generate simulated data. These functions include sim.circ, sim.congeneric, sim.dichot, sim.hierarchical, sim.item, sim.structural, and sim.VSS. These functions are separately documented and are listed here for ease of the help function. See each function for more detailed help.

Usage

sim()

Arguments

Details

Simulation of data structures is a very useful tool in psychometric research and teaching. By knowing ``truth" it is possible to see how well various algorithms can capture it. Various simulation functions in psych are:

sim.structure A function to combine a measurement and structural model into one data matrix. Useful for understanding structural equation models.

sim.congeneric A function to create congeneric items/tests for demonstrating classical test theory. This is just a special case of sim.structure. sim.hierarchical A function to create data with a hierarchical (bifactor) structure.

sim.item A function to create items that either have a simple structure or a circumplex structure.

sim.circ Create data with a circumplex structure.

sim.dichot Create dichotomous item data with a simple or circumplex structure.

References

Revelle, W. (in preparation) An Introduction to Psychometric Theory with applications in R. Springer. at http://personality-project.org/r/book/

See Also

See above

Examples

Run this code
sim.congeneric()
R <- sim.hierarchical()
R
fx <- matrix(c(.9,.8,.7,rep(0,6),c(.8,.7,.6)),ncol=2)
fy <- c(.6,.5,.4)
Phi <- matrix(c(1,0,.5,0,1,.4,0,0,0),ncol=3)
print(sim.structure(fx,Phi,fy,),digits=2)

Run the code above in your browser using DataLab