marginal_rxx | R Documentation |
Given an estimated model and a prior density function, compute the marginal reliability (Thissen and Wainer, 2001). This is only available for unidimensional tests.
marginal_rxx(mod, density = dnorm, ...)
mod |
an object of class |
density |
a density function to use for integration. Default assumes the latent traits are from a normal (Gaussian) distribution |
... |
additional arguments passed to the density function |
Phil Chalmers rphilip.chalmers@gmail.com
Chalmers, R., P. (2012). mirt: A Multidimensional Item Response Theory Package for the R Environment. Journal of Statistical Software, 48(6), 1-29. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.18637/jss.v048.i06")}
Thissen, D. and Wainer, H. (2001). Test Scoring. Lawrence Erlbaum Associates.
empirical_rxx
, extract.group
, testinfo
dat <- expand.table(deAyala)
mod <- mirt(dat)
# marginal estimate treating item parameters as known
marginal_rxx(mod)
# compare to alpha
itemstats(dat)$overall$alpha
# empirical estimate (assuming the same prior)
fscores(mod, returnER = TRUE)
# empirical rxx the alternative way, given theta scores and SEs
fs <- fscores(mod, full.scores.SE=TRUE)
head(fs)
empirical_rxx(fs)
#############
# example demonstrating correlation attenuation
theta <- rnorm(1000)
X <- theta + rnorm(1000, sd=2)
cor(X, theta) # correlation without measurement error (what you want)
# measured with a 10 item GRM test
nitems <- 10
a <- matrix(rlnorm(nitems,.2,.3))
diffs <- t(apply(matrix(runif(nitems*4, .3, 1), nitems), 1, cumsum))
diffs <- -(diffs - rowMeans(diffs))
d <- diffs + rnorm(nitems)
dat <- simdata(a, d, itemtype = 'graded', Theta=matrix(theta))
# correlation with total score (attenuated)
cor(rowSums(dat), X)
# fit single group model
mod <- mirt(dat)
# EAP correlation (also attenuated)
fs <- fscores(mod)
cor(fs, X)
# correction for attenuation, r_x.theta = r_x.theta.hat / sqrt(rxx_theta.hat)
(rxx <- marginal_rxx(mod)) # alternatively, could use empirical_rxx()
cor(fs, X) / sqrt(rxx) # correction estimate
cor(X, theta) # compare to true correlation
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.