Skip to contents

Extracts calibration fit metrics from a MidarExperiment object.

Usage

get_calibration_metrics(
  data = NULL,
  with_lod = TRUE,
  with_loq = TRUE,
  with_bias = TRUE,
  with_coefficients = TRUE,
  with_sigma = TRUE
)

Arguments

data

A MidarExperiment object with QC metrics.

with_lod

Whether to include LoD in output. Default is TRUE.

with_loq

Whether to include LoQ in output. Default is TRUE.

with_bias

Whether to include bias in output. Default is TRUE.

with_coefficients

Whether to include regression coefficients. Default is TRUE.

with_sigma

Whether to include sigma in output. Default is TRUE.

Value

A tibble with exported calibration metrics.

Details

Requires prior computation of regression results using calc_calibration_results(). See its documentation for details.

Returned Details and Metrics

  • feature_id: Feature identifier.

  • is_quantifier: Logical, indicates if the feature is a quantifier.

  • fit_model: Regression model used for fitting.

  • weighting: Weighting method used in fitting.

  • lowest_cal: Lowest nonzero calibration concentration.

  • highest_cal: Highest calibration concentration.

  • r.squared: R-squared value, indicating goodness of fit.

  • coef_a: Slope of the regression line (linear) or coefficient of the quadratic term (x^2) (quadratic).

  • coef_b: Intercept of the regression line (linear) or coefficient of the linear term (x) (quadratic).

  • coef_c: Intercept of the regression equation (quadratic). Set to NA for linear models.

  • sigma: Residual standard error of the model.

  • reg_failed: TRUE if regression fitting failed.

  • LoD = 3× the sample standard error of residuals / slope of the regression.

  • LoQ = 10× the sample standard error of residuals / slope of the regression.

Note: For LoD/LoQ calculations, the slope used in the formula is calculated at the lowest nonzero calibration point for quadratic fits.