IRTLikelihood.ctt: Computes Individual Likelihood from Classical Test Theory...

Description Usage Arguments Value Examples

View source: R/IRTLikelihood.ctt.R

Description

Computes individual likelihood from classical test theory estimates under a unidimensional normal distribution of measurement errors.

Usage

1
IRTLikelihood.ctt(y, errvar, theta=NULL)

Arguments

y

Vector of observed scores

errvar

Vector of error variances

theta

Optional vector for θ grid.

Value

Object of class IRT.likelihood

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#############################################################################
# EXAMPLE 1: Individual likelihood and latent regression in CTT
#############################################################################

set.seed(75)

#--- simulate data
N <- 2000
x1 <- stats::rnorm(N)
x2 <- .7 * x1 + stats::runif(N)
# simulate true score
theta <- 1.2 + .6*x1 + .3 *x2 + stats::rnorm(N, sd=sqrt(.50) )
var(theta)
# simulate measurement error variances
errvar <- stats::runif( N, min=.6, max=.9 )
# simulate observed scores
y <- theta + stats::rnorm( N, sd=sqrt( errvar) )

#--- create likelihood object
like1 <- TAM::IRTLikelihood.ctt( y=y, errvar=errvar, theta=NULL )

#--- estimate latent regression
X <- data.frame(x1,x2)
mod1 <- TAM::tam.latreg( like=like1, Y=X )

## Not run: 
#--- draw plausible values
pv1 <- TAM::tam.pv( mod1, normal.approx=TRUE )

#--- create datalist
datlist1 <- TAM::tampv2datalist( pv1, pvnames="thetaPV", Y=X )

#--- statistical inference on plausible values using mitools package
library(mitools)
datlist1a <- mitools::imputationList(datlist1)

# fit linear regression and apply Rubin formulas
mod2 <- with( datlist1a, stats::lm( thetaPV ~ x1 + x2 ) )
summary( mitools::MIcombine(mod2) )

## End(Not run)

TAM documentation built on June 25, 2021, 5:13 p.m.