mcmc.2pno.Rd
This function estimates the Two-Parameter normal ogive item response model by MCMC sampling (Johnson & Albert, 1999, p. 195ff.).
mcmc.2pno(dat, weights=NULL, burnin=500, iter=1000, N.sampvalues=1000, progress.iter=50, save.theta=FALSE)
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 |
save.theta | Should theta values be saved? |
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.).
A list of class mcmc.sirt
with following entries:
Object of class mcmc.list
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.
Number of burnin iterations
Total number of iterations
Sampled values of \(a_i\) parameters
Sampled values of \(b_i\) parameters
Sampled values of \(\theta_p\) parameters
Sampled values of Deviance values
EAP reliability
Data frame with EAP person parameter estimates for \(\theta_p\) and their corresponding posterior standard deviations
Used data frame
Used student weights
Further values
Johnson, V. E., & Albert, J. H. (1999). Ordinal Data Modeling. New York: Springer.
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
.
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 }