View source: R/wrapperfunctions.R
| mtar_grid | R Documentation |
This function is a wrapper that applies mtar() over a grid of model specifications
defined by all combinations of the noise distribution (dist), the number of regimes
(from nregim.min to nregim.max), the autoregressive order within each regime
(from p.min to p.max), the maximum lag of the exogenous series within each regime
(from q.min to q.max), and the maximum lag of the threshold series within each
regime (from d.min to d.max).
In all calls to mtar(), the same set of time points is used for model fitting. This is
achieved by appropriately adjusting the subset argument of mtar() for each model
specification, thereby ensuring comparability across models.
mtar_grid(
formula,
data,
subset,
Intercept = TRUE,
trend = c("none", "linear", "quadratic"),
nseason = NULL,
nregim.min = 1,
nregim.max = NULL,
p.min = 1,
p.max = NULL,
q.min = 0,
q.max = 0,
d.min = 0,
d.max = 0,
row.names,
dist = "Gaussian",
prior = list(),
n.sim = 500,
n.burnin = 100,
n.thin = 1,
ssvs = FALSE,
setar = NULL,
plan_strategy = c("sequential", "multisession"),
progress = TRUE
)
formula |
A three-part expression of class |
data |
A data frame containing the variables in the model. If not found in |
subset |
An optional vector specifying a subset of observations to be used in the fitting process. |
Intercept |
An optional logical indicating whether an intercept should be included within each regime. |
trend |
An optional character string specifying the degree of deterministic time trend to be
included in each regime. Available options are |
nseason |
An optional integer, greater than or equal to 2, specifying the number of seasonal periods.
When provided, |
nregim.min |
An optional integer specifying the minimum number of regimes. By default,
|
nregim.max |
An integer specifying the maximum number of regimes. |
p.min |
An optional integer specifying the minimum autoregressive order within each regime.
By default, |
p.max |
An integer specifying the maximum autoregressive order within each regime. |
q.min |
An optional integer specifying the minimum value of the maximum lag of the exogenous
series within each regime. By default, |
q.max |
An optional integer specifying the maximum value of the maximum lag of the exogenous
series within each regime. By default, |
d.min |
An optional integer specifying the minimum value of the maximum lag of the threshold
series within each regime. By default, |
d.max |
An optional integer specifying the maximum value of the maximum lag of the threshold
series within each regime. By default, |
row.names |
An optional variable in |
dist |
A character vector specifying the multivariate distributions used to model the noise
process. Available options are |
prior |
An optional list specifying the hyperparameter values that define the prior
distribution. This list can be validated using the |
n.sim |
An optional positive integer specifying the number of simulation iterations after the
burn-in period. By default, |
n.burnin |
An optional positive integer specifying the number of burn-in iterations. By default,
|
n.thin |
An optional positive integer specifying the thinning interval. By default,
|
ssvs |
An optional logical indicating whether the Stochastic Search Variable Selection (SSVS)
procedure should be applied to identify relevant lags of the output, exogenous, and threshold
series. By default, |
setar |
An optional positive integer indicating the component of the output series used as the
threshold variable. By default, |
plan_strategy |
An optional character string specifying the execution strategy for parallel
computation. Available options are |
progress |
An optional logical indicating whether a progress bar should be displayed during
execution. By default, |
A list whose elements are objects of class mtar, each corresponding to a distinct
model specification considered in the grid.
mtar
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.