blmod_exp: Blood Model: Exponential

blmod_expR Documentation

Blood Model: Exponential

Description

Fit an exponential model to AIF data with the ability to model the peak. In other words, this model fits a single NLS model which describes the rise and the fall of the AIF. This approach is more flexible, but also more sensitive to fitting failures.

Usage

blmod_exp(
  time,
  activity,
  Method = NULL,
  weights = NULL,
  fit_t0 = TRUE,
  fit_exp3 = TRUE,
  fit_peaktime = FALSE,
  fit_peakval = FALSE,
  peaktime_val = NULL,
  peakval_set = TRUE,
  lower = NULL,
  upper = NULL,
  start = NULL,
  multstart_lower = NULL,
  multstart_upper = NULL,
  multstart_iter = 100,
  taper_weights = TRUE,
  check_startpars = FALSE,
  expdecay_props = c(1/60, 0.1)
)

Arguments

time

The time of each measurement in seconds

activity

The radioactivity of each measurement

Method

Optional. The method of collection, i.e. "Discrete" or "Continuous"

weights

Optional. Weights of each measurement.

fit_t0

Should time point zero be fitted? If not, it is set to 0. Default is TRUE.

fit_exp3

Should the third exponential be fitted, or should a bi-exponential model be used? Default is TRUE for a tri-exponential model.

fit_peaktime

Should the time of the peak be fitted? Default is FALSE. This is potentially useful for data where sampling frequency was low around the peak.

fit_peakval

Should the value of the peak be fitted? Default is FALSE. This is potentially useful for data where sampling frequency was low around the peak.

peaktime_val

Optional. If fit_peaktime is FALSE, then this parameter will define the peaktime. If fit_peaktime is FALSE and this parameter is left as NULL, then the empirical measured peaktime will be used.

peakval_set

Optional. If fit_peakval is FALSE, then this parameter defines the peakval as either the empirical measured peakval (TRUE), or the combination of A+B+c (FALSE).

lower

Optional. The lower limits of the fit. If left as NULL, they will be given reasonable defaults (mostly 50% of the starting parameters).

upper

Optional. The upper limits of the fit. If left as NULL, they will be given reasonable defaults (mostly 150% of the starting parameters).

start

Optional. The starting parameters for the fit. If left as NULL, they will be selected using blmod_exp_startpars.

multstart_lower

Optional. The lower limits of the starting parameters.

multstart_upper

Optional. The upper limits of the starting parameters.

multstart_iter

The number of fits to perform with different starting parameters. If set to 1, then the starting parameters will be used for a single fit.

taper_weights

Should the weights be tapered to gradually trade off between the continuous and discrete samples after the peak?

check_startpars

Optional. Return only the starting parameters. Useful for debugging fits which do not work.

expdecay_props

What proportions of the decay should be used for choosing starting parameters for the exponential decay. Defaults to 1/60 and 1/10, i.e. start to 1/60, 1/60 to 1/10 and 1/10 to end. If fitting only two exponentials, the second value will be used.

Details

This model fits a bi- or tri-exponential model to AIF data. This model can be specified in a fairly large number of ways, depending primarily on the quality of the input data. Reasonably conservative defaults are provided.

The model can fit the time zero point (fit_t0), otherwise the rise starts at time point zero. It can fit two or three exponentials to the curve after the peak (fit_exp0). When it comes to fitting the peak itself, the time of the peak can be fit or set (fit_peaktime). When the peaktime is set, it is either set to the time point of the maximal measured value, or it can be set to another value using peaktime_val. For fitting the peak value, it can be fit as a unique parameter or set using fit_peakval. If it is set, then it can either be set to the largest measured value, or it can be set to the fitted combination of A+B+C, i.e. the initial part of the decay after the peak.

Value

A model fit including all of the individual parameters, fit details, and model fit object of class blood_exp.

Examples

blooddata <- pbr28$blooddata[[1]]
blooddata <- bd_blood_dispcor(blooddata)
aif <- bd_extract(blooddata, output = "AIF")
blood_fit <- blmod_exp(aif$time,
                           aif$aif,
                           Method = aif$Method, multstart_iter = 1)

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