CDP: Probability of correct response for cognitive diagnostic...

Description Usage Arguments Value Examples

View source: R/CDP.R

Description

This function returns the model-predicted probability of correct response of one item for one person given the item parameters, Q vector, and alpha vector. Currently supported cognitive diagnostic models include the DINA model, DINO model, NIDA model, G-NIDA model, and R-RUM model. This function is called by the ItemFit function in the package.

Usage

1
CDP(Q, par, alpha, model = c("DINA", "DINO", "NIDA", "GNIDA", "RRUM"))

Arguments

Q

The Q-vector of the item. Columns represent attributes. 1=attribute required by the item, 0=attribute not required by the item.

par

A list of parameters. DINA & DINO — par$slip: a scaler slip parameter for the item; par$guess: a scaler guessing parameter for the item. NIDA — par$slip: a vector of slip parameters for each attribute; par$guess: a vector of guessing parameters for each attribute. GNIDA — par$slip: a vector of slip parameters for each attribute for the item; par$guess: a vector of guessing parameters for each attribute for the item. RRUM — par$pi: a scaler pi parameter for the item; par$r: a vector of r parameters for each attribute for the item.

alpha

A vector of examinee ability profile. 1=examinee masters the attribute, 0=examinee does not master the attribute.

model

Currently supports five models: "DINA", "DINO", "NIDA", "GNIDA", and "RRUM". The default is "DINA".

Value

P

The probability of correct response for the item by the person.

Examples

1
2
3
4
5
6
7
8
# Generate item and examinee profiles

Q <- c(1, 0, 0)
alpha <- c(1, 0, 0)
slip <- 0.2
guess <- 0.1
my.par <- list(slip=slip, guess=guess)
CDP(Q, my.par, alpha, model="DINA")

Example output

Loading required package: BB
Loading required package: R.oo
Loading required package: R.methodsS3
R.methodsS3 v1.7.1 (2016-02-15) successfully loaded. See ?R.methodsS3 for help.
R.oo v1.21.0 (2016-10-30) successfully loaded. See ?R.oo for help.

Attaching package: 'R.oo'

The following objects are masked from 'package:methods':

    getClasses, getMethods

The following objects are masked from 'package:base':

    attach, detach, gc, load, save

[1] 0.8

NPCD documentation built on Nov. 16, 2019, 1:08 a.m.

Related to CDP in NPCD...