Learn R Programming

nonprobsampling (version 0.1.0)

check_estimating_system: Validate the Jacobian and estimating equation vector

Description

Checks that the Jacobian `J` and estimating equation vector `g` are numerically valid and that `J` is square and full rank before a Newton-Raphson step is taken.

Usage

check_estimating_system(J, g, label = "method", tol_singular = 1e-07)

Value

`invisible(TRUE)` if all checks pass; otherwise stops with an informative error message.

Arguments

J

Square numeric Jacobian matrix of dimension \(p \times p\).

g

Numeric estimating equation vector of length \(p\).

label

Character string used as a prefix in error messages to identify the calling method.

tol_singular

Tolerance passed to `qr()` for detecting rank deficiency. Default is `1e-7`, matching R's `qr()` default.