Skip to main content

Extract Person Parameters of Item Response Models

Description

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

Usage

personpar(object, ...)
## S3 method for class 'raschmodel'
personpar(object, personwise = FALSE, ref = NULL,
  vcov = TRUE, interval = NULL, tol = 1e-8, ...)
## S3 method for class 'rsmodel'
personpar(object, personwise = FALSE, ref = NULL,
  vcov = TRUE, interval = NULL, tol = 1e-8, ...)
## S3 method for class 'pcmodel'
personpar(object, personwise = FALSE, ref = NULL,
  vcov = TRUE, interval = NULL, tol = 1e-8, ...)
## S3 method for class 'nplmodel'
personpar(object, personwise = FALSE, vcov = TRUE,
  interval = NULL, tol = 1e-6, method = "EAP", ...)
## S3 method for class 'gpcmodel'
personpar(object, personwise = FALSE, vcov = TRUE,
  interval = NULL, tol = 1e-6, method = "EAP", ...)

Arguments

object a fitted model object for which person parameters should be returned/estimated.
personwise logical. Should the distributional parameters of the latent person ability distribution be computed (default) or the person-wise (individual) person parameters? See below for details.
ref a vector of labels or position indices of item parameters or a contrast matrix which should be used as restriction/for normalization. This argument will be passed over to internal calls of itempar.
vcov logical. Should a covariance matrix be returned/estimated for the person parameter estimates? See also details below.
interval numeric vector of length two, specifying an interval for uniroot or fscores to calculate the person parameter estimates.
tol numeric tolerance passed to uniroot or fscores.
method type of estimation method being passed to fscores.
… further arguments which are passed to optim in case of vcov = TRUE or fscores.

Details

personpar is both a class to represent person parameters of item response models as well as a generic function. The generic function can be used to return/estimate the person parameters of a given item response model.

By default, the function personpar() reports the distribution parameters of the assumed person ability distribution. For models estimated by marginal maximum likelihood estimation (MML) this is the mean/variance of the underlying normal distribution, whereas for models estimated by conditional maximum likelihood estimation (CML) this is a discrete distribution with one estimation for each observed raw score in the data.

Alternatively, when setting personwise = TRUE, the person parameter for each person/subject in the underlying data set can be extracted. In the CML case, this simply computes the raw score for each person and then extracts the corresponding person parameter. In the MML case, this necessitates (numerically) integrating out the individual person parameters (also known as factor scores or latent trait estimates) based on the underlying normal distribution.

More specifically, the following algorithms are employed for obtaining the distributional person parameters:

  • In the MML case – i.e., for nplmodels and gpcmodels – the distributional parameters are already part of the model specification. In a single-group specification and in the reference group of a multi-group specification the mean/variance parameters are fixed to 0/1. In the multi-group case the remaining mean/variance parameters were already estimated along with all other model parameters and simply need to be extracted. Analogously, the corresponding variance-covariance matrix just needs to be extracted and has zero covariances in the cells corresponding to fixed parameters.

  • In the CML case – i.e., raschmodels, rsmodels, and pcmodels – the distributional parameters are estimated via uniroot() with the estimation equations given by Hoijtink & Boomsma (1995) as well as Andersen (1995). This approach is fast and estimates for all possible raw scores are available. If the covariance matrix of the estimated person parameters is requested (vcov = TRUE), an additional call of optim is employed to obtain the Hessian numerically. With this approach, person parameters are available only for observed raw scores.

As already explained above, obtaining the person-wise (individual) person paremeters (or ability estimates or factor scores) is straightforward in the CML case. In the MML case, fscores is used, see Chalmers (2012) for further details. If personwise = TRUE, the associated variance-covariance matrix is not provided and simply a matrix with NAs is returned. (The same is done for vcov = FALSE.)

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

Value

A named vector with person parmeters of class personpar and additional attributes “model” (the model name), “vcov” (the covariance matrix of the estimates if vcov = TRUE or an NA-matrix otherwise) and “type” (the type of the parameters, depending on personwise).

References

Andersen EB (1995). Polytomous Rasch Models and Their Estimation. In Fischer GH, Molenaar IW (eds.). Rasch Models: Foundations, Recent Developments, and Applications. Springer, New York.

