Learn R Programming

TestDesign (version 1.0.2)

calcDerivative: Calculate first derivative

Description

An S4 generic and its methods to calculate the first derivative of the probability function.

Usage

calcDerivative(object, theta)

# S4 method for item_1PL,numeric calcDerivative(object, theta)

# S4 method for item_2PL,numeric calcDerivative(object, theta)

# S4 method for item_3PL,numeric calcDerivative(object, theta)

# S4 method for item_PC,numeric calcDerivative(object, theta)

# S4 method for item_GPC,numeric calcDerivative(object, theta)

# S4 method for item_GR,numeric calcDerivative(object, theta)

# S4 method for item_pool,numeric calcDerivative(object, theta)

# S4 method for pool_cluster,numeric calcDerivative(object, theta)

Arguments

object

An instance of an item class.

theta

A vector of theta values.

Value

First derivative values.

References

rasch_probabilistic_1960TestDesign

lord_theory_1952TestDesign

birnbaum_efficient_1957TestDesign

birnbaum_estimation_1958TestDesign

birnbaum_further_1958TestDesign

birnbaum_latent_1968TestDesign

masters_rasch_1982TestDesign

andrich_rating_1978TestDesign

muraki_generalized_1992TestDesign

samejima_estimation_1969TestDesign

Examples

Run this code
# NOT RUN {
item_1   <- new("item_1PL", difficulty = 0.5)
d.item_1 <- calcDerivative(item_1, seq(-3, 3, 1))
item_2   <- new("item_2PL", slope = 1.0, difficulty = 0.5)
d.item_2 <- calcDerivative(item_2, seq(-3, 3, 1))
item_3   <- new("item_3PL", slope = 1.0, difficulty = 0.5, guessing = 0.2)
d.item_3 <- calcDerivative(item_3, seq(-3, 3, 1))
item_4   <- new("item_PC", threshold = c(-1, 0, 1), ncat = 4)
d.item_4 <- calcDerivative(item_4, seq(-3, 3, 1))
item_5   <- new("item_GPC", slope = 1.2, threshold = c(-0.8, -1.0, 0.5), ncat = 4)
d.item_5 <- calcDerivative(item_5, seq(-3, 3, 1))
item_6   <- new("item_GR", slope = 0.9, category = c(-1, 0, 1), ncat = 4)
d.item_6 <- calcDerivative(item_6, seq(-3, 3, 1))
d_itempool <- calcDerivative(itempool_science, seq(-3, 3, 1))
# }

Run the code above in your browser using DataLab