| Q.generate | R Documentation |
The function generates a complete Q-matrix based on a pre-specified probability that each q-entry equals 1.
Q.generate(K, J, p, single.att = TRUE)
K |
The number of attributes. |
J |
The number of items. |
p |
The probability that each q-entry equals 1. |
single.att |
Whether all the single-attribute patterns are included.
If |
The function returns a dichotomous Q-matrix. A complete Q-matrix is the default unless
single.att = F is specified.
Q.completeness
## Not run:
# Example 1: A complete Q-matrix with items requiring fewer attributes.
Q1 = Q.generate(3, 20, 0.5, single.att = TRUE)
# Example 2: A Q-matrix with items requiring more attributes but completeness is not guaranteed.
Q2 = Q.generate(5, 30, 0.6, single.att = FALSE)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.