View source: R/model_selection.R
autoGapProd | R Documentation |
Finds the most suitable model for the NAWRU and the TFP trend according to the BIC or the RMSE. The function computes the output gap based on the chosen models.
autoGapProd(
tsl,
type = "hp",
q = 0.01,
method = "MLE",
criterion = "BIC",
fast = TRUE,
nModels = 5,
nawruPoss = list(maxCycleLag = 2, trend = c("RW2", "DT"), cycle = c("AR1", "AR2"),
errorARmax = 1, errorMAmax = 0, type = c("TKP", "NKP"), exoNames = c("ws", "prod",
"tot"), signalToNoise = NULL),
tfpPoss = list(maxCycleLag = 2, trend = c("RW2", "DT"), cycle = c("AR1", "AR2",
"RAR2"), cubsARmax = 0, errorARmax = 1, errorMAmax = 0, signalToNoise = NULL),
auto = "gap"
)
tsl |
A list of time series objects, see details. |
type |
The variance restriction type. Possible options are |
q |
Quantile for the Inverse Gamma distribution (only used if |
method |
The estimation method. Options are maximum likelihood estimation |
criterion |
Model selection criterion. Options are the Bayesian information criterion
|
fast |
Boolean, indicating whether a "fast" procedure should be used, see details. |
nModels |
Integer, the maximum number of models for each unobserved component model. |
nawruPoss |
List with possible model specifications for the NAWRU, see details. |
tfpPoss |
List with possible model specifications for the NAWRU, see details. |
auto |
If |
For fast = TRUE
, the function pre-selects suitable models by applying the
following procedure: A HP-filtered trend is computed based on which the best trend and
cycle models are chosen according to the BIC. Also based on the HP trend, a variety of
different specifications for the second observation equation are estimated in a
univariate regression and the best models are selected via the BIC. The nModels
best models are subsequently estimated in the usual bivariate unobserved component
model. For fast = FALSE
, a variety of models is estimated in the usual bivariate
unobserved component framework.
The input component nawruPoss
is a list containing a (sub-) set of the
following components:
Maximum cycle lag included in the second observation equation.
Trend model specification.
Cycle model specification.
Maximum autoregressive order of the error term in the second observation equation.
Maximum moving average order of the error term in the second observation equation.
Type of Phillip's curve.
Names of the exogenous variables potentially included in the Phillip's
curve (need to be included in the list of time series tsl
).
Signal-to-noise ratio.
The input component tfpPoss
is a list containing a (sub-) set of the
following components:
Maximum cycle lag included in the second observation equation.
Trend model specification.
Cycle model specification.
Maximum CUBS autoregressive order.
Maximum autoregressive order of the error term in the second observation equation.
Maximum moving average order of the error term in the second observation equation.
Signal-to-noise ratio.
The list of time series tsl
needs to have the following components
(plus those series included in the list component exoNames
in nawruPoss
):
Unemployment rate.
Nominal Unit labor costs, if type = "TKP"
.
Real unit labor costs, if type = "NKP"
.
Total factor productivity.
Capacity utilization economic sentiment indicator.
Labor force non-domestic (unit: 1000 persons).
Participation rate.
Average hours worked (unit: hours).
Gross domestic product at constant prices (unit: bn National currency, code: OVGD).
Net capital stock at constant prices: total economy (unit: bn National currency, code: OKND).
Population: 15 to 64 years (unit: 1000 persons, code: NPAN).
The set of tested models is extensive but not exhaustive. The best model is solely based on convergence and the chosen criterion (RMSE or BIC). A manual check of the results is highly recommended.
In some cases, more than nModels
are checked. For instance, if a
re-parametrized and regular AR(2) process are options for the cycle.
A list containing three components: gap
(the best model of class "gap"
),
tfp
(a nested list of TFP models, fitted objects and model fit criteria), nawru
(a nested list of NAWRU models, fitted objects and model fit criteria). The lists nawru
and tfp
contain a list of models, a list of fitted objects and a dataframe info
,
which contains
loglik |
log-likelihood function at optimum |
AIC |
Akaike information criterion |
BIC |
Bayesian information criterion |
HQC |
Hannan-Quinn information criterion |
RMSE |
Root mean squared error |
R2 |
Coefficient of determination (R squared) |
signal-to-noise |
Signal-to-noise ratio |
LjungBox |
p-value of Ljung-Box test for autocorrelation (H0 = no autocorrelation) |
convergence |
0 indicates convergence of the optimization |
rrange |
relative range of trend series w.r.t original series |
neg |
1 indicates that negative values are present in the trend series |
rev |
relative excess volatility w.r.t. original series (stationary series) |
rsd |
relative standard deviation w.r.t. original series (stationary series) |
cor |
correlation between trend and original series (stationary series) |
msdtg |
mean standardized deviation (stationary trend) |
magtg |
mean absolute growth of trend (stationaty trend) |
drop |
1 indicates the model should be dropped |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.