Learn R Programming

TestDesign (version 1.0.2)

calcHessian: Calculate second derivative of log-likelihood

Description

An S4 generic and its methods to calculate the second derivative of the log-likelihood function.

Usage

calcHessian(object, theta, resp)

# S4 method for item_1PL,numeric,numeric calcHessian(object, theta, resp)

# S4 method for item_2PL,numeric,numeric calcHessian(object, theta, resp)

# S4 method for item_3PL,numeric,numeric calcHessian(object, theta, resp)

# S4 method for item_PC,numeric,numeric calcHessian(object, theta, resp)

# S4 method for item_GPC,numeric,numeric calcHessian(object, theta, resp)

# S4 method for item_GR,numeric,numeric calcHessian(object, theta, resp)

# S4 method for item_pool,numeric,numeric calcHessian(object, theta, resp)

# S4 method for pool_cluster,numeric,list calcHessian(object, theta, resp)

Arguments

object

An instance of an item class.

theta

A vector of theta values.

resp

Response data.

Value

Second derivative values of log-likelihoods.

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)
h_item_1 <- calcHessian(item_1, seq(-3, 3, 1), 0)
item_2   <- new("item_2PL", slope = 1.0, difficulty = 0.5)
h_item_2 <- calcHessian(item_2, seq(-3, 3, 1), 0)
item_3   <- new("item_3PL", slope = 1.0, difficulty = 0.5, guessing = 0.2)
h_item_3 <- calcHessian(item_3, seq(-3, 3, 1), 0)
item_4   <- new("item_PC", threshold = c(-1, 0, 1), ncat = 4)
h_item_4 <- calcHessian(item_4, seq(-3, 3, 1), 0)
item_5   <- new("item_GPC", slope = 1.2, threshold = c(-0.8, -1.0, 0.5), ncat = 4)
h_item_5 <- calcHessian(item_5, seq(-3, 3, 1), 0)
item_6   <- new("item_GR", slope = 0.9, category = c(-1, 0, 1), ncat = 4)
h_item_6 <- calcHessian(item_6, seq(-3, 3, 1), 0)
h_itempool <- calcHessian(itempool_science, seq(-3, 3, 1), 0)
# }

Run the code above in your browser using DataLab