autoGapProd {RGAP} | R Documentation |
Fit best production function model
Description
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.
Usage
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"
)
Arguments
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 |
Details
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:
- maxCycleLag
Maximum cycle lag included in the second observation equation.
- trend
Trend model specification.
- cycle
Cycle model specification.
- errorARmax
Maximum autoregressive order of the error term in the second observation equation.
- errorMAmax
Maximum moving average order of the error term in the second observation equation.
- type
Type of Phillip's curve.
- exoNames
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
Signal-to-noise ratio.
The input component tfpPoss
is a list containing a (sub-) set of the
following components:
- maxCycleLag
Maximum cycle lag included in the second observation equation.
- trend
Trend model specification.
- cycle
Cycle model specification.
- cubsARmax
Maximum CUBS autoregressive order.
- errorARmax
Maximum autoregressive order of the error term in the second observation equation.
- errorMAmax
Maximum moving average order of the error term in the second observation equation.
- signal-to-noise
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
):
- ur
Unemployment rate.
- nulc
Nominal Unit labor costs, if
type = "TKP"
.- rulc
Real unit labor costs, if
type = "NKP"
.- tfp
Total factor productivity.
- cubs
Capacity utilization economic sentiment indicator.
- lfnd
Labor force non-domestic (unit: 1000 persons).
- parts
Participation rate.
- ahours
Average hours worked (unit: hours).
- gdp
Gross domestic product at constant prices (unit: bn National currency, code: OVGD).
- k
Net capital stock at constant prices: total economy (unit: bn National currency, code: OKND).
- popw
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.
Value
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 |