Low-level constructor. Prefer as_sda_anchor when converting
from an sda_fit. Use this constructor when building an explicit /
manual anchor from pre-specified fields (e.g. from a published attribute
ordering).
Usage
sda_anchor(
anchor_type = "explicit",
source_class = NULL,
source_call = NULL,
group_levels = NULL,
selected_attributes,
candidate_universe = NULL,
stage_table,
branch_candidate_map = NULL,
removal_history = NULL,
weights_used = FALSE,
weight_summary = NULL,
loo_mode = NULL,
mc_iter = NULL,
mc_seed = NULL,
mindenom = NULL,
alpha = NULL,
stop_reason = NA_character_,
reproducibility_notes = character(0),
canon_notes = character(0),
task_hook = .sda_anchor_task_hook()
)Arguments
- anchor_type
Character scalar:
"sda_fit"for anchors derived from a fittedsda_fitobject, or"explicit"for manually-declared anchors.- source_class
Character vector: class of the source object, or
NULL.- source_call
Language object or
NULL: the call used to produce the source object.- group_levels
Integer vector of class/group levels, or
NULL.- selected_attributes
Non-empty character vector of selected attribute names in stage order.
- candidate_universe
Character vector of all attributes evaluated, or
NULL.- stage_table
Data frame with at least columns
stage_idandattribute.- branch_candidate_map
Named list for SORT branch-level candidates, or
NULL(reserved for future SORT).- removal_history
List of per-step removal records, or
NULL.- weights_used
Logical.
FALSEunless weighted SDA is available.- weight_summary
List or
NULL.- loo_mode
Character scalar or
NULL: LOO mode string from SDA settings.- mc_iter
Integer or
NULL: MC iterations from SDA settings.- mc_seed
Integer or
NULL: RNG seed from SDA settings.- mindenom
Integer or
NULL: MINDENOM from SDA settings.- alpha
Numeric or
NULL: significance threshold from SDA settings.- stop_reason
Character scalar or
NA: SDA stop reason.- reproducibility_notes
Character vector.
- canon_notes
Character vector.
- task_hook
List. Machine-readable metadata for future agent/pipeline consumers. Defaults to the standard anchor task hook (see
?sda_anchor).
Details
An sda_anchor is a typed structural object that carries SDA
selection history for future SORT (staged CTA) workflows. It is not a
fitting object and does not estimate propensity scores.
What an SDA anchor is not:
It is not a propensity-score estimator. SDA produces stage order and selected attributes, not a propensity stratification.
It is not an implementation of SORT or GORT. Both remain future reserved workflows.
Explicit / manual anchors are not SDA-derived and must be labeled
anchor_type = "explicit".
Task hook:
The default task_hook marks implementation_status =
"anchor_only_no_sort", lists prohibited_downstream =
c("propensity_weighting", "fraud_demo"), and requires human review.