fit.deconvolution: Fit a deconvolution model

Description Usage Arguments Details

View source: R/optimization.R

Description

Fits a deconvolution model with either Exponential or Weibull distributions, and with or without correlation induced by adding a frailty term. If fitting a Weibull model, need 4-element initial/lower/upper parameter vectors. If fitting an exponential model, need 2-element initial/lower/upper parameter vectors. If correlated, one additional parameter is needed in both Weibull and exponential models.

Usage

1
2
3
4
5
6
fit.deconvolution(data, correlated = TRUE,
  parametric_distribution = "Weibull", par.init = c(1, 1, 1.1, 1, 1),
  par.lower = c(0.01, 0.01, 0.01, 0.11, 0.01), par.upper = c(5, 5, 5,
  5, 20), epsilon = 1e-05, itnmax = 100, int.upper = Inf,
  optim.rel.tol = 0.001, control_list = list(subdivisions = 100,
  rel.tol = 0.01), method = c("nlminb"))

Arguments

data

A list of input data with named elements (see ‘Details’).

correlated

If TRUE, then data$y and x = data$z - data$y are correlated through a shared frailty term. If FALSE, then they are independent and the function ignores beta.

parametric_distribution

Which parametric distribution to use: 'Weibull' or 'Exponential'

par.init

A vector of initial parameter values

par.lower

A vector of lower bounds for parameters

par.upper

A vector of upper bounds for parameters

epsilon

The smallest value from which to integrate

itnmax

A number specifying the maximum number of iterations to optimx

int.upper

The largest value from which to integrate

optim.rel.tol

Relative tolerance for optimx optimization

control_list

A named list of options to be passed to distrExIntegrate, called subdivisions and rel.tol.

method

A string specifying the optimization method to use in optimx

Details

The data argument is a named list with four elements that represent the observed input data to be fit for the deconvolution model. Its elements are:

y

Observed survival at times t_y

t_y

Survival times from intermediate time point

z

Observed survival at times t_z

t_z

Survival times from initial time point

y and t_y must be of the same length, as do z and z_y.


mbannick/survDeconvolution documentation built on Sept. 30, 2020, 9:22 a.m.