Learn R Programming

kstMatrix (version 2.2-1)

kmsimulate: Simulate a set of response patterns according to the BLIM

Description

kmsimulate returns a data set of n simulated response patterns based on the knowledge structure x given as a binary matrix. The simulation follows the BLIM (Basic Local Independence Model; see Doigon & Falmagne, 1999).

Usage

kmsimulate(x, n, beta, eta)

Value

Binary matrix representing the simulated data set

Arguments

x

Binary matrix representing a knowledge space

n

Number of simulated response patterns

beta

Careless error probability value or vector

eta

Lucky guess probability value or vector

Details

The beta and eta parameters must be either single numericals or vectors with a length identical to the number of rows in the x matrix. A mixture is possible.

The sample function used by kmsimulate might work inaccurately for knowledge structures x with 2^31 or more states.

References

Doignon, J.-P. & Falmagne, J.-C. (1999). Knowledge Spaces. Springer–Verlag, Berlin.

Examples

Run this code
kmsimulate(xpl$space, 50, 0.2, 0.1)
kmsimulate(xpl$space, 50, c(0.2, 0.25, 0.15, 0.2), c(0.1, 0.15, 0.05, 0.1))
kmsimulate(xpl$space, 50, c(0.2, 0.25, 0.15, 0.2), 0)

Run the code above in your browser using DataLab