Interpret Policy Tree Stability Results
Source:R/margot_policy_tree_stability.R
margot_interpret_stability.Rd
Provides a narrative interpretation of policy tree stability results suitable for inclusion in scientific manuscripts. The interpretation acknowledges the inherent instability of decision trees while focusing on robust patterns that emerge across iterations.
Usage
margot_interpret_stability(
object,
model_name,
depth = 2,
stability_threshold = 0.7,
format = c("text", "technical"),
decimal_places = 1,
include_theory = TRUE,
label_mapping = NULL
)
Arguments
- object
Object of class "margot_stability_policy_tree"
- model_name
Model name to interpret
- depth
Tree depth to interpret (1, 2, or "both")
- stability_threshold
Minimum frequency to consider a split "stable" (default 0.7)
- format
Output format: "text" for narrative prose or "technical" for detailed statistics
- decimal_places
Number of decimal places for statistics (default 1)
- include_theory
Logical: Include theoretical context about tree instability (default TRUE)
- label_mapping
Optional named list mapping variable names to labels. If NULL, uses automatic transformation via transform_var_name()