
Ratify Attribute Assignment Results
Source:R/methods-ReplicaAdder.R, R/methods-from-ready4.R
ratify.RdEvaluates the quality of attribute assignment performed by a
ReplicaAdder and stores validation diagnostics within
the module.
Details
The ratify() method compares the observed
distributions in the synthetic population with the expected
distributions supplied via the reference contingency table.
Validation results are stored in the
validation_results slot and include:
goodness-of-fit statistics;
p-values;
warning flags; and
detailed comparisons of observed and expected distributions.
These diagnostics can subsequently be explored using the
validation and visualisation tools bundled with
replica.
ReplicaAdder Method
Evaluates the quality of attribute assignment and stores validation diagnostics within the module.
The observed distributions in the synthetic population are compared with the expected distributions supplied by the contingency table.
Validation results are stored in:
x@validation_resultsand include:
z-squared statistics;
p-values;
warning flags; and
detailed comparisons of observed and expected distributions.
ReplicaAdder
For a ReplicaAdder, ratify():
checks the assigned synthetic population;
compares observed and expected distributions;
calculates validation statistics;
stores validation results; and
returns the updated module.
Validation results are stored in:
x@validation_resultsand may be inspected using:
names(x@validation_results)Examples
if (FALSE) { # \dontrun{
adder <- enhance(
adder
)
adder <- ratify(
adder
)
adder@validation_results
} # }
if (FALSE) { # \dontrun{
adder <- ReplicaAdder(
synth_pop = population,
contingency = contingency,
target_attribute = "education",
group_by = c(
"age_group",
"gender"
)
)
adder <- enhance(adder)
adder <- ratify(adder)
adder@validation_results
} # }