all_geog_optimize_microdata {synthACS} | R Documentation |
Optimize the selection of a micro data population for a set of geographies.
Description
Optimize the candidate micro datasets such that the lowest loss against the
macro dataset constraints are obtained. Loss is defined here as total absolute error (TAE)
and constraints are defined by the constraint_list_list
. Optimization is done by
simulated annealing and geographies are run in parallel.
Usage
all_geog_optimize_microdata(
macro_micro,
prob_name = "p",
constraint_list_list,
p_accept = 0.4,
max_iter = 10000L,
seed = sample.int(10000L, size = 1, replace = FALSE),
leave_cores = 1L,
verbose = TRUE
)
Arguments
macro_micro |
The geographical dataset of macro and micro data. Should be of class
|
prob_name |
It is assumed that observations are weighted and do not have an equal probability of occurance. This string specifies the variable within each dataset that contains the probability of selection. |
constraint_list_list |
A list of constraint lists. See |
p_accept |
The acceptance probability for the Metropolis acceptance criteria. |
max_iter |
The maximum number of allowable iterations. Defaults to |
seed |
A seed for reproducibility. See |
leave_cores |
An |
verbose |
Logical. Do you wish to see verbose output? Defaults to |
See Also
Examples
## Not run:
# assumes that micro_synthetic and cll already exist in your environment
# see: examples for derive_synth_datasets() and all_geogs_add_constraint()
optimized_la <- all_geog_optimize_microdata(micro_synthetic, prob_name= "p",
constraint_list_list= cll, p_accept= 0.01, max_iter= 1000L)
## End(Not run)