powered by
Define an all zero trace matrix
init_trace(health_states, cycles)
trace matrix -all zero
health states
no of cycles
Initialise the trace matrix with all zeros trace matrix will be with no_cycles+1 by no_states matrix
a <- health_state("Healthy", 1, 1, 0, FALSE) b <- health_state("Dead", 1, 0.5, 0, FALSE) health_states <- combine_state(a, b) init_trace(health_states, 10)
Run the code above in your browser using DataLab