estimateParams {simIDM}R Documentation

Estimate Parameters of the Multistate Model Using Clinical Trial Data

Description

Estimate Parameters of the Multistate Model Using Clinical Trial Data

Usage

estimateParams(data, transition)

Arguments

data

(data.frame)
in the format produced by getOneClinicalTrial().

transition

(TransitionParameters object)
specifying the assumed distribution of transition hazards. Initial parameters for optimization can be specified here. See exponential_transition() or weibull_transition() for details.

Details

This function estimates parameters for transition models using clinical trial data. The transition object can be initialized with starting values for parameter estimation. It uses stats::optim() to optimize the parameters.

Value

Returns a TransitionParameters object with the estimated parameters.

Examples

transition <- exponential_transition(h01 = 2, h02 = 1.4, h12 = 1.6)
simData <- getOneClinicalTrial(
  nPat = c(30), transitionByArm = list(transition),
  dropout = list(rate = 0.3, time = 12),
  accrual = list(param = "time", value = 1)
)
# Initialize transition with desired starting values for optimization:
transition <- exponential_transition(h01 = 1.2, h02 = 1.5, h12 = 1.6)
estimate <- estimateParams(simData, transition)

[Package simIDM version 0.1.0 Index]