Simulation_GIRF: GIRF Simulations

Description Usage Arguments Value Author(s) References Examples

Description

This function calls the BlockBootstrap function of the EWS package and then calculates response functions for each simulation. It then measures the confidence intervals as in Lajaunie (2021). The response functions are based on the 4 specifications proposed by Kauppi & Saikkonen (2008).

Usage

1
Simul_GIRF(Dicho_Y, Exp_X, Int, Lag, t_mod, n_simul, centile_shock, horizon, OC)

Arguments

Dicho_Y

Vector of the binary time series.

Exp_X

Vector or Matrix of explanatory time series.

Int

Boolean value: TRUE for an estimation with intercept, and FALSE otherwise.

Lag

Number of lags used for the estimation.

t_mod

Model number: 1, 2, 3 or 4.

-> 1 for the static model:

P_{t-1}(Y_{t}) = F(π_{t})=F(α + β'X_{t})

-> 2 for the dynamic model with lag binary variable:

P_{t-1}(Y_{t}) = F(π_{t})=F(α + β'X_{t} + γ Y_{t-l})

-> 3 for the dynamic model with lag index variable:

P_{t-1}(Y_{t}) = F(π_{t})=F(α + β'X_{t} + η π_{t-l})

-> 4 for the dynamic model with both lag binary variable and lag index variable:

P_{t-1}(Y_{t}) = F(π_{t})=F(α + β'X_{t} + η π_{t-l} + γ Y_{t-l})

n_simul

Numeric variable equal to the total number of replications.

centile_shock

Numeric variable corresponding to the centile of the shock following Koop, Pesaran and Potter (1996).

horizon

Numeric variable corresponding to the horizon target for the GIRF analysis.

OC

Either a numeric variable equal to the optimal cut-off (threshold) or a character variable of the method chosen to calculate the optimal cut-off ("NSR", "CSA", "AM").

Value

A matrix containing the GIRF analysis for each replication. For each replication, the function returns 7 colomns with:

column 1

horizon

column 2

index

column 3

index with shock

column 4

probability associated to the index

column 5

probability associated to the index with shock

column 6

binary variable associated to the index

column 7

binary variable associated to the index with shock

The matrix contains 7 \times S colomns, where S denotes the number of replications.

Author(s)

Jean-Baptiste Hasse and Quentin Lajaunie

References

Kauppi, Heikki, and Pentti Saikkonen. "Predicting US recessions with dynamic binary response models." The Review of Economics and Statistics 90.4 (2008): 777-791.

Koop, Gary, M. Hashem Pesaran, and Simon M. Potter. "Impulse response analysis in nonlinear multivariate models." Journal of econometrics 74.1 (1996): 119-147.

Lajaunie, Quentin. Generalized Impulse Response Function for Dichotomous Models. No. 2852. Orleans Economics Laboratory/Laboratoire d'Economie d'Orleans (LEO), University of Orleans, 2021.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
# NOT RUN {

# Import data
data("data_USA")

# Data process
Var_Y <- as.vector(data_USA$NBER)
Var_X <- as.vector(data_USA$Spread)

# Simulations
results <- Simul_GIRF(Dicho_Y = Var_Y, Exp_X = Var_X, Int = TRUE, Lag = 1, t_mod = 1 ,
                      n_simul = 2 , centile_shock = 0.95, horizon = 3, OC = "AM")

# print results
results

#}

EWS documentation built on Feb. 24, 2021, 5:09 p.m.

Related to Simulation_GIRF in EWS...