Chalmers RP (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1–29.

Hoijtink H, Boomsma A (1995). On Person Parameter Estimation in the Dichotomous Rasch Model. In Fischer GH, Molenaar IW (eds.). Rasch Models: Foundations, Recent Developments, and Applications. Springer, New York.

See Also

itempar, threshpar, discrpar, guesspar, upperpar

Examples

library("psychotools")

o <- options(digits = 3)

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

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

## extract person parameters
## (= parameters of the underlying ability distribution)
rap <- personpar(ram)
rap
Item response person parameters (RM):
      1       2       3       4       5       6       7       8       9      10 
-3.6185 -2.8441 -2.3552 -1.9815 -1.6694 -1.3947 -1.1444 -0.9104 -0.6872 -0.4708 
     11      12      13      14      15      16      17      18      19      20 
-0.2581 -0.0464  0.1670  0.3845  0.6090  0.8438  1.0931  1.3629  1.6616  2.0035 
     21      22      23 
 2.4140  2.9489  3.7813 
## extract variance-covariance matrix and standard errors
vc <- vcov(rap)
sqrt(diag(vc))
    1     2     3     4     5     6     7     8     9    10    11    12    13 
1.039 0.763 0.647 0.581 0.539 0.511 0.491 0.477 0.468 0.463 0.460 0.461 0.464 
   14    15    16    17    18    19    20    21    22    23 
0.470 0.479 0.491 0.508 0.531 0.563 0.609 0.677 0.796 1.070 
## Wald confidence intervals
confint(rap)
     2.5 %  97.5 %
1  -5.6555 -1.5814
2  -4.3397 -1.3485
3  -3.6224 -1.0880
4  -3.1200 -0.8430
5  -2.7259 -0.6128
6  -2.3957 -0.3937
7  -2.1068 -0.1820
8  -1.8459  0.0252
9  -1.6048  0.2304
10 -1.3776  0.4359
11 -1.1601  0.6439
12 -0.9491  0.8564
13 -0.7418  1.0758
14 -0.5359  1.3049
15 -0.3290  1.5470
16 -0.1189  1.8065
17  0.0969  2.0894
18  0.3212  2.4045
19  0.5576  2.7657
20  0.8106  3.1963
21  1.0861  3.7418
22  1.3885  4.5093
23  1.6838  5.8789
## now match each person to person parameter with the corresponding raw score
personpar(ram, personwise = TRUE)[1:6]
     1      2      3      4      5      6 
-0.687 -3.618 -0.471  0.385 -0.471 -0.258 
## person parameters for RSM/PCM fitted to original polytomous data
rsm <- rsmodel(VerbalAggression$resp)
pcm <- pcmodel(VerbalAggression$resp)
cbind(personpar(rsm, vcov = FALSE), personpar(pcm, vcov = FALSE))
      [,1]    [,2]
1  -3.7657 -3.7851
2  -3.0721 -3.0866
3  -2.6623 -2.6730
4  -2.3672 -2.3749
5  -2.1338 -2.1392
6  -1.9390 -1.9424
7  -1.7701 -1.7721
8  -1.6200 -1.6208
9  -1.4837 -1.4837
10 -1.3583 -1.3574
11 -1.2412 -1.2398
12 -1.1309 -1.1291
13 -1.0260 -1.0239
14 -0.9256 -0.9232
15 -0.8287 -0.8262
16 -0.7348 -0.7322
17 -0.6433 -0.6407
18 -0.5537 -0.5511
19 -0.4657 -0.4631
20 -0.3787 -0.3762
21 -0.2926 -0.2902
22 -0.2069 -0.2047
23 -0.1215 -0.1195
24 -0.0360 -0.0343
25  0.0499  0.0513
26  0.1363  0.1374
27  0.2237  0.2244
28  0.3122  0.3125
29  0.4023  0.4021
30  0.4942  0.4934
31  0.5883  0.5870
32  0.6851  0.6833
33  0.7850  0.7826
34  0.8887  0.8857
35  0.9968  0.9933
36  1.1103  1.1063
37  1.2300  1.2257
38  1.3575  1.3530
39  1.4945  1.4900
40  1.6432  1.6391
41  1.8071  1.8038
42  1.9907  1.9889
43  2.2013  2.2021
44  2.4512  2.4556
45  2.7629  2.7727
46  3.1880  3.2054
47  3.8932  3.9209
if(requireNamespace("mirt")) {
## fit a 2PL accounting for gender impact and
twoplm <- nplmodel(VerbalAggression$resp2, impact = VerbalAggression$gender)

## extract the person parameters
## (= mean/variance parameters from the normal ability distribution)
twoplp <- personpar(twoplm)
twoplp

## extract the standard errors
sqrt(diag(vcov(twoplp)))

## Wald confidence intervals
confint(twoplp)

## now look at the individual person parameters
## (integrated out over the normal ability distribution)
personpar(twoplm, personwise = TRUE)[1:6]
}
     1      2      3      4      5      6 
-0.351 -1.695 -0.134  0.472 -0.172 -0.125 
options(digits = o$digits)