Function generates time series for given models, repeatedly estimates parameters using different methods and compares their accuracy by MSE criterion. Additionally outputs theoretical and empirical characteristics of the innovation distribution (skewness, excess kurtosis, theoretical gain of PMM2).
pmm2_monte_carlo_compare(
model_specs,
methods = c("css", "pmm2"),
n,
n_sim,
innovations = list(type = "gaussian"),
seed = NULL,
include.mean = TRUE,
progress = interactive(),
verbose = FALSE
)List with three components:
MSE and relative MSE for each parameter
Averaged MSE over parameters for each model/method
Comparison of theoretical and empirical PMM2 gain
List of model specifications. Each element must contain:
"ar", "ma" or "arma"
order (for AR/MA) or vector c(p, q) for ARMA
numeric vector of true parameters; for ARMA a list
list(ar = ..., ma = ...)
(optional) model name in report
(optional) description of innovation distribution:
list(type = "gamma", shape = 2),
list(type = "student_t", df = 5), etc. Can also
pass an arbitrary generation function via generator.
Vector of estimation methods (e.g., c("css","pmm2")).
The first method is considered baseline for relative MSE calculation.
Sample size for simulation.
Number of Monte Carlo experiments.
Function or distribution description, used by default for all models (if not specified in spec).
Initial seed for random number generator (optional).
Logical flag: whether to include intercept during estimation.
Logical flag: print Monte Carlo progress.
Whether to print diagnostic messages on failures.