mcmc.2pno.ml(dat, group, link="logit" , est.b.M = "h", est.b.Var = "n",
est.a.M = "f", est.a.Var = "n", burnin = 500, iter = 1000,
N.sampvalues = 1000, progress.iter = 50, prior.sigma2 = c(1, 0.4),
prior.sigma.b = c(1, 1), prior.sigma.a = c(1, 1), prior.omega.b = c(1, 1),
prior.omega.a = c(1, 0.4) , sigma.b.init=.3 )
"logit"
for dichotomous data
and "normal"
for data under normal distribution assumptionsn
- non-hierarchical prior
distribution, i.e. $\omega_b$ is set to a very high value and is not
estimated
h
- hierarchical prior distribution with estimated
distribution parameters $\mu_n
-- no estimation of the item variance, i.e. $\sigma_{b,i}$ is
assumed to be zero
i
-- item-specific standard deviation of item difficulties
j
f
- no estimation of item slopes, i.e all item slopes $a_i$ are
fixed at one
n
- non-hierarchical prior distribution, i.e. $\omega_a =0$
h
- hierarchical prior distribution win
-- no estimation of the item variance
i
-- item-specific standard deviation of item slopes
j
-- a joint standard deviation of all item slopes is estimprogress.iter
-th iteration. If no progress
display is wanted, then choose progress.iter
larger than iter
.mcmc.sirt
with following entries:mcmc.list
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.link="logit"
) of persons $p$ in
group $j$ on
item $i$, the probability of a correct response is defined as
est.b.M
, est.b.Var
,
est.a.M
and est.a.Var
defines which variance components
should be estimated.
For normally distributed item responses (link="normal"
), the model
equations remain the same except the item response model which is now written as
summary.mcmc.sirt
, plot.mcmc.sirt
For MCMC estimation of three-parameter (testlet) models see
mcmc.3pno.testlet
.
See also the #############################################################################
# EXAMPLE 1: Dataset Multilevel 1
#############################################################################
data(data.ml1)
dat <- data.ml1[,-1]
group <- data.ml1$group
# just for a try use a very small number of iterations
burnin <- 50 ; iter <- 100
#***
# Model 1: 1PNO with no cluster item effects
mod1 <- mcmc.2pno.ml( dat , group , est.b.Var="n" , burnin=burnin , iter=iter )
summary(mod1) # summary
plot(mod1,layout=2,ask=TRUE) # plot results
# write results to coda file
mcmclist2coda( mod1$mcmcobj , name = "data.ml1_mod1" )
#***
# Model 2: 1PNO with cluster item effects of item difficulties
mod2 <- mcmc.2pno.ml( dat , group , est.b.Var="i" , burnin=burnin , iter=iter )
summary(mod2)
plot(mod2, ask=TRUE , layout=2 )
#***
# Model 3: 2PNO with cluster item effects of item difficulties but
# joint item slopes
mod3 <- mcmc.2pno.ml( dat , group , est.b.Var="i" , est.a.M="h" ,
burnin=burnin , iter=iter )
summary(mod3)
#***
# Model 4: 2PNO with cluster item effects of item difficulties and
# cluster item effects with a jointly estimated SD
mod4 <- mcmc.2pno.ml( dat , group , est.b.Var="i" , est.a.M="h" ,
est.a.Var="j" , burnin=burnin , iter=iter )
summary(mod4)
#############################################################################
# EXAMPLE 2: Dataset Multilevel 2
#############################################################################
data(data.ml2)
dat <- data.ml2[,-1]
group <- data.ml2$group
# set iterations for all examples (too few!!)
burnin <- 100 ; iter <- 500
#***
# Model 1: no intercept variance, no slopes
mod1 <- mcmc.2pno.ml( dat=dat , group=group , est.b.Var="n" ,
burnin=burnin , iter=iter , link="normal" , progress.iter=20 )
summary(mod1)
#***
# Model 2a: itemwise intercept variance, no slopes
mod2a <- mcmc.2pno.ml( dat=dat , group=group , est.b.Var="i" ,
burnin=burnin , iter=iter ,link="normal" , progress.iter=20 )
summary(mod2a)
#***
# Model 2b: homogeneous intercept variance, no slopes
mod2b <- mcmc.2pno.ml( dat=dat , group=group , est.b.Var="j" ,
burnin=burnin , iter=iter ,link="normal" , progress.iter=20 )
summary(mod2b)
#***
# Model 3: intercept variance and slope variances
# hierarchical item and slope parameters
mod3 <- mcmc.2pno.ml( dat=dat , group=group ,
est.b.M="h" , est.b.Var="i" , est.a.M="h" , est.a.Var="i" ,
burnin=burnin , iter=iter ,link="normal" , progress.iter=20 )
summary(mod3)
Run the code above in your browser using DataLab