Learn R Programming

sirt (version 0.34-36)

mcmc.3pno.testlet: 3PNO Testlet Model

Description

This function estimates the 3PNO testlet model (Wang, Bradlow & Wainer, 2002) by Markov Chain Monte Carlo methods (Glas, 2012).

Usage

mcmc.3pno.testlet(dat, testlets = rep(NA, ncol(dat)), param = 1, 
   weights = NULL, est.slope = TRUE, est.guess = TRUE, guess.prior = NULL, 
   testlet.variance.prior = c(1, 0.2), burnin = 500, iter = 1000, 
   N.sampvalues = 1000, progress.iter = 50, save.theta = FALSE)

Arguments

dat
Data frame with dichotomous item responses for $N$ persons and $I$ items
testlets
An integer or character vector which indicates the allocation of items to testlets. Same entries corresponds to same testlets. If an entry is NA, then this item does not belong to any testlet.
param
The parametrization of the testlet model (see Details). Possible values are 1, 2 or 3.
weights
An optional vector with student sample weights
est.slope
Should item slopes be estimated? The default is TRUE.
est.guess
Should guessing parameters be estimated? The default is TRUE.
guess.prior
A vector of length two or a matrix with $I$ items and two columns which defines the beta prior distribution of guessing parameters. The default is a non-informative prior, i.e. the Beta(1,1) distribution.
testlet.variance.prior
A vector of length two which defines the (joint) prior for testlet variances assuming an inverse chi-squared distribution. The first entry is the effective sample size of the prior while the second entry defines the prior variance of the testlet. The d
burnin
Number of burnin iterations
iter
Number of iterations
N.sampvalues
Maximum number of sampled values to save
progress.iter
Display progress every progress.iter-th iteration. If no progress display is wanted, then choose progress.iter larger than iter.
save.theta
Should theta values be saved?

Value

  • A list of class mcmc.sirt with following entries:
  • mcmcobjObject of class mcmc.list
  • summary.mcmcobjSummary of the mcmcobj object. In this summary the Rhat statistic and the mode estimate MAP is included. The variable PercSEratio indicates the proportion of the Monte Carlo standard error in relation to the total standard deviation of the posterior distribution.
  • icInformation criteria (DIC)
  • burninNumber of burnin iterations
  • iterTotal number of iterations
  • theta.chainSampled values of $\theta_p$ parameters
  • deviance.chainSampled values of Deviance values
  • EAP.relEAP reliability
  • personData frame with EAP person parameter estimates for $\theta_p$ and their corresponding posterior standard deviations
  • datUsed data frame
  • weightsUsed student weights
  • ...Further values

Details

The testlet response model for person $n$ at item $i$ is defined in parametrization 1 (param=1) $$P(X_{ni} = 1 ) = c_i + ( 1 - c_i ) \Phi ( a_i \theta_n + \gamma_{n,t(i)} + b_i ) \quad , \quad \theta_n \sim N ( 0 ,1 ) , \gamma_{n,t(i)} \sim N( 0 , \sigma^2_t )$$ For parametrization 2 (param=2) the response model is defined as $$P(X_{ni} = 1 ) = c_i + ( 1 - c_i ) \Phi ( a_i \theta_n + a_i \gamma_{n,t(i)} + b_i ) \quad , \quad \theta_n \sim N ( 0 ,1 ) , \gamma_{n,t(i)} \sim N( 0 , \sigma^2_t )$$ Parametrization 3 (param=3) is the bifactor model $$P(X_{ni} = 1 ) = c_i + ( 1 - c_i ) \Phi ( a_i \theta_n + a_{ti} \gamma_{n,t(i)} + b_i ) \quad , \quad \theta_n \sim N ( 0 ,1 ) , \gamma_{n,t(i)} \sim N( 0 , 1 )$$ with item slopes $a_i$ on the general factor $\theta_n$ and item slopes $a_{ti}$ on the testlet factor $\gamma_{n,t(i)}$. In case of est.slope=FALSE, all item slopes $a_i$ are set to 1. Then a variance $\sigma^2$ of the $\theta_n$ distribution is estimated. In case of est.guess=FALSE, all guessing parameters $c_i$ are set to 0.

References

Glas, C. A. W. (2012). Estimating and testing the extended testlet model. LSAC Research Report Series, RR 12-03. Wang, X., Bradlow, E. T., & Wainer, H. (2002). A general Bayesian model for testlets: Theory and applications. Applied Psychological Measurement, 26, 109-128. Wainer, H., Bradlow, E. T., & Wang, X. (2007). Testlet response theory and its applications. Cambridge: Cambridge University Press.

See Also

S3 methods: summary.mcmc.sirt, plot.mcmc.sirt For estimating testlet models using the lme4 package see rasch.testlet.glmer.

Examples

Run this code
#############################################################################
# EXAMPLE 1: Dataset Reading
#############################################################################
data(data.read)
dat <- data.read
I <- ncol(dat)

# set burnin and total number of iterations here (CHANGE THIS!)
burnin <- 200
iter <- 500

#***
# Model 1: 1PNO model
mod1 <- mcmc.3pno.testlet( dat ,  est.slope=FALSE , est.guess=FALSE , 
        burnin=burnin, iter=iter )
summary(mod1)
plot(mod1,ask=TRUE) # plot MCMC chains in coda style
plot(mod1,ask=TRUE , layout=2) # plot MCMC output in different layout

#***
# Model 2: 3PNO model with Beta(5,17) prior for guessing parameters
mod2 <- mcmc.3pno.testlet( dat ,  guess.prior=c(5,17) ,
            burnin=burnin, iter=iter )
summary(mod2)

#***
# Model 3: Rasch (1PNO) testlet model
testlets <- substring( colnames(dat) , 1 , 1 )
mod3 <- mcmc.3pno.testlet( dat ,  testlets=testlets ,  est.slope=FALSE , 
           est.guess=FALSE , burnin=burnin, iter=iter )
summary(mod3)

#***
# Model 4: 3PNO testlet model with (almost) fixed guessing parameters .25
mod4 <- mcmc.3pno.testlet( dat ,  guess.prior=1000*c(25,75) , testlets=testlets , 
              burnin=burnin, iter=iter )
summary(mod4)
plot(mod4, ask=TRUE, layout=2)

#***
# Model 5: 2PNO testlet model (param=2)
mod5 <- mcmc.3pno.testlet( dat ,  est.guess=FALSE , testlets=testlets , 
            param=2 , burnin=burnin, iter=iter )
summary(mod5)

#***
# Model 6: 2PNO testlet model (param=3: bifactor model)
mod6 <- mcmc.3pno.testlet( dat ,  est.guess=FALSE , testlets=testlets , 
            param=3 , burnin=burnin, iter=iter )
summary(mod6)

Run the code above in your browser using DataLab