gen.data | R Documentation |
This function can be used to generate datasets based on an object of class gen.itembank
.
The user can manipulate the examinees' attribute distribution or provide a matrix of attribute profiles.
Data are simulated using the GDINA::simGDINA
function (Ma & de la Torre, 2020).
gen.data( N = NULL, R = 1, item.bank = NULL, att.profiles = NULL, att.dist = "uniform", mvnorm.parm = list(mean = NULL, sigma = NULL, cutoffs = NULL), higher.order.parm = list(theta = NULL, lambda = NULL), categorical.parm = list(att.prior = NULL), seed = NULL )
N |
Scalar numeric. Sample size for the datasets |
R |
Scalar numeric. Number of datasets replications. Default is 1 |
item.bank |
An object of class |
att.profiles |
Numeric matrix indicating the true attribute profile for each examinee (N examinees x K attributes). If |
att.dist |
Numeric vector of length 2^K, where K is the number of attributes. Distribution for attribute simulation. It can be |
mvnorm.parm |
A list of arguments for multivariate normal attribute distribution ( |
higher.order.parm |
A list of arguments for higher-order attribute distribution ( |
categorical.parm |
A list of arguments for categorical attribute distribution ( |
seed |
Scalar numeric. A scalar to use with |
gen.data
returns an object of class gen.data
.
An array containing the simulated responses (dimensions N examinees x J items x R replicates). If R = 1
, a matrix is provided
An array containing the simulated attribute profiles (dimensions N examinees x K attributes x R replicates). If R = 1
, a matrix is provided
A list that contains all the specifications
Ma, W. & de la Torre, J. (2020). GDINA: The generalized DINA model framework. R package version 2.7.9. Retrived from https://CRAN.R-project.org/package=GDINA
#################################### # Example 1. # # Generate dataset (GDINA item # # parameters and uniform attribute # # distribution) # #################################### Q <- sim180GDINA$simQ bank <- gen.itembank(Q = Q, mean.IQ = .70, range.IQ = .20, model = "GDINA") simdata <- gen.data(N = 1000, item.bank = bank)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.