Stores metadata related to the ID variables used to index input_mats and transformed parameter objects already predicted from covariates.

id_attributes(
  strategy_id,
  n_strategies,
  patient_id,
  n_patients,
  state_id = NULL,
  n_states = NULL,
  transition_id = NULL,
  n_transitions = NULL,
  time_id = NULL,
  time_intervals = NULL,
  n_times = NULL,
  sample = NULL,
  n_samples = NULL,
  grp_id = NULL,
  patient_wt = NULL
)

Arguments

strategy_id

A numeric vector of integers denoting the treatment strategy.

n_strategies

A scalar denoting the number of unique treatment strategies.

patient_id

A numeric vector of integers denoting the patient.

n_patients

A scalar denoting the number of unique patients.

state_id

A numeric vector of integers denoting the health state.

n_states

A scalar denoting the number of unique health states.

transition_id

A numeric vector denoting the health state transition. This is only used for state transition models.

n_transitions

A scalar denoting the number of unique transitions.

time_id

A numeric vector of integers denoting a unique time interval.

time_intervals

A data.table denoting unique time intervals. Must contain the columns time_id, time_start, and time_stop. time_start is the starting time of an interval and time_stop is the stopping time of an interval. Following the survival package, time intervals are closed on the right and open on the left (except in the final interval where time_stop is equal to infinity).

n_times

A scalar denoting the number of time intervals. Equal to the number of rows in time_intervals.

sample

A numeric vector of integer denoting the sample from the posterior distribution of the parameters.

n_samples

A scalar denoting the number of samples.

grp_id

An optional numeric vector of integers denoting the subgroup.

patient_wt

An optional numeric vector denoting the weight to apply to each patient within a subgroup.

Details

When using the ID variables to index input_mats, the sorting order should be the same as specified in expand.hesim_data(); that is, observations must be sorted by prioritizing: (i) strategy_id, (ii) patient_id, (iii) the health-related ID variable (either state_id or transition_id), and (iv) time_id. When using ID variables are used to index transformed parameter objects and sample is used for indexing, then observations must be sorted by prioritizing: (i) sample, (ii) strategy_id, (iii) patient_id, (iv) the health-related ID variable, and (v) time_id.

See also