View source: R/kinfitr_refPatlak.R
refPatlak | R Documentation |
Function to fit the Patlak Reference Tissue Model of Patlak & Blasbert (1985) to data.
refPatlak(
t_tac,
reftac,
roitac,
tstarIncludedFrames,
weights = NULL,
dur = NULL,
frameStartEnd = NULL
)
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. |
reftac |
Numeric vector of radioactivity concentrations in the reference tissue for each frame. We include zero at time zero: if not included, it is added. |
roitac |
Numeric vector of radioactivity concentrations in the target tissue for each frame. We include zero at time zero: if not included, it is added. |
tstarIncludedFrames |
The number of frames to be used in the regression model, i.e. the number of frames for which
the function is linear after pseudo-equilibrium is reached. This is a count from the end of the measurement, so a value of
10 means that last 10 frames will be used. This value can be estimated using |
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. |
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. |
A list with a data frame of the fitted parameters out$par
, the model fit object out$fit
, a dataframe
containing the TACs of the data out$tacs
, a dataframe containing the TACs of the fitted values out$fitvals
,
a vector of the weights out$weights
, and the specified tstarIncludedFrames value out$tstarIncludedFrames
Granville J Matheson, mathesong@gmail.com
Patlak CS, Blasberg RG. Graphical evaluation of blood-to-brain transfer constants from multiple-time uptake data. Generalizations. Journal of Cerebral Blood Flow & Metabolism. 1985 Dec 1;5(4):584-90.
# Note: Reference region models, and irreversible binding models, should not
# be used for PBR28 - this is just to demonstrate function
data(pbr28)
t_tac <- pbr28$tacs[[2]]$Times / 60
reftac <- pbr28$tacs[[2]]$CBL
roitac <- pbr28$tacs[[2]]$STR
weights <- pbr28$tacs[[2]]$Weights
fit <- refPatlak(t_tac, reftac, roitac, tstarIncludedFrames = 10, weights = weights)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.