View source: R/kinfitr_srtm2.R
srtm2 | R Documentation |
Function to fit the SRTM2 model of Wu and Carson (2002) to data. Note that without setting the k2prime, the model is effectively equivalent to a conventional SRTM model. This configuration is allowed for estimating an appropriate k2prime value, but without re-fitting with a specified k2prime value, the model is not really SRTM2.
srtm2(
t_tac,
reftac,
roitac,
k2prime = NULL,
weights = NULL,
frameStartEnd = NULL,
R1.start = 1,
R1.lower = 0,
R1.upper = 10,
k2prime.start = 0.1,
k2prime.lower = 0.001,
k2prime.upper = 1,
bp.start = 1.5,
bp.lower = 0,
bp.upper = 15,
multstart_iter = 1,
multstart_lower = NULL,
multstart_upper = NULL,
printvals = F
)
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. |
k2prime |
Optional. If empty, then the model will fit a value of k2prime. If specified, the model will be fitted with this parameter set (i.e. as a 2 parameter model). |
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. |
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. |
R1.start |
Optional. Starting parameter for fitting of R1. Default is 1. |
R1.lower |
Optional. Lower bound for the fitting of R1. Default is 0. |
R1.upper |
Optional. Upper bound for the fitting of R1. Default is 10. |
k2prime.start |
Optional. Starting parameter for fitting of k2prime. Default is 0.1. |
k2prime.lower |
Optional. Lower bound for the fitting of k2prime. Default is 0.001. |
k2prime.upper |
Optional. Upper bound for the fitting of k2prime. Default is 1. |
bp.start |
Optional. Starting parameter for fitting of bp. Default is 1.5. |
bp.lower |
Optional. Lower bound for the fitting of bp. Default is -10. |
bp.upper |
Optional. Upper bound for the fitting of bp. Default is 15. |
multstart_iter |
Number of iterations for starting parameters. Default
is 1. For more information, see |
multstart_lower |
Optional. Lower bounds for starting parameters. Defaults to the lower bounds. Named list of whichever parameters' starting bounds should be altered. |
multstart_upper |
Optional. Upper bounds for starting parameters. Defaults to the upper bounds. Named list of whichever parameters' starting bounds should be altered. |
printvals |
Optional. This displays the parameter values for each iteration of the model. This is useful for debugging and changing starting values and upper and lower bounds for parameters. |
A list with a data frame of the fitted parameters out$par
,
their percentage standard errors (scaled so that 1 represents 100%)
out$par.se
, the model fit object out$fit
, the model weights
out$weights
, and a dataframe containing the TACs both of the data
and the fitted values out$tacs
.
Granville J Matheson, mathesong@gmail.com
Wu Y, Carson RE. Noise reduction in the simplified reference tissue model for neuroreceptor functional imaging. J Cereb Blood Flow Metab. 2002;22:1440-1452.
data(simref)
t_tac <- simref$tacs[[2]]$Times
reftac <- simref$tacs[[2]]$Reference
roitac <- simref$tacs[[2]]$ROI1
weights <- simref$tacs[[2]]$Weights
fit_setk2prime <- srtm2(t_tac, reftac, roitac, k2prime=0.1)
# Note: this is not really SRTM2 because the k2prime is not specified
fitk2prime <- srtm2(t_tac, reftac, roitac)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.