Learn R Programming

psychotree (version 0.11-1)

RaschModel: Model-Generating Function for Rasch Models

Description

RaschModel is a wrapper function that creates a "StatModel" object with certain fitting parameters passed on to RaschModel.fit for fitting simple Rasch models.

Usage

RaschModel(gradtol = 1e-6, deriv = c("sum", "diff", "numeric"))

RaschModel.fit(y, weights = NULL, start = NULL, gradtol = 1e-6, deriv = c("sum", "diff", "numeric"), ...)

Arguments

y
object that can be coerced (via as.matrix) to binary 0/1 matrix.
weights
an optional vector of weights, interpreted as case weights (integer only).
start
an optional vector of starting values.
deriv
character. Which type of derivatives should be used for computing gradient and Hessian matrix? Analytical with sum algorithm ("sum"), analytical with difference algorithm ("diff", faster but numerically unstable), or
gradtol, ...
further arguments passed to nlm.

Value

  • RaschModel returns an S4 object of class "StatModel" that fits Rasch models with the specified arguments. RaschModel.fit returns an S3 object of class "RaschModel", i.e., a list with components as follows.
  • coefficientsestimated item difficulty parameters (without first item parameter which is always constrained to be 0),
  • vcovcovariance matrix of the parameters in the model,
  • logliklog-likelihood of the fitted model,
  • dfnumber of estimated parameters,
  • datathe original data supplied (excluding columns without variance),
  • weightsthe weights used (if any),
  • nnumber of observations (with non-zero weights),
  • itemsstatus indicator (0, 0/1, 1) of all original items,
  • nalogical indicating whether the data contains NAs,
  • elementary_symmetric_functionsList of elementary symmetric functions for estimated parameters (up to order 2; or 1 in case of numeric derivatives),
  • nlm_codeconvergence code from nlm,
  • iterationsnumber of iterations used by nlm,
  • gradtoltolerance passed to nlm.

Details

RaschModel is the S4 interface for RaschModel.fit so that it can be used in mob. The user does not have to call this directly but can simply use the raschtree interface.

See Also

raschtree