Bayesian estimation of a person's ability from a response pattern, at quadrature points \(X_r\) spread evenly from -4 to 4. With prior weights \(A(X_r)\) and likelihood \(L(X_r)\), the expected a posteriori estimate $$EAP = \frac{\sum_r X_r L(X_r) A(X_r)}{\sum_r L(X_r) A(X_r)}$$ is the mean of the posterior distribution, and the maximum a posteriori estimate is the quadrature point where the posterior \(L(X_r) A(X_r)\) is highest. The defaults replicate de Ayala (2009, p. 79).
Arguments
- responses
Ones and zeros, the responses to the items.
- b
Difficulties of the items; the default is the five items of de Ayala (2009, Table 4.4).
- a
Discriminations of the items: 1 for the Rasch model.
- quadrature
Number of quadrature points.
- mean, sd
Mean and standard deviation of the prior.
- skew
Skewness parameter of the prior,
xiinfGarch::dsnorm().
Value
A list with x, the quadrature points; prior, the prior
weights; trace, the probability of each observed response at each
point (one column per item); likelihood; posterior, the
product of prior and likelihood; eap, psd (the posterior
standard deviation) and map; and responses and
prior_mean, as given.
References
de Ayala, R. J. (2009). The Theory and Practice of Item Response Theory. New York: Guilford Press.
Examples
estimate <- eap_map(response_pattern(2))
c(EAP = estimate$eap, MAP = estimate$map)
#> EAP MAP
#> -0.2271434 -0.4444444