Skip to main content

Extract Discrimination Parameters of Item Response Models

Description

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

Usage

  discrpar(object, ...)
  ## S3 method for class 'raschmodel'
discrpar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  ## S3 method for class 'rsmodel'
discrpar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  ## S3 method for class 'pcmodel'
discrpar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  ## S3 method for class 'nplmodel'
discrpar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)
  ## S3 method for class 'gpcmodel'
discrpar(object, ref = NULL, alias = TRUE, vcov = TRUE, ...)

Arguments

object a fitted model object whose discrimination parameters should be extracted.
ref a restriction to be used. Not used for models estimated via CML as the discrimination parameters are fixed to 1 in raschmodels, rsmodels and pcmodels. 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 ratio scale can be applied.
alias logical. If TRUE (the default), the aliased parameters are included in the return vector (and in the variance-covariance matrix if vcov = TRUE). If FALSE, these parameters are removed. For raschmodels, rsmodels and pcmodels where all discrimination parameters are fixed to 1, this means that an empty numeric vector and an empty variance-covariance matrix is returned if alias is FALSE.
vcov logical. If TRUE (the default), the variance-covariance matrix of the discrimination parameters is attached as attribute vcov.
… further arguments which are currently not used.

Details

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

For objects of class discrpar, several methods to standard generic functions exist: print, coef, vcov. coef and vcov can be used to extract the discrimination parameters and their variance-covariance matrix without additional attributes.

Value

A named vector with discrimination parameters of class discrpar and additional attributes model (the model name), ref (the items or parameters used as restriction/for normalization), alias (either TRUE or a named numeric vector with the aliased parameters not included in the return value), and vcov (the estimated and adjusted variance-covariance matrix).

See Also

personpar, itempar, threshpar, guesspar, upperpar

Examples

library("psychotools")

o <- options(digits = 4)

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

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

## extract the discrimination parameters
dp1 <- discrpar(rmod)

## extract the standard errors
sqrt(diag(vcov(dp1)))
S1WantCurse   S1DoCurse S1WantScold   S1DoScold S1WantShout   S1DoShout 
          0           0           0           0           0           0 
S2WantCurse   S2DoCurse S2WantScold   S2DoScold S2WantShout   S2DoShout 
          0           0           0           0           0           0 
S3WantCurse   S3DoCurse S3WantScold   S3DoScold S3WantShout   S3DoShout 
          0           0           0           0           0           0 
S4WantCurse   S4DoCurse S4WantScold   S4DoScold S4WantShout   S4DoShout 
          0           0           0           0           0           0 
if(requireNamespace("mirt")) {
## fit 2PL to verbal aggression data
twoplmod <- nplmodel(VerbalAggression$resp2)

## extract the discrimination parameters
dp2 <- discrpar(twoplmod)

## this time with the first discrimination parameter being the reference
discrpar(twoplmod, ref = 1)

## extract the standard errors
sqrt(diag(vcov(dp2)))
}
S1WantCurse   S1DoCurse S1WantScold   S1DoScold S1WantShout   S1DoShout 
     0.2275      0.2688      0.2364      0.3494      0.2107      0.2226 
S2WantCurse   S2DoCurse S2WantScold   S2DoScold S2WantShout   S2DoShout 
     0.2580      0.2343      0.2455      0.2963      0.2017      0.2610 
S3WantCurse   S3DoCurse S3WantScold   S3DoScold S3WantShout   S3DoShout 
     0.1666      0.1837      0.2201      0.2244      0.1798      0.2483 
S4WantCurse   S4DoCurse S4WantScold   S4DoScold S4WantShout   S4DoShout 
     0.1990      0.2202      0.2408      0.2238      0.1774      0.2194 
options(digits = o$digits)