A list of tables required for health economic simulation modeling.
Each table must either be a
data.table. All ID variables within
each table must be numeric vectors of integers.
hesim_data(strategies, patients, states = NULL, transitions = NULL)
A table of treatment strategies. Must contain the column
strategy_id denoting a unique strategy. Other columns are variables
describing the characteristics of a treatment strategy.
A table of patients. Must contain the column
a unique patient. The number of rows should be equal to the number of patients
in the model. The table may also include columns for
grp_id for subgroups and
patient_wt specifying the weight to apply to each patient (within a subgroup).
NULL, then it is assumed that there is only one subgroup. If
NULL. then each patient is given the same weight. Weights
cannot be used in individual-level models because each patient should be
weighted equally; that is, weights can only be specified in cohort models.
Weights within subgroups are normalized to sum to one. Other columns are
variables describing the characteristics of a patient.
A table of health states. Must contain the column
state_id, which denotes a unique health state. The number of rows should
be equal to the number of health states in the model. Other columns can describe the
characteristics of a health state.
A table of health state transitions. Must contain the column
transition_id, which denotes a unique transition;
from, which denotes
the starting health state; and
to which denotes the state that will be
Returns an object of class
hesim_data, which is a list of data tables for
health economic simulation modeling.
strategies <- data.frame(
strategy_id = c(1
patients <- data.frame(
patient_id = seq(1
, age = c(65
gender = c("Female"
states <- data.frame(
state_id = seq(1
state_var = c(2
hesim_dat <- hesim_data(
strategies = strategies
patients = patients
states = states)