plot_lin2tcmfit: Plot: Linear 2TCM

View source: R/kinfitr_lin2tcm.R

plot_lin2tcmfitR Documentation

Plot: Linear 2TCM

Description

Function to visualise the fit of the linearised 2TCM model to data.

Usage

plot_lin2tcmfit(lin2tcmout, roiname = NULL)

Arguments

lin2tcmout

The output object of the linearised 2TCM fitting procedure.

roiname

Optional. The name of the Target Region to see it on the plot.

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 <- lin2tcm(t_tac, tac, input, weights, inpshift=0.1)
plot_lin2tcmfit(fit)

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