This function uses an Approximate Bayesian Computation (ABC) algorithm to calculate the extent to which a dataframe can be approximated by a known DGP. It implements simulations across plausible values—rate of change, strength of change, directionality, and reliability—and provides a dataframe with an error score per DGP.
Usage
gridSearch(
data,
yname,
tname,
pname,
n_samples = 1000,
ic_min = 0,
ic_max = 2,
pc_min = 0,
pc_max = 1,
bal_min = 0,
bal_max = 1,
rel_min = 0,
rel_max = 1,
fix = "none",
fix_at = 1,
verbose = TRUE
)Arguments
- data
A panel dataframe in the long format.
- yname
The outcome identifier.
- tname
The time identifier.
- pname
The unit identifier.
- n_samples
The number of samples from priors.
- ic_min
Minimum strength of change parameter.
- ic_max
Maximum strength of change parameter.
- pc_min
Minimum rate of change parameter.
- pc_max
Maximum rate of change parameter.
- bal_min
Minimum balance parameter.
- bal_max
Maximum balance parameter.
- rel_min
Minimum reliability parameter.
- rel_max
Maximum reliability parameter.
- fix
Fix any parameter? (values: "ic_sample," "pc_sample," etc.).
- fix_at
At what value to fix it on?
- verbose
Whether to see detailed messages.
