Learn R Programming

DAKS (version 2.1-3)

simu: Data and Quasi Order Simulation Tool

Description

simu can be used to simulate binary, of type $1$/$0$, data using a basic local independence model. The number of items, the sample size, and two parameters for the careless error and lucky guess probabilities can be set explicitly. The underlying combinatorial structure used for simulating the data can either be specified manually or is generated randomly.

Usage

simu(items, size, ce, lg, imp = NULL, delta)

Arguments

items
a required numeric giving the number of items of the domain taken as basis for the simulation.
size
a required numeric giving the number of response patterns to be simulated (the sample size).
ce
a required numeric giving the probability for a careless error.
lg
a required numeric giving the probability for a lucky guess.
imp
an optional object of class set representing the underlying set of implications (assumed to be a quasi order) used for simulating the data, for instance obtained from a call to iita. The default imp = NULL corresponds to generating the quasi order used for simulating the data randomly.
delta
a required (if imp = NULL) numeric giving the probability for adding an item pair to the randomly generated quasi order (reflexive pairs are always included a priori).

Value

If the arguments items, size, ce, lg, imp, and delta are of required types, simu returns a named list consisting of the following three components:
dataset
a matrix of binary, $1$ or $0$, numeric data.
implications
an object of class set representing the underlying set of implications (assumed to be a quasi order) used for simulating the data. If imp = NULL, this is the quasi order that was randomly generated; otherwise identical to the set of implications specified in the argument imp.
states
a matrix consisting of ones or zeros (the quasi ordinal knowledge space), in which each row represents the $1$/$0$-pattern of a knowledge state. This is the knowledge structure corresponding to the set of implications specified in implications.

Details

The function simu simulates data using a special case of the basic local independence model, which is a fundamental restricted latent class model in knowledge space theory (Doignon and Falmagne, 1999). The single careless error ce and lucky guess lg probabilities are assumed to be constant over all items. The most general case that can be specified thus includes two error probabilities at each item, the same two rates for all items. The general form of the basic local independence model allows for varying careless error and lucky guess rates from item to item (not identifiable in general, however).

If a quasi order is specified in imp explicitly, Birkhoff's theorem is used to derive its corresponding quasi ordinal knowledge space, which is equipped with the error probabilities ce and lg to give the basic local independence model used for simulating the data. If imp = NULL, the underlying quasi order is generated randomly as follows. All reflexive pairs are added to the relation. The constant specified in delta is utilized as the probability for adding each of the remaining non-reflexive item pairs to the relation. The transitive closure of this relation is computed, and the resulting quasi order is then the relation underlying the simulation.

A set of implications, an object of the class set, consists of $2$-tuples $(i, j)$ of the class tuple, where a $2$-tuple $(i, j)$ is interpreted as `mastering item $j$ implies mastering item $i$.'

The simulated dataset contains only ones and zeros, which encode solving or failing to solve an item, respectively.

References

Doignon, J.-P. and Falmagne, J.-C. (1999) Knowledge Spaces. Berlin, Heidelberg, and New York: Springer-Verlag.

Sargin, A. and Uenlue, A. (2009) Inductive item tree analysis: Corrections, improvements, and comparisons. Mathematical Social Sciences, 58, 376--392.

Uenlue, A. and Sargin, A. (2010) DAKS: An R package for data analysis methods in knowledge space theory. Journal of Statistical Software, 37(2), 1--31. URL http://www.jstatsoft.org/v37/i02/.

See Also

state2imp for transformation from knowledge states to implications; imp2state for transformation from implications to knowledge states; pop_iita for population inductive item tree analysis; iita, the interface that provides the three (sample) inductive item tree analysis methods under one umbrella. See also DAKS-package for general information about this package.

Examples

Run this code
simu(7, 20, 0.1, 0.1, delta = 0.15)

Run the code above in your browser using DataLab