mcmc.2pno | R Documentation |
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:
mcmcobj |
Object of class |
summary.mcmcobj |
Summary of the |
burnin |
Number of burnin iterations |
iter |
Total number of iterations |
a.chain |
Sampled values of |
b.chain |
Sampled values of |
theta.chain |
Sampled values of |
deviance.chain |
Sampled values of Deviance values |
EAP.rel |
EAP reliability |
person |
Data frame with EAP person parameter estimates for
|
dat |
Used data frame |
weights |
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
.
## Not run:
#############################################################################
# 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
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.