calculate_TAE {synthACS} | R Documentation |
Calculate the total absolute error (TAE) between sample data and constraints.
Description
Calculates the total absolute error (TAE) between sample micro data and constraining
totals from the matching macro data. Allows for updating of prior TAE instead of re-calculating
to improve speed in iterating. The updating feature is particularly helpful for optimizing
micro data fitting via simulated annealing (see optimize_microdata
).
Usage
calculate_TAE(
sample_data,
constraint_list,
prior_sample_totals = NULL,
dropped_obs_totals = NULL,
new_obs = NULL
)
Arguments
sample_data |
A |
constraint_list |
A |
prior_sample_totals |
An optional |
dropped_obs_totals |
An optional |
new_obs |
An optional |
Examples
## Not run:
## assumes that you have a micro_synthetic dataset named test_micro and attribute count
## named g respectively
c_list <- add_constraint(attr_name= "gender", attr_totals= g, micro_data= test_micro,
constraint_list= c_list)
calculate_TAE(test_micro, c_list)
## End(Not run)