Learn R Programming

CDM (version 4.8-0)

IRT.likelihood: S3 Methods for Extracting of the Individual Likelihood and the Individual Posterior

Description

Functions for extracting the individual likelihood and individual posterior distribution.

Usage

IRT.likelihood(object, ...)

IRT.posterior(object, ...)

## S3 method for class 'din':
IRT.likelihood(object, \dots)
## S3 method for class 'din':
IRT.posterior(object, \dots)

## S3 method for class 'gdina':
IRT.likelihood(object, \dots)
## S3 method for class 'gdina':
IRT.posterior(object, \dots)

## S3 method for class 'mcdina':
IRT.likelihood(object, \dots)
## S3 method for class 'mcdina':
IRT.posterior(object, \dots)

## S3 method for class 'gdm':
IRT.likelihood(object, \dots)
## S3 method for class 'gdm':
IRT.posterior(object, \dots)

## S3 method for class 'slca':
IRT.likelihood(object, \dots)
## S3 method for class 'slca':
IRT.posterior(object, \dots)

Arguments

object
Object of classes din, gdina, mcdina, gdm or
...
More arguments to be passed.

Value

  • For both functions IRT.likelihood and IRT.posterior, it is a matrix with attributes
  • thetaUni- or multidimensional skill space (theta grid in item response models).
  • prob.thetaProbability distribution of theta
  • skillspaceDesign matrix and estimated parameters for skill space distribution (only for IRT.posterior.slca)
  • GNumber of groups

Examples

Run this code
#############################################################################
# EXAMPLE 1: Extracting likelihood and posterior from a DINA model
#############################################################################

data(sim.data)
data(sim.qmatrix)

#*** estimate model
mod1 <- din(sim.dina, sim.qmatrix, rule = "DINA" , maxit=10)
#*** extract likelihood
likemod1 <- IRT.likelihood(mod1)
str(likemod1)
# extract theta
attr(likemod1, "theta" )
#*** extract posterior
pomod1 <- IRT.posterior( mod1 )
str(pomod1)

Run the code above in your browser using DataLab