lin2tcm_inpshiftProfile: Profile the inpshift using the linearised 2TCM

View source: R/kinfitr_lin2tcm.R

lin2tcm_inpshiftProfileR Documentation

Profile the inpshift using the linearised 2TCM

Description

Function to fit the linearised 2TCM function with several different delay values to find the optimal delay.

Usage

lin2tcm_inpshiftProfile(
  t_tac,
  tac,
  input,
  weights = NULL,
  vB = NULL,
  dur = NULL,
  frameStartEnd = NULL,
  inpshift_vals = NULL
)

Arguments

t_tac

Numeric vector of times for each frame in minutes. We use the time halfway through the frame as well as a zero. If a time zero frame is not included, it will be added.

tac

Numeric vector of radioactivity concentrations in the target tissue for each frame. We include zero at time zero: if not included, it is added.

input

Data frame containing the blood, plasma, and parent fraction concentrations over time. This can be generated using the blood_interp function.

weights

Optional. Numeric vector of the weights assigned to each frame in the fitting. We include zero at time zero: if not included, it is added. If not specified, uniform weights will be used.

vB

Optional. The blood volume fraction. If not specified, this will be fitted. If specified as a number (e.g. 0.05 for 5 will be used.

dur

Optional. Numeric vector of the time durations of the frames. If not included, the integrals will be calculated using trapezoidal integration.

frameStartEnd

Optional: This allows one to specify the beginning and final frame to use for modelling, e.g. c(1,20). This is to assess time stability.

inpshift_vals

Optional. The values of the inpshift to assess with the grid. By default, a grid between -1 and 1 with spacing of 0.01 will be used.

Value

A plot with the residual weighted sums of squares for each value of the input shift

Author(s)

Granville J Matheson, mathesong@gmail.com

References

Oikonen, V (2003). Multilinear solution for 4-compartment model: I. Tissue compartments in series. Gjedde A, Wong DF 1990. Modeling neuroreceptor binding of radioligands in vivo. In: Quantitative imaging: neuroreceptors, neurotransmitters, and enzymes. (Eds. Frost JJ, Wagner HM Jr). Raven Press, 51-79.

Examples

data(pbr28)

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

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
)

lin2tcm_inpshiftProfile(t_tac, tac, input, weights,
   inpshift_vals = seq(-0.5, 0.5, length.out=101))
lin2tcm_inpshiftProfile(t_tac, tac, input, dur = dur)
lin2tcm_inpshiftProfile(t_tac, tac, input, vB=0.05,
  frameStartEnd = c(1,15))


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