pattern: Frequencies of Response Patterns and Knowledge States

Description Usage Arguments Details Value Note Author(s) References See Also Examples

View source: R/pattern.r

Description

pattern computes the absolute frequencies of the (occurring) response patterns, and optionally, the absolute frequencies of a collection of specified knowledge states in a dataset.

Usage

1
pattern(dataset, n = 5, P = NULL)

Arguments

dataset

a required data frame or matrix consisting of binary, 1 or 0, numeric data.

n

an optional numeric, with default n = 5, giving the n highest frequencies and their corresponding response patterns to be returned.

P

an optional matrix of ones and zeros giving the knowledge states to be used. The default P = NULL corresponds to no knowledge states being specified.

Details

This function can be used to retrieve information about how often response patterns and knowledge states occur in a dataset. The argument n refers to response patterns, not knowledge states, and in particular is independent of specifications of the argument P. If pattern is called without specifying n explicitly, the response patterns with the five highest frequencies are returned (along with their frequencies). If n is specified, the response patterns with the n highest frequencies are returned (along with their frequencies). If n is larger than the number of different response patterns in the dataset, n is set the number of different response patterns.

The knowledge states are represented as 1/0-patterns and are the rows of the argument matrix P. The matrix P must contain only ones and zeros, which encode whether or not an item belongs to a knowledge state, respectively. If P is not specified, pattern only returns information about response patterns (as described previously).

The data must contain only ones and zeros, which encode solving or failing to solve an item, respectively.

Value

If the arguments dataset, n, and P are of required types, pattern returns a named list consisting of the following three components:

response.patterns

an array giving the response patterns (with the n highest frequencies) and their absolute frequencies in dataset.

states

a matrix of the knowledge states and their absolute frequencies in dataset. Each row represents a knowledge state, the last column gives the frequencies of the states. If P = NULL, the component states is NULL.

n

a numeric giving the number of response patterns that are returned.

Note

Although pattern is intended for use with dichotomous data, it also works with polytomously scored items.

Author(s)

Anatol Sargin, Ali Uenlue

References

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

ob_counter for computation of numbers of counterexamples; simu for data simulation tool; iita, the interface that provides the three inductive item tree analysis methods under one umbrella. See also DAKS-package for general information about this package.

Examples

1
2

Example output

Loading required package: relations
Loading required package: sets
3 largest response patterns in the data:  
11100 11000 10000 
   67    61    41 
5 largest response patterns in the data:  
11100 11000 10000 11110 00000 
   67    61    41    40    20 

DAKS documentation built on May 2, 2019, 6:43 a.m.