draw.pv.ctt: Plausible Value Imputation Using a Known Measurement Error...

View source: R/draw.pv.ctt.R

draw.pv.cttR Documentation

Plausible Value Imputation Using a Known Measurement Error Variance (Based on Classical Test Theory)

Description

This function provides unidimensional plausible value imputation with a known measurement error variance or classical test theory (Mislevy, 1991). The reliability of the scale is estimated by Cronbach's Alpha or can be provided by the user.

Usage

draw.pv.ctt(y, dat.scale=NULL, x=NULL, samp.pars=TRUE,
      alpha=NULL, sig.e=NULL, var.e=NULL, true.var=NULL)

Arguments

y

Vector of scale scores if y should not be used.

dat.scale

Matrix of item responses

x

Matrix of covariates

samp.pars

An optional logical indicating whether scale parameters (reliability or measurement error standard deviation) should be sampled

alpha

Reliability estimate of the scale. The default of NULL means that Cronbach's alpha will be used as a reliability estimate.

sig.e

Optional vector of the standard deviation of the error. Note that it is not the error variance.

var.e

Optional vector of the variance of the error.

true.var

True score variance

Details

The linear model is assumed for drawing plausible values of a variable Y contaminated by measurement error. Assuming Y=\theta + e and a linear regression model for \theta

\theta=\bold{X} \beta + \epsilon

(plausible value) imputations from the posterior distribution P( \theta | Y, \bold{X} ) are drawn. See Mislevy (1991) for details.

Value

A vector with plausible values

Note

Plausible value imputation is also labeled as multiple overimputation (Blackwell, Honaker & King, 2011).

References

Blackwell, M., Honaker, J., & King, G. (2011). Multiple overimputation: A unified approach to measurement error and missing data. Technical Report.

Mislevy, R. J. (1991). Randomization-based inference about latent variables from complex samples. Psychometrika, 56(2), 177-196. \Sexpr[results=rd]{tools:::Rd_expr_doi("10.1007/BF02294457")}

See Also

See also sirt::plausible.value.imputation.raschtype for plausible value imputation.

Plausible value imputations can be conducted in mice using the imputation method mice.impute.plausible.values.

Plausible values can be drawn in Amelia by specifying observation-level priors, see Amelia::moPrep and Amelia::amelia.

Examples

## Not run: 

#############################################################################
# SIMULATED EXAMPLE 1: Scale scores
#############################################################################

set.seed(899)
n <- 5000       # number of students
x <- round( stats::runif( n, 0,1 ) )
y <- stats::rnorm(n)
# simulate true score theta
theta <- .6 + .4*x + .5 * y + stats::rnorm(n)
# simulate observed score by adding measurement error
sig.e <- rep( sqrt(.40), n )
theta_obs <- theta + stats::rnorm( n, sd=sig.e)

# calculate alpha
( alpha <- stats::var( theta ) / stats::var( theta_obs ) )
# [1] 0.7424108
#=> Ordinarily, sig.e or alpha will be known, assumed or estimated by using items,
#    replications or an appropriate measurement model.

# create matrix of predictors
X <- as.matrix( cbind(x, y ) )

# plausible value imputation with scale score
imp1 <- miceadds::draw.pv.ctt( y=theta_obs, x=X, sig.e=sig.e )
# check results
stats::lm( imp1 ~ x + y )

# imputation with alpha as an input
imp2 <- miceadds::draw.pv.ctt( y=theta_obs, x=X, alpha=.74 )
stats::lm( imp2 ~ x + y )

#--- plausible value imputation in Amelia package
library(Amelia)

# define data frame
dat <- data.frame( "x"=x, "y"=y, "theta"=theta_obs )
# generate observation-level priors for theta
priors <- cbind( 1:n, 3, theta_obs, sig.e )
             # 3 indicates column index for theta
overimp <- priors[,1:2]
# run Amelia
imp <- Amelia::amelia( dat, priors=priors, overimp=overimp, m=10)
# create object of class datlist and evaluate results
datlist <- miceadds::datlist_create( imp$imputations )
withPool_MI( with( datlist, stats::var(theta) ) )
stats::var(theta)       # compare with true variance
mod <- with( datlist,  stats::lm( theta ~ x + y ) )
mitools::MIcombine(mod)

## End(Not run)

miceadds documentation built on May 29, 2024, 11:05 a.m.