This function calculates the diagnostics requested by the Diagnostics_cfg object.

calculate_diagnostics(data, treatment, outcome, .diag.cfg)

Arguments

data

Data frame with all additional columns (such as model predictions) included.

treatment

Unquoted treatment variable name

outcome

Unquoted outcome variable name

.diag.cfg

Diagnostics_cfg object

Value

Returns a tibble with columns:

  • estimand - Character indicating the diagnostic that was calculated

  • level - Indicates the scope of this diagnostic (e.g. does it apply only to the model of the outcome under treatment).

  • term - Indicates a more granular descriptor of what the value is for, such as the specific model within the SuperLearner ensemble.

  • estimate - Point estimate of the diagnostic.

  • std_error - Standard error of the diagnostic.

See also