Skip to contents

Weighted linear least squares of instrument response on known calibrator concentration, the standard basis for GC-MS / LC-MS/MS quantitation. LOD and LOQ follow the residual-standard-error convention (LOD = 3.3 s/b, LOQ = 10 s/b; ICH Q2). With response_unknown, inverse-predicts the unknown concentration and flags it against LOD/LOQ.

Usage

morie_tox_calibration(
  conc,
  response,
  weights = "1/x^2",
  response_unknown = NULL
)

Arguments

conc

Numeric vector of known calibrator concentrations (> 0).

response

Numeric vector of instrument responses (same length).

weights

Optional weights; "1/x^2" (default, the usual variance model for wide tox calibration ranges), "1/x", or "none", or a numeric vector.

response_unknown

Optional scalar response for a case sample to inverse-predict.

Value

A list with the fitted slope, intercept, r_squared, lod, loq, and (if response_unknown is given) conc_hat plus a flag of "below_lod", "below_loq", or "quantifiable".

Examples

cal <- morie_tox_calibration(
  conc = c(0.05, 0.1, 0.5, 1, 5, 10),
  response = c(48, 102, 495, 1010, 5050, 9980),
  response_unknown = 250
)
cal$conc_hat
#> [1] 0.2498458