Learn R Programming

immer (version 0.4-0)

lc2_agreement: A Latent Class Model for Agreement of Two Raters

Description

Estimates a latent class model for agreement of two raters (Schuster & Smith, 2006). See Details for the description of the model.

Usage

lc2_agreement(y, w = rep(1, nrow(y)), type = "homo", method = "BFGS", ...)

## S3 method for class 'lc2_agreement':
summary(object, digits=3,...)

## S3 method for class 'lc2_agreement':
logLik(object, ...)

## S3 method for class 'lc2_agreement':
anova(object, ...)

Arguments

y
A data frame containing the values of two raters in columns
w
Optional vector of weights
type
Type of model specification. Can be "unif", "equal", "homo" or "hete". See Details.
method
Optimization method used in stats::optim
...
Further arguments passed to stats::optim
object
Object of class l2_agreement
digits
Number of digits for rounding

Value

  • model_outputOutput of the fitted model
  • saturated_outputOutput of the saturated model
  • LRT_outputOutput of the likelihood ratio test of model fit
  • partableParameter table
  • parmsummaryParameter summary
  • agree_trueTrue agreement index shich is the $\gamma$ parameter
  • agree_chanceAgreement by chance
  • rel_agreeConditional reliability of agreement
  • optim_outputOutput of optim from the fitted model
  • nobsNumber of observations
  • typeModel type
  • icInformation criteria
  • loglikeLog-likelihood
  • nparsNumber of parameters
  • yUsed dataset
  • wUsed weights

Details

The latent class model for two raters decomposes a portion of ratings which conform to true agreement and another portion of ratings which conform to a random rating of a category. Let $X_r$ denote the rating of rater $r$, then for $i \neq j$, it is assumed that $$P(X_1 = i , X_2 = j) = \phi_1 (i) \phi_2 (i) ( 1 - \gamma )$$ For $i = j$ it is assumed that $$P(X_1 = i , X_2 = i) = \tau_i \gamma + \phi_{1i} \phi_{2i} ( 1 - \gamma )$$ Where $gamma$ denotes the proportion of true ratings. All $\tau_i$ and $\phi_{ri}$ parameters are estimated using type="hete". If the $\phi$ parameters are assumed as invariant across the two raters (i.e. $\phi_{1i}=\phi_{2i}=\phi_{i}$), then type="homo" must be specified. The constraint $\tau_i = \phi_i$ is imposed by type="equal". All $\phi_i$ parameters are set equal to each other using type="unif".

References

Schuster, C., & Smith, D. A. (2006). Estimating with a latent class model the reliability of nominal judgments upon which two raters agree. Educational and Psychological Measurement, 66(5), 739-747.

Examples

Run this code
#############################################################################
# EXAMPLE 1: Dataset in Schuster & Smith (2006)
#############################################################################

data(data.immer08)
dat <- data.immer08

# select ratings and frequency weights
y <- dat[,1:2]
w <- dat[,3]

#*** Model 1: Uniform distribution phi parameters
mod1 <- lc2_agreement( y = y , w = w , type="unif")
summary(mod1)

#*** Model 2: Equal phi and tau parameters
mod2 <- lc2_agreement( y = y , w = w , type="equal")
summary(mod2)

#*** Model 3: Homogeneous rater model
mod3 <- lc2_agreement( y = y , w = w , type="homo")
summary(mod3)

#*** Model 4: Heterogeneous rater model
mod4 <- lc2_agreement( y = y , w = w , type="hete")
summary(mod4)

#--- some model comparisons
anova(mod3,mod4)
IRT.compareModels(mod1,mod2,mod3,mod4)

Run the code above in your browser using DataLab