plot_kinfit: Plot Kinetic Model Fit: Generic Function

View source: R/kinfitr_miscfuncs.R

plot_kinfitR Documentation

Plot Kinetic Model Fit: Generic Function

Description

Function to plot the output of a kinetic model. This function calls the specific plotting functions for each model based on the output of the model.

Usage

plot_kinfit(modelout, ...)

Arguments

modelout

The output object of the model fitting procedure.

...

Additional optional arguments.

Details

This function uses the out$model name to call the correct function to plot the model fit.

Value

A ggplot2 object of the plot.

Author(s)

Granville J Matheson, mathesong@gmail.com

Examples


data(pbr28)

t_tac <- pbr28$tacs[[2]]$Times / 60
tac <- pbr28$tacs[[2]]$FC
weights <- pbr28$tacs[[2]]$Weights

input <- blood_interp(
  pbr28$procblood[[2]]$Time / 60, pbr28$procblood[[2]]$Cbl_dispcorr,
  pbr28$procblood[[2]]$Time / 60, pbr28$procblood[[2]]$Cpl_metabcorr,
  t_parentfrac = 1, parentfrac = 1
)

fit <- ma1(t_tac, tac, input, 10, weights)

plot_kinfit(fit, roiname = "FC")

mathesong/kinfitr documentation built on Jan. 15, 2024, 11:07 p.m.