Description Usage Arguments Examples
View source: R/sim_annealing.R
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
).
1 2 3 4 5 6 7 | calculate_TAE(
sample_data,
constraint_list,
prior_sample_totals = NULL,
dropped_obs_totals = NULL,
new_obs = NULL
)
|
sample_data |
A |
constraint_list |
A |
prior_sample_totals |
An optional |
dropped_obs_totals |
An optional |
new_obs |
An optional |
1 2 3 4 5 6 7 8 | ## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.