tpm(data, type = c("latent.trait", "rasch"), constraint = NULL,
max.guessing = 1, IRT.param = TRUE, start.val = NULL,
na.action = NULL, control = list())data.frame (that will be converted to a numeric matrix using
data.matrix()) or a numeric matrix of manifest variables.TRUE then the coefficients' estimates are reported under the
usual IRT parameterization. See Details for more info.NULL starting values are automatically computed.
If "random", random startina.action to be used on data. In case of missing data, if
na.action = NULL the model uses the available cases, i.e., it takes into account the observed
part of sample units with missing valuestpm with components,IRT.param = TRUE.optim().X: a numeric matrix
that contains the observed response patterns, and (ii) obs: a numeric vector that contains the observed
frequencies for each observed response pattern.Z: a numeric matrix that contains
the abscissas, and (ii) GHw: a numeric vector that contains the corresponding weights.type argument.constraint argument.max.guessing argument.IRT.param argument.control argument.na.action argument.summary method) at convergence. In case of estimates on the boundary, the constraint
argument can be used to set the guessing parameter(s) for the problematic item(s) to zero. In addition,
tpm() has a number of control parameters that can be tuned in order to obtain successful convergence;
the most important of these are the starting values, the parameter scaling vector and the optimizer.type = "rasch", $\beta_{2i}$ is assumed equal for all items.
If IRT.param = TRUE, then the parameters estimates are reported under the usual IRT parameterization,
i.e., $$\pi_i = c_i + (1 - c_i) \frac{\exp[\beta_{2i} (z - \beta_{1i}^*)]}{1 +
\exp[\beta_{2i} (z - \beta_{1i}^*)]}.$$
The fit of the model is based on approximate marginal Maximum Likelihood, using the Gauss-Hermite quadrature rule
for the approximation of the required integrals.coef.tpm,
fitted.tpm,
summary.tpm,
anova.tpm,
plot.tpm,
vcov.tpm,
item.fit,
person.fit,
margins,
factor.scores# the three parameter model
tpm(LSAT)
# use 'nlminb' as optimizer
tpm(LSAT, control = list(optimizer = "nlminb"))
# the three parameter model with equal
# discrimination parameter across items
# fix the guessing parameter for the third item to zero
tpm(LSAT, type = "rasch", constraint = cbind(3, 1, 0), max.guessing = 1)
# the three parameter model for the Abortion data
fit <- tpm(Abortion)
fit
# the guessing parameter estimates for items 1, 3, and 4 seem to be on
# the boundary; update the fit by fixing them to zero
update(fit, constraint = cbind(c(1, 3, 4), 1, 0))Run the code above in your browser using DataLab