IRTNPP: MCMC Sampling for IRT Model Ability Parameters using...

View source: R/IRTNPP.R

IRTNPPR Documentation

MCMC Sampling for IRT Model Ability Parameters using Normalized Power Prior

Description

Conduct posterior sampling for IRT model ability parameters with normalized power prior.

For the power parameter \delta, a Metropolis-Hastings algorithm with either independence proposal, or a random walk proposal on its logit scale is used.

For the model parameters \beta, a Metropolis-Hastings algorithm with either normal proposal, or uniform proposal is used.

Usage

IRTNPP(y, dseq, prior_mu, prior_sd, MCsize, disa, difa1, difa2,
       cut, prior_beta, prior_delta, disb, difb1, difb2,
       prop_delta, rw_delta, rw_n_beta, rw_u_beta, ind_delta,
       prop_beta, n_sample, burnin, thin)

Arguments

y

a vector that contains historical data and current data, where the first half consists of historical data and the second half consists of current data.

dseq

numeric vector or scalar between 0 and 1. The value of \delta.

prior_mu

the prior mean of each ability parameter \beta.

prior_sd

the prior standard deviation of each ability parameter \beta.

MCsize

positive integer. Sample size of importance sampling.

disa

a matrix of item discriminability parameters in historical data.

difa1

a vector of the first difficulty parameter of items in historical data.

difa2

a vector of the second difficulty parameter of items in historical data.

cut

critical value between 0 and 1. If \delta is less than or equal to this value, select the initial prior of \beta as the proposed distribution of importance sampling; Otherwise, select the posterior distribution with historical data of \beta as the proposed distribution.

prior_beta

list. Parameters of normal prior for \beta.

prior_delta

list. Parameters of beta prior for for \delta.

disb

a matrix of item discriminability parameters in current data.

difb1

a vector of the first difficulty parameter of items in current data.

difb2

a vector of the second difficulty parameter of items in current data.

prop_delta

character. The class of proposal distribution for \delta.

rw_delta

numeric. The stepsize(variance of the normal distribution) for the random walk proposal of logit \delta. Only applicable if prop_delta = 'RW'.

prop_beta

character. The class of proposal distribution for \beta.

rw_n_beta

numeric vector. Standard deviation of proposed distribution of for \beta.

rw_u_beta

numeric. rw_u_beta*2 is the interval length of uniform distribution.

ind_delta

numeric vector. Two parameters when the proposed distribution of \delta is beta distribution.

n_sample

positive integer. Specifies the number of posterior samples in the output.

burnin

positive integer. The output will only show MCMC samples after bunrin.

thin

positive integer. The thinning parameter in MCMC sampling.

Details

This function needs three additional R packages: KernSmooth, msm, mvtnorm.

This function needs two additional R functions: makePositiveDefinite, Metro_Hastings.

The outputs include the posterior estimates of the ability parameters of the IRT model and power parameter, as well as the acceptance rates in sampling \delta and \beta.

Value

A vector consisting of 5 parts: the acceptance rate in MCMC sampling for \beta and \delta using Metropolis-Hastings algorithm, the posterior mean of \beta and \delta, the posterior standard deviation of \beta and \delta, the posterior median of \beta and \delta, and the posterior mode of power parameter \delta.

Author(s)

Qiang Zhang zqzjf0408@163.com

References

Chalmers, R.P. (2012). mirt: A multidimensional item response theory package for the R environment. Journal of Statistical Software 48:1–29.

Matteucci, M., Veldkamp, B. (2015). The approach of power priors for ability estimation in IRT models. Qual Quant 49:917–926.

Han, Z., Zhang, Q., Wang, M., Ye, K., Chen, M.H. (2023). On efficient posterior inference in normalized power prior Bayesian analysis. Biometrical Journal 65:2200194.


NPP documentation built on Aug. 21, 2025, 5:26 p.m.

Related to IRTNPP in NPP...