Skip to contents

A convenience wrapper around fiscal_health_fit(), fiscal_health_score(), fiscal_weights(), and fiscal_health_index(). It deliberately does not automate diagnostics, triage, or dimension discovery because those stages require review and substantive judgment.

Usage

fiscal_health(
  data,
  dimensions = NULL,
  fit = NULL,
  weights = NULL,
  index = TRUE,
  fit_args = list(),
  score_args = list(),
  weight_args = list(),
  index_args = list()
)

Arguments

data

A reference or scoring data frame.

dimensions

A reviewed fiscal_dimensions object or named list of indicator groups. Required when fit is not supplied.

fit

An existing fiscal_health_fit object for scoring new data.

weights

A fiscal_weights object, a named numeric vector of custom weights, or NULL for equal weights.

index

Construct the composite fiscal-health index.

fit_args

Named list of additional arguments for fiscal_health_fit(). Used only when fitting a new model.

score_args

Named list of additional arguments for fiscal_health_score().

weight_args

Named list of additional arguments for fiscal_weights() when weights is not already a fiscal_weights object.

index_args

Named list of additional arguments for fiscal_health_index().

Value

An object of class fiscal_health_result with data, fit, weights, and audit components.