Learn R Programming

dcmr (version 1.0)

iterate: Perform one iteration of MCMC procedure

Description

If applicable, randomly samples new set of parameter estimates, obtains applicable estimates and uses those to calculate threshold values for both items and latent variables, draws new set of alpha values.

Usage

iterate(nattributes, class0, estimates0, threshold.labels, lambda.equations, is.pi.r, parameter.means, parameter.acov, observations, nobservations, is.parameter.randomized, qmatrix, pmatrix)

Arguments

nattributes
numberic value for number of attributes
class0
The previous value of attribute profile for each respondent
estimates0
a numeric vector of parameter estimates
threshold.labels
an nclasses by nitems character matrix with appropriate threshold labels
lambda.equations
equations for lambda parameters
is.pi.r
If FALSE (the default), parameter values are the type of taus and nus or lambdas and gammas else they are the type pis and rs as used in NC-RUM parameterization
parameter.means
a numerical vector of calibrated item and structural parameters
parameter.acov
a numerical matrix of covariances of item and structural parameters
observations
a data frame or matrix of dichotomous responses
nobservations
a numeric value of number of observations
is.parameter.randomized
if true parameter estimates are randomized using acov matrix
qmatrix
a data frame or matrix of 1s and 0s indicating relation between items and attributes. This matrix specifies which items are required for mastery of each attribute (i.e., latent variable). A matrix must be a size of nItems X nAttributes
pmatrix
a numeric nclasses by nattributes matrix of all possible attribute profiles

Value

a list of newly sampled classes and parameter estimates