@@ -36,7 +36,7 @@ decision_model <- function(l_params_all, verbose = FALSE) {
3636 # ### Create transition matrix ####
3737 # Initialize 3-D array
3838 a_P_tunnels <- array (0 , dim = c(n_states_tunnels , n_states_tunnels , n_t ),
39- dimnames = list (v_n_tunnels , v_n_tunnels , 0 : (n_t - 1 )))
39+ dimnames = list (v_names_states_tunnels , v_names_states_tunnels , 0 : (n_t - 1 )))
4040 # ## Fill in array
4141 # # From H
4242 a_P_tunnels [" H" , " H" , ] <- (1 - v_p_HDage ) * (1 - p_HS1 )
@@ -102,7 +102,7 @@ decision_model <- function(l_params_all, verbose = FALSE) {
102102 # # Initialize cohort trace for history-dependent cSTM
103103 m_M_tunnels <- matrix (0 ,
104104 nrow = (n_t + 1 ), ncol = n_states_tunnels ,
105- dimnames = list (0 : n_t , v_n_tunnels ))
105+ dimnames = list (0 : n_t , v_names_states_tunnels ))
106106 # Store the initial state vector in the first row of the cohort trace
107107 m_M_tunnels [1 , ] <- v_s_init_tunnels
108108 # For strategies B and AB
@@ -111,7 +111,7 @@ decision_model <- function(l_params_all, verbose = FALSE) {
111111 # # Initialize transition array
112112 a_A_tunnels <- array (0 ,
113113 dim = c(n_states_tunnels , n_states_tunnels , n_t + 1 ),
114- dimnames = list (v_n_tunnels , v_n_tunnels , 0 : n_t ))
114+ dimnames = list (v_names_states_tunnels , v_names_states_tunnels , 0 : n_t ))
115115 # Set first slice of A with the initial state vector in its diagonal
116116 diag(a_A_tunnels [, , 1 ]) <- v_s_init_tunnels
117117 # For strategies B and AB
@@ -288,11 +288,11 @@ calculate_ce_out <- function(l_params_all, n_wtp = 100000){ # User defined
288288 # Expand the transition matrix of state utilities across cycles to form a transition array of state utilities
289289 a_R_u_str <- array (m_u_str ,
290290 dim = c(n_states_tunnels , n_states_tunnels , n_t + 1 ),
291- dimnames = list (v_n_tunnels , v_n_tunnels , 0 : n_t ))
291+ dimnames = list (v_names_states_tunnels , v_names_states_tunnels , 0 : n_t ))
292292 # Expand the transition matrix of state costs across cycles to form a transition array of state costs
293293 a_R_c_str <- array (m_c_str ,
294294 dim = c(n_states_tunnels , n_states_tunnels , n_t + 1 ),
295- dimnames = list (v_n_tunnels , v_n_tunnels , 0 : n_t ))
295+ dimnames = list (v_names_states_tunnels , v_names_states_tunnels , 0 : n_t ))
296296
297297 # ### Apply transition rewards ####
298298 # Add disutility due to transition from H to S1
0 commit comments