create_transmod: Create transition model

Description Usage Arguments Value Examples

View source: R/transmod.R

Description

Create a model for simulating health state transitions with a continuous time state transition model (CTSTM).

Usage

1

Arguments

params

A "params_surv" object returned from create_transmod_params.

data

A data table of class "expanded_hesim_data" returned from create_transmod_data.

Value

An object of class "IndivCtstmTrans" from the hesim package.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# Treatment sequences
txseq1 <- txseq(first = "erlotinib",
                second = c("osimertinib", "PBDC"),
                second_plus = c("PBDC + bevacizumab", "PBDC + bevacizumab"))
txseq2 <- txseq(first = "gefitinib",
                second = c("osimertinib", "PBDC"),
                second_plus = c("PBDC + bevacizumab", "PBDC + bevacizumab"))
txseqs <- txseq_list(seq1 = txseq1, seq2 = txseq2)

# Patient population
pats <- create_patients(n = 2)

# Model structure
struct <- model_structure(txseqs, dist = "weibull")
tmat <- create_trans_mat(struct)

# Data for state transition model
transmod_data <- create_transmod_data(struct, tmat, pats)
head(transmod_data)

# Parameters for state transition model
transmod_params <- create_transmod_params(n = 2, transmod_data)
print(transmod_params)

# State transition model
transmod <- create_transmod(transmod_params, transmod_data)

InnovationValueInitiative/IVI-NSCLC documentation built on July 25, 2019, 8:03 p.m.