plot_outliers: Plot Outlier Detection Results for Precision Profiles.

View source: R/utils.R

plot_outliersR Documentation

Plot Outlier Detection Results for Precision Profiles.

Description

Visualizes the result of find_outliers. Shows the original parametric VFP fit, highlights confirmed outliers and optionally overlays the refitted model after outlier removal.

Usage

plot_outliers(
  obj,
  type = c("cv", "sd", "vc"),
  add.robust = FALSE,
  add.final = TRUE,
  ...
)

Arguments

obj

(object) of class VFP with an outliers element as produced by find_outliers.

type

(character) scale for the y-axis: "cv" (coefficient of variation), "sd" (standard deviation), or "vc" (variance).

add.robust

(logical) if TRUE, adds the robust baseline curve as a dashed green line.

add.final

(logical) if TRUE and outliers were found, adds the refitted VFP model (without outliers) as a red line.

...

additional arguments, e.g. ylim, xlim.

Value

Called for its side effect (plot). Returns invisible(NULL).

Author(s)

Andre Schuetzenmeister andre.schuetzenmeister@roche.com

See Also

find_outliers

Examples

## Not run: 
data(Glucose)
Glucose$DF <- 1
Glucose$Mean <- (Glucose$V1 + Glucose$V2) / 2
Glucose$VC <- (Glucose$V1 - Glucose$V2)^2 / 4
Glucose <- Glucose[which(Glucose$VC > 0), ]
fit <- fit_vfp(Glucose, 1:9)
out <- find_outliers(fit)
plot_outliers(out)

## End(Not run)

VFP documentation built on Dec. 4, 2026, 5:09 p.m.