p_*() and array_p_*() are C++ functions for calculating item response probability.

p_1pl(x, b)

p_2pl(x, a, b)

p_m_2pl(x, a, d)

p_3pl(x, a, b, c)

p_m_3pl(x, a, d, c)

p_pc(x, b)

p_gpc(x, a, b)

p_m_gpc(x, a, d)

p_gr(x, a, b)

p_m_gr(x, a, d)

array_p_1pl(x, b)

array_p_2pl(x, a, b)

array_p_m_2pl(x, a, d)

array_p_3pl(x, a, b, c)

array_p_m_3pl(x, a, d, c)

array_p_pc(x, b)

array_p_gpc(x, a, b)

array_p_m_gpc(x, a, d)

array_p_gr(x, a, b)

array_p_m_gr(x, a, d)

Arguments

x

the theta value. The number of columns should correspond to the number of dimensions. For array_*() functions, the number of theta values must correspond to the number of rows.

b, d

the difficulty parameter. b is used for unidimensional items, and d is used for multidimensional items.

a

the a-parameter.

c

the c-parameter.

Details

p_*() functions accept a single theta value, and array_p_*() functions accept multiple theta values.

Supports unidimensional and multidimensional models.

  • p_1pl(), array_p_1pl(): 1PL models

  • p_2pl(), array_p_2pl(): 2PL models

  • p_3pl(), array_p_3pl(): 3PL models

  • p_pc(), array_p_pc(): PC (partial credit) models

  • p_gpc(), array_p_gpc(): GPC (generalized partial credit) models

  • p_gr(), array_p_gr(): GR (graded response) models

  • p_m_2pl(), array_p_m_2pl(): multidimensional 2PL models

  • p_m_3pl(), array_p_m_3pl(): multidimensional 3PL models

  • p_m_gpc(), array_p_m_gpc(): multidimensional GPC models

  • p_m_gr(), array_p_m_gr(): multidimensional GR models

References

Rasch, G. (1960). Probabilistic models for some intelligence and attainment tests. Copenhagen: Danish Institute for Educational Research.

Lord, F. M. (1952). A theory of test scores (Psychometric Monograph No. 7). Richmond, VA: Psychometric Corporation.

Birnbaum, A. (1957). Efficient design and use of tests of mental ability for various decision-making problems (Series Report No. 58-16. Project No. 7755-23). Randolph Air Force Base, TX: USAF School of Aviation Medicine.

Birnbaum, A. (1958). On the estimation of mental ability (Series Report No. 15. Project No. 7755-23). Randolph Air Force Base, TX: USAF School of Aviation Medicine.

Birnbaum, A. (1958). Further considerations of efficiency in tests of a mental ability (Series Report No. 17. Project No. 7755-23). Randolph Air Force Base, TX: USAF School of Aviation Medicine.

Birnbaum, A. (1968). Some latent trait models and their use in inferring an examinee's ability. In Lord, F. M., Novick, M. R. (eds.), Statistical Theories of Mental Test Scores, 397-479. Reading, MA: Addison-Wesley.

Masters, G. N. (1982). A Rasch model for partial credit scoring. Psychometrika, 47(2), 149-174.

Andrich, D. (1978). A rating formulation for ordered response categories. Psychometrika, 43(4), 561-573.

Muraki, E. (1992). A generalized partial credit model: Application of an EM algorithm. Applied Psychological Measurement, 16(2), 159-176.

Samejima, F. (1969). Estimation of latent ability using a response pattern of graded scores. Psychometrika Monograph, 17.

Examples

x <- 0.5

p_1pl(x, 1)
#> [1] 0.3775407
p_2pl(x, 1, 2)
#> [1] 0.1824255
p_3pl(x, 1, 2, 0.25)
#> [1] 0.3868191
p_pc(x, c(0, 1))
#>           [,1]      [,2]      [,3]
#> [1,] 0.2740686 0.4518628 0.2740686
p_gpc(x, 2, c(0, 1))
#>           [,1]      [,2]      [,3]
#> [1,] 0.2119416 0.5761169 0.2119416
p_gr(x, 2, c(0, 2))
#>           [,1]      [,2]       [,3]
#> [1,] 0.2689414 0.6836327 0.04742587

x <- matrix(seq(0.1, 0.5, 0.1)) # three theta values, unidimensional

array_p_1pl(x, 1)
#>           [,1]
#> [1,] 0.2890505
#> [2,] 0.3100255
#> [3,] 0.3318122
#> [4,] 0.3543437
#> [5,] 0.3775407
array_p_2pl(x, 1, 2)
#>           [,1]
#> [1,] 0.1301085
#> [2,] 0.1418511
#> [3,] 0.1544653
#> [4,] 0.1679816
#> [5,] 0.1824255
array_p_3pl(x, 1, 2, 0.25)
#>           [,1]
#> [1,] 0.3475814
#> [2,] 0.3563883
#> [3,] 0.3658489
#> [4,] 0.3759862
#> [5,] 0.3868191
array_p_pc(x, c(0, 1))
#>           [,1]      [,2]      [,3]
#> [1,] 0.3914661 0.4326369 0.1758970
#> [2,] 0.3609829 0.4409055 0.1981116
#> [3,] 0.3311062 0.4469466 0.2219471
#> [4,] 0.3020641 0.4506267 0.2473092
#> [5,] 0.2740686 0.4518628 0.2740686
array_p_gpc(x, 2, c(0, 1))
#>           [,1]      [,2]       [,3]
#> [1,] 0.4126605 0.5040247 0.08331473
#> [2,] 0.3580355 0.5341262 0.10783823
#> [3,] 0.3056751 0.5569763 0.13734866
#> [4,] 0.2566827 0.5712578 0.17205954
#> [5,] 0.2119416 0.5761169 0.21194156
array_p_gr(x, 2, c(0, 2))
#>           [,1]      [,2]       [,3]
#> [1,] 0.4501660 0.5279527 0.02188127
#> [2,] 0.4013123 0.5720907 0.02659699
#> [3,] 0.3543437 0.6133608 0.03229546
#> [4,] 0.3100255 0.6508088 0.03916572
#> [5,] 0.2689414 0.6836327 0.04742587