Learn R Programming

GDINA (version 1.4.2)

attributepattern: Generate all possible attribute patterns

Description

This function generates all possible attribute patterns. The Q-matrix is needed when any attributes are polytomous.

Usage

attributepattern(K, poly = F, Q = NULL)

Arguments

K
number of attributes
poly
logical; is Q matrix polytomous?
Q
Q-matrix; required when Q-matrix is polytomous

Value

attribute profiles for \(2^K\) latent classes

Examples

Run this code
attributepattern(3)

q <- matrix(scan(text = "0 1 2 1 0 1 1 2 0"),ncol = 3)
q
attributepattern(ncol(q),poly=TRUE,q)

q <- matrix(scan(text = "0 1 1 1 0 1 1 1 0"),ncol = 3)
q
attributepattern(ncol(q),poly=TRUE,q)

Run the code above in your browser using DataLab