Fit development-only forest nuisances for policy action scores
Source:R/margot_policy_action_scores.R
margot_policy_development_scores.RdFits outcome, exposure and causal forests on development participants. Uses out-of-bag predictions for development scores and development-trained predictions for evaluation scores. Evaluation outcomes enter only the latter residual corrections. Preparation and supplied weights remain the caller's declared inputs.
Usage
margot_policy_development_scores(
development_X,
development_Y,
development_W,
evaluation_X,
evaluation_Y,
evaluation_W,
development_weights = NULL,
forest_args = list(num.trees = 2000),
seed = 42L,
num_threads = 1L,
save_models = FALSE
)Arguments
- development_X, evaluation_X
Numeric covariate matrices with identical named columns, already prepared on compatible scales.
- development_Y, evaluation_Y
Oriented outcome vectors.
- development_W, evaluation_W
Binary exposure vectors.
- development_weights
Positive development analysis weights, or `NULL` for equal weights. Evaluation weights enter the later policy evaluator.
- forest_args
Named list of causal-forest settings. Settings also accepted by `grf::regression_forest` are used for the nuisance forests. Data, nuisance predictions, seeds and thread counts cannot be overridden.
- seed
Integer seed. The three forests use this seed plus zero, one and two respectively.
- num_threads
Positive integer native thread count, default one.
- save_models
Whether to retain the three fitted forests.
Value
A list of development and evaluation action scores and predictions, requested forest settings, per-forest seeds and a preparation qualification. Optionally includes the development-trained forests.
Details
This supplies a nuisance-estimation boundary, rather than verifying causal identification or removing bias in the supplied preparation or analysis weights. Pointwise policy-score intervals require appropriate nuisance rates and sampling assumptions. Propensities at zero or one cause an error; the function does not select a clipping rule from the results.