Learn R Programming

psychotools (version 0.7-4)

itempar: Extract Item Parameters of Item Response Models

Description

A class and generic function for representing and extracting the item parameters of a given item response model.

Usage

itempar(object, ...)
  # S3 method for raschmodel
itempar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  # S3 method for rsmodel
itempar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  # S3 method for pcmodel
itempar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  # S3 method for nplmodel
itempar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  # S3 method for gpcmodel
itempar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  # S3 method for btmodel
itempar(object, ref = NULL, alias = TRUE, vcov = TRUE, log = FALSE, ...)

Value

A named vector with item parameters of class itempar and additional attributes model (the model name), ref (the items or parameters used as restriction/for normalization), alias (either FALSE or a named character vector with the removed aliased parameter, and vcov

(the adjusted covariance matrix of the estimates if vcov = TRUE or an

NA-matrix otherwise).

Arguments

object

a fitted model or tree object whose item parameters should be extracted.

ref

a vector of labels or position indices of item parameters or a contrast matrix which should be used as restriction/for normalization. If NULL (the default) for all models except models estimated via MML, all items are used (sum zero restriction). For models estimated via MML (nplmodels and gpcmodels), the parameters are by default identified via the distributional parameters of the person parameters (mean and variance of a normal distribution). Nevertheless, a restriction on the interval scale can be applied.

alias

logical. If TRUE (the default), the aliased parameter is included in the return vector (and in the variance-covariance matrix if vcov = TRUE). If FALSE, it is removed. If the restriction given in ref depends on several parameters, the first parameter of the restriction specified is (arbitrarily) chosen to be removed if alias is FALSE.

vcov

logical. If TRUE (the default), the (transformed) variance-covariance matrix of the item parameters is attached as attribute vcov. If FALSE, an NA-matrix is attached.

log

logical. Whether to return the estimated model parameters on the logit (TRUE) or preference scale (FALSE).

...

further arguments which are currently not used.

Details

itempar is both, a class to represent item parameters of item response models as well as a generic function. The generic function can be used to extract the item parameters of a given item response model.

For Rasch models and n-parameter logistic models, itempar returns the estimated item difficulty parameters \(\hat{\beta}_{j}\) under the restriction specified in argument ref. For rating scale models, itempar returns computed item location parameters \(\hat{\beta}_{j}\) under the restriction specified in argument ref. These are computed from the estimated item-specific parameters \(\hat{\xi}_{j}\) (who mark the location of the first category of an item on the latent theta axis). For partial credit models and generalized partial credit models, itempar returns ‘mean’ absolute item threshold parameters, \(\hat{\beta}_{j} = \frac{1}{p_{j}} \sum_{k = 1}^{p_{j}}\hat{\delta}_{jk}\), i.e., a single parameter per item is returned which results as the mean of the absolute item threshold parameters \(\hat{\delta}_{jk}\) of this item. Based upon these ‘mean’ absolute item threshold parameters \(\hat{\beta}_{j}\), the restriction specified in argument ref is applied. For all models, the variance-covariance matrix of the returned item parameters is adjusted according to the multivariate delta rule.

For objects of class itempar, several methods to standard generic functions exist: print, coef, vcov. coef and vcov can be used to extract the estimated calculated item parameters and their variance-covariance matrix without additional attributes. Based on this Wald tests or confidence intervals can be easily computed, e.g., via confint.

Two-sample item-wise Wald tests for DIF in the item parameters can be carried out using the function anchortest.

See Also

personpar, threshpar, discrpar, guesspar, upperpar

Examples

Run this code
o <- options(digits = 4)

## load verbal aggression data
data("VerbalAggression", package = "psychotools")

## fit a Rasch model to dichotomized verbal aggression data
raschmod <- raschmodel(VerbalAggression$resp2)

## extract item parameters with sum zero or use last two items as anchor
ip1 <- itempar(raschmod)
ip2a <- itempar(raschmod, ref = 23:24) # with position indices
ip2b <- itempar(raschmod, ref = c("S4WantShout", "S4DoShout")) # with item label

ip1
ip2a

all.equal(ip2a, ip2b)

## extract vcov
vc1 <- vcov(ip1)
vc2 <- vcov(ip2a)

## adjusted standard errors,
## smaller with more items used as anchors
sqrt(diag(vc1))
sqrt(diag(vc2))

## Wald confidence intervals
confint(ip1)
confint(ip2a)

options(digits = o$digits)

Run the code above in your browser using DataLab