Learn R Programming

sirt (version 4.1-15)

mcmc.2pno: MCMC Estimation of the Two-Parameter Normal Ogive Item Response Model

Description

This function estimates the Two-Parameter normal ogive item response model by MCMC sampling (Johnson & Albert, 1999, p. 195ff.).

Usage

mcmc.2pno(dat, weights=NULL, burnin=500, iter=1000, N.sampvalues=1000,
      progress.iter=50, save.theta=FALSE)

Value

A list of class mcmc.sirt with following entries:

mcmcobj

Object of class mcmc.list

summary.mcmcobj

Summary 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.

burnin

Number of burnin iterations

iter

Total number of iterations

a.chain

Sampled values of \(a_i\) parameters

b.chain

Sampled values of \(b_i\) parameters

theta.chain

Sampled values of \(\theta_p\) parameters

deviance.chain

Sampled values of Deviance values

EAP.rel

EAP reliability

person

Data frame with EAP person parameter estimates for \(\theta_p\) and their corresponding posterior standard deviations

dat

Used data frame

weights

Used student weights

...

Further values

Arguments

dat

Data frame with dichotomous item responses

weights

An optional vector with student sample weights

burnin

Number of burnin iterations

iter

Total 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?

Details

The two-parameter normal ogive item response model with a probit link function is defined by $$ P(X_{pi}=1 | \theta_p )=\Phi ( a_i \theta_p - b_i ) \quad, \quad \theta_p \sim N(0,1) $$ Note that in this implementation non-informative priors for the item parameters are chosen (Johnson & Albert, 1999, p. 195ff.).

References

Johnson, V. E., & Albert, J. H. (1999). Ordinal Data Modeling. New York: Springer.

See Also

S3 methods: summary.mcmc.sirt, plot.mcmc.sirt

For estimating the 2PL model with marginal maximum likelihood see rasch.mml2 or smirt.

A hierarchical version of this model can be estimated with mcmc.2pnoh.

Examples

Run this code
if (FALSE) {
#############################################################################
# EXAMPLE 1: Dataset Reading
#############################################################################
data(data.read)
# estimate 2PNO with MCMC with 3000 iterations and 500 burn-in iterations
mod <- sirt::mcmc.2pno( dat=data.read, iter=3000, burnin=500 )
# plot MCMC chains
plot( mod$mcmcobj, ask=TRUE )
# write sampled chains into codafile
mcmclist2coda( mod$mcmcobj, name="dataread_2pno" )
# summary
summary(mod)

#############################################################################
# EXAMPLE 2
#############################################################################
# simulate data
N <- 1000
I <- 10
b <- seq( -1.5, 1.5, len=I )
a <- rep( c(1,2), I/2 )
theta1 <- stats::rnorm(N)
dat <- sirt::sim.raschtype( theta=theta1, fixed.a=a, b=b )

#***
# Model 1: estimate model without weights
mod1 <- sirt::mcmc.2pno( dat, iter=1500, burnin=500)
mod1$summary.mcmcobj
plot( mod1$mcmcobj, ask=TRUE )

#***
# Model 2: estimate model with weights
# define weights
weights <- c( rep( 5, N/4 ), rep( .2, 3/4*N ) )
mod2 <- sirt::mcmc.2pno( dat, weights=weights, iter=1500, burnin=500)
mod1$summary.mcmcobj
}

Run the code above in your browser using DataLab