Create a transition matrix describing patient transitions between health states.
create_trans_mat(object)
object | A |
---|
A transition matrix of the same format as in the mstate package.
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) struct1 <- model_structure(txseqs, n_states = "four") create_trans_mat(struct1)#> S1 P1/S2 P2 D #> S1 NA 1 NA 2 #> P1/S2 NA NA 3 4 #> P2 NA NA NA 5 #> D NA NA NA NA#> S1 P1/S2 D #> S1 NA 1 2 #> P1/S2 NA NA 3 #> D NA NA NAtxseqs <- txseq_list(seq1 = txseq1, seq2 = txseq2, start_line = "second", mutation = "positive") struct3 <- model_structure(txseqs, n_states = "three") create_trans_mat(struct3)#> P1/S2 P2 D #> P1/S2 NA 1 2 #> P2 NA NA 3 #> D NA NA NA