mcdat.generate: Generation of MC Responses

View source: R/mcdat.generate.R

mcdat.generateR Documentation

Generation of MC Responses

Description

This function generates MC responses conforming to the MC-DINA model with relaxed MC Q-matrix.

Usage

mcdat.generate(
  mcQ,
  N,
  H,
  att.structure = "unif",
  cor.att = 0.5,
  lambda = rep(0.85, J)
)

Arguments

mcQ

A (\sum_{j=1}^J H_j^\ast)\times (K+2) Q-matrix for MC items. The first two columns are item ID and option ID of the coded options.

N

The number of examinees

H

The number of maximal attributes required by the items. H takes values 3, 4, 5, or 6.

att.structure

The structure of attribute profiles. Possible options are "unif" and "mvn" representing discrete uniform distribution and multivariate normal threshold model.

cor.att

If att.structure = "mvn", cor.att is used to specify the correlation between attributes.

lambda

A J-dimensional vector, where the jth entry represents the probability of a match between an examinee's ideal response and his/her observed response to item j.

Value

The function returns

dat

A N\times J matrix storing the generated responses

att

Examinees' attribute profiles (N\times K) used to generate the responses

prob.persons

A list storing the probabilities that the examinees are attracted by the options of the items


NPCDTools documentation built on Sept. 1, 2026, 1:08 a.m.