Learn R Programming

packDAMipd (version 0.2.0)

check_values_states: Check if the values of health states are provided

Description

Check if the values of health states are provided

Usage

check_values_states(health_states)

Arguments

health_states

list of health_state objects

Value

true or false

Details

This is to check if the values are numeric during the run time, else to throw an error

Examples

Run this code
# NOT RUN {
well <- health_state("well", cost = 0, utility = 1)
disabled <- health_state("disabled", cost = 100, utility = 1)
dead <- health_state("dead", cost = 0, utility = 0)
tmat <- rbind(c(1, 2, 3), c(NA, 4, 5), c(NA, NA, 6))
colnames(tmat) <- rownames(tmat) <- c("well", "disabled", "dead")
tm <- populate_transition_matrix(3, tmat, c(0.6, 0.2, 0.2, 0.6, 0.4, 1))
health_states <- combine_state(well, disabled, dead)
check_values_states(health_states)
# }

Run the code above in your browser using DataLab