Learn R Programming

matrisk (version 0.1.0)

f_compile_quantile: Estimation of quantiles

Description

Predicted values based on each quantile regression (Koenker and Basset, 1978), at time=t_trgt, for each quantile in qt_trgt.

Usage

f_compile_quantile(qt_trgt, v_dep, v_expl, t_trgt)

Value

Numeric matrix with the predicted values based on each quantile regression, at time fixed in input

Arguments

qt_trgt

Numeric vector, dim k, of k quantiles for different qt-estimations

v_dep

Numeric vector of the dependent variable

v_expl

Numeric vector of the (k) explanatory variable(s)

t_trgt

Numeric time target (optional)

References

Koenker, Roger, and Gilbert Bassett Jr. "Regression quantiles." Econometrica: journal of the Econometric Society (1978): 33-50.

Examples

Run this code
# Import data
data("data_euro")

#' # Data process
PIB_euro_forward_4 = data_euro["GDP"][c(5:length(data_euro["GDP"][,1])),]
FCI_euro_lag_4 = data_euro["FCI"][c(1:(length(data_euro["GDP"][,1]) - 4)),]
CISS_euro_lag_4 = data_euro["CISS"][c(1:(length(data_euro["GDP"][,1]) - 4)),]

quantile_target <- as.vector(c(0.10,0.25,0.75,0.90))
results_quantile_reg <- f_compile_quantile(qt_trgt=quantile_target,
v_dep=PIB_euro_forward_4,
v_expl=cbind(FCI_euro_lag_4, CISS_euro_lag_4),
t_trgt = 30)

Run the code above in your browser using DataLab