Learn R Programming

tcl (version 1.0.1)

tcl_scorefun: Computation of score function.

Description

Uses function jacobian() from numDeriv package to compute (approximate numerically) score function (first order partial derivatives of conditional log likelihood function) evaluated at arbitrary values of item easiness parameters.

Usage

tcl_scorefun(data, eta, W, model = "RM")

Value

Score function evaluated at eta.

Arguments

data

data matrix.

eta

numeric vector of item easiness parameters.

W

design matrix.

model

RM, PCM, RSM, LLTM. Default is set to "RM".

References

Gilbert, P., Gilbert, M. P., & Varadhan, R. (2016). numDeriv: Accurate Numerical Derivatives. R package version 2016.8-1.1. url: https://CRAN.R-project.org/package=numDeriv

Examples

Run this code
if (FALSE) {
# Rasch model with beta_1 restricted to 0
y <- eRm::raschdat1
res <- eRm::RM(X = y, sum0 = FALSE)
scorefun <- tcl_scorefun(data = y, eta = res$etapar, model = "RM")
}

Run the code above in your browser using DataLab