plausible.value.imputation.raschtype(data=NULL, f.yi.qk=NULL, X,
Z=NULL, beta0=rep(0, ncol(X)), sig0=1, b=rep(1, ncol(X)),
a=rep(1, length(b)), c=rep(0, length(b)), d=1+0*b,
alpha1=0, alpha2=0, theta.list=seq(-5, 5, len=50),
cluster=NULL, iter, burnin, nplausible=1, printprogress=TRUE)
rasch.mml2
or
rasch.copula2
. The use of this argument f.yi.qk
is
specified.latent.regression.em.raschtype
.############################################################
### SIMULATED EXAMPLE 1
set.seed(899)
############################################################
I <- 21 # number of items
b <- seq(-2,2, len=I) # item difficulties
n <- 2000 # number of students
# simulate theta and covariates
theta <- rnorm( n )
x <- .7 * theta + rnorm( n , .5 )
y <- .2 * x+ .3*theta + rnorm( n , .4 )
dfr <- data.frame( theta , 1 , x , y )
# simulate Rasch model
dat1 <- sim.raschtype( theta = theta , b = b )
# Plausible value draws
pv1 <- plausible.value.imputation.raschtype(data=dat1 , X=dfr[,-1] , b = b ,
nplausible=3 , iter=10 , burnin=5)
# estimate linear regression based on first plausible value
mod1 <- lm( pv1$pvdraws[,1] ~ x+y )
summary(mod1)
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -0.27755 0.02121 -13.09 <2e-16 ***
## x 0.40483 0.01640 24.69 <2e-16 ***
## y 0.20307 0.01822 11.15 <2e-16 ***
Run the code above in your browser using DataLab