Fit the Rasch model under the Item Response Theory approach.
rasch(data, constraint = NULL, IRT.param = TRUE, start.val = NULL,
na.action = NULL, control = list(), Hessian = TRUE)
a data.frame
(that will be converted to a numeric matrix using
data.matrix()
) or a numeric matrix
of manifest variables.
a two-column numeric matrix with at most \(p\) rows (where \(p\) is the number of items), specifying fixed-value constraints. The first column represents the item (i.e., \(1\) denotes the first item, \(2\) the second, etc., and \(p+1\) the discrimination parameter) and the second column the value at which the corresponding parameter should be fixed. See Examples for more info.
logical; if TRUE
then the coefficients' estimates are reported under the
usual IRT parameterization. See Details for more info.
the character string "random" or a numeric vector of \(p+1\) starting values,
where the first \(p\) values correspond to the easiness parameters while the last value corresponds to the
discrimination parameter. If "random", random starting values are used. If NULL
starting values
are automatically computed.
the na.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 values (valid under MAR mechanisms if the model is correctly specified).
If you want to apply a complete case analysis then use na.action = na.exclude
.
a list of control values,
the number of quasi-Newton iterations. Default 150.
the number of Gauss-Hermite quadrature points. Default 21.
the optimization method to be used in optim()
. Default "BFGS".
logical; if TRUE
info about the optimization procedure are printed.
logical; if TRUE
, then the Hessian matrix is computed. Warning: setting this argument to FALSE
will cause many methods (e.g., summary()
) to fail; setting to FALSE
is intended for simulation
purposes in order rasch()
to run faster.
An object of class rasch
with components,
a matrix with the parameter values at convergence. These are always the estimates of
\(\beta_i, \beta\) parameters, even if IRT.param = TRUE
.
the log-likelihood value at convergence.
the convergence identifier returned by optim()
.
the approximate Hessian matrix at convergence returned by optim()
.
the number of function and gradient evaluations used by the quasi-Newton algorithm.
a list with two components: (i) 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.
a list with two components used in the Gauss-Hermite rule: (i) Z
: a numeric matrix that contains
the abscissas, and (ii) GHw
: a numeric vector that contains the corresponding weights.
the maximum absolute value of the score vector at convergence.
the value of the constraint
argument.
the value of the IRT.param
argument.
a copy of the response data matrix.
the values used in the control
argument.
the value of the na.action
argument.
the matched call.
In case the Hessian matrix at convergence is not positive definite, try to re-fit the model using
rasch(..., start.val = "random")
.
The Rasch model is a special case of the unidimensional latent trait model when all the discrimination parameters are equal. This model was first discussed by Rasch (1960) and it is mainly used in educational testing where the aim is to study the abilities of a particular set of individuals.
The model is defined as follows $$\log\left(\frac{\pi_i}{1-\pi_i}\right) = \beta_{i} + \beta z,$$ where \(\pi_i\) denotes the conditional probability of responding correctly to the \(i\)th item given \(z\), \(\beta_{i}\) is the easiness parameter for the \(i\)th item, \(\beta\) is the discrimination parameter (the same for all the items) and \(z\) denotes the latent ability.
If IRT.param = TRUE
, then the parameters estimates are reported under the usual IRT parameterization,
i.e., $$\log\left(\frac{\pi_i}{1-\pi_i}\right) = \beta (z - \beta_i^*).$$
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.
Baker, F. and Kim, S-H. (2004) Item Response Theory, 2nd ed. New York: Marcel Dekker.
Rasch, G. (1960) Probabilistic Models for Some Intelligence and Attainment Tests. Copenhagen: Paedagogiske Institute.
Rizopoulos, D. (2006) ltm: An R package for latent variable modelling and item response theory analyses. Journal of Statistical Software, 17(5), 1--25. URL 10.18637/jss.v017.i05
coef.rasch
,
fitted.rasch
,
summary.rasch
,
anova.rasch
,
plot.rasch
,
vcov.rasch
,
GoF.rasch
,
item.fit
,
person.fit
,
margins
,
factor.scores
# NOT RUN {
## The common form of the Rasch model for the
## LSAT data, assuming that the discrimination
## parameter equals 1
rasch(LSAT, constraint = cbind(ncol(LSAT) + 1, 1))
## The Rasch model for the LSAT data under the
## normal ogive; to do that fix the discrimination
## parameter to 1.702
rasch(LSAT, constraint = cbind(ncol(LSAT) + 1, 1.702))
## The Rasch model for the LSAT data with
## unconstraint discrimination parameter
rasch(LSAT)
## The Rasch model with (artificially created)
## missing data
data <- LSAT
data[] <- lapply(data, function(x){
x[sample(1:length(x), sample(15, 1))] <- NA
x
})
rasch(data)
# }
Run the code above in your browser using DataLab