Learn R Programming

EstemPMM (version 0.1.1)

pmm2_monte_carlo_compare: Monte Carlo comparison of PMM2 estimation methods

Description

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).

Usage

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
)

Value

List with three components:

parameter_results

MSE and relative MSE for each parameter

summary

Averaged MSE over parameters for each model/method

gain

Comparison of theoretical and empirical PMM2 gain

Arguments

model_specs

List of model specifications. Each element must contain:

model

"ar", "ma" or "arma"

order

order (for AR/MA) or vector c(p, q) for ARMA

theta

numeric vector of true parameters; for ARMA a list list(ar = ..., ma = ...)

label

(optional) model name in report

innovations

(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.

methods

Vector of estimation methods (e.g., c("css","pmm2")). The first method is considered baseline for relative MSE calculation.

n

Sample size for simulation.

n_sim

Number of Monte Carlo experiments.

innovations

Function or distribution description, used by default for all models (if not specified in spec).

seed

Initial seed for random number generator (optional).

include.mean

Logical flag: whether to include intercept during estimation.

progress

Logical flag: print Monte Carlo progress.

verbose

Whether to print diagnostic messages on failures.