Description Usage Arguments Value
Using estimate_abm
one can use their data and their abm function
they are using for cv_abm
to estimate an ABM via optimization of
its global abm parameters or their specification. Then this can be used for
analysis.
1 2 3 4 5 6 | estimate_abm(data, features, Formula, agg_patterns, abm_simulate, abm_vars,
iters, tseries_len, verbose = TRUE, tp = rep(tseries_len,
nrow(agg_patterns)), package = c("caretglm", "caretglmnet", "glm",
"caretnnet", "caretdnn"), sampling = FALSE, sampling_size = 1000,
STAT = c("mean", "median"), abm_optim = c("GA", "DE"),
optimize_abm_par = FALSE, parallel_training = FALSE)
|
data |
|
features |
|
Formula |
|
agg_patterns |
data.frame with rows (observational unit) being the group
and columns: (a.) those aggregate level variables needed for the prediction
with the specified |
abm_simulate |
function with these arguments: |
abm_vars |
a list with either (1.) a numeric vector named "lower" AND a
numeric vector named "upper" each the length of the number of tuning_params
of ABM (the names of the elements of these vecs should be the names of the
variables and they should be in the same order that the |
iters |
numeric vector length one specifying number of iterations to simulate ABM for. |
tseries_len |
numeric vector length one specifying maximum number of time
periods to use for model training and testing. If some groups have less than
the maximum then you need to provide a vector to the |
verbose |
optional logical vector length one, default is |
tp |
optional numeric vector length number of rows of |
package |
optional character vector length one, default is
|
sampling |
optional logical vector length one, default is |
sampling_size |
optional numeric vector length one specifying how many
observations from each group that |
STAT |
optional character vector length one, default is |
abm_optim |
optional character vector length one, default is
|
optimize_abm_par |
optional logical vector length one, default is
|
parallel_training |
optional logical vector length one, default is
|
Returns a function that has three arguments: parameters, out,
iterations
. If out=="action_avg"
for the returned function, the
average of all the actions is returned by this function; otherwise, the
vector of the average for each time is returned by this function. This
returns a wrapper function around their abm simulation function to be used
for analysis.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.