Module residual_error

Module residual_error 

Expand description

Residual error models for parametric algorithms (SAEM, FOCE, etc.)

This module provides error model implementations that use the prediction (model output) rather than the observation for computing residual error.

§Conceptual Difference from crate::ErrorModel

  • crate::ErrorModel (in error_model.rs): Represents measurement/assay noise. Sigma is computed from the observation using polynomial characterization. Used by non-parametric algorithms (NPAG, NPOD, etc.).

  • ResidualErrorModel (this module): Represents residual unexplained variability in population models. Sigma is computed from the prediction. Used by parametric algorithms (SAEM, FOCE, etc.).

§R saemix Correspondence

The error model in saemix (func_aux.R):

error.typ <- function(f, ab) {
    g <- cutoff(sqrt(ab[1]^2 + ab[2]^2 * f^2))
    return(g)
}
saemix parameterThis implementation
ab[1] (a)Constant::a or Combined::a
ab[2] (b)Proportional::b or Combined::b

§Error Model Types

  • Constant: σ = a (independent of prediction)
  • Proportional: σ = b * |f| (scales with prediction)
  • Combined: σ = sqrt(a² + b²*f²) (most flexible, default in saemix)
  • Exponential: σ for log-transformed data

Structs§

ResidualErrorModels
Collection of residual error models for multiple output equations

Enums§

ResidualErrorModel
Residual error model for parametric estimation algorithms.