compute_fars: Compute Factor Augmented Quantile Regressions

View source: R/compute_fars.R

compute_farsR Documentation

Compute Factor Augmented Quantile Regressions

Description

Performs quantile regressions of a dependent variable on factors estimates.

Usage

compute_fars(dep_variable, factors, h = 1, edge = 0.05)

Arguments

dep_variable

Numeric vector of length T representing the dependent variable (e.g., GDP growth, inflation).

factors

Numeric matrix or data frame of dimension T x r, containing factor estimates.

h

Integer (>= 1). Lag order used in the regression (default = 1)

edge

Numeric value specifying the trimming amount applied to the outermost quantiles. Default is 0.05.

Value

An object of class fars, which is a list containing:

models

List of five S3 quantreg::rq fitted objects named tau_0.xx.

h

The forecast horizon used.

levels

The vector of quantile levels effectively estimated (c(edge, 0.25, 0.50, 0.75, 1 - edge)).

.

periods

Integer. The number of fitted periods

n_factors

Integer. The number of factors included in the regression.

call

The matched function call.

Examples

set.seed(123)
T <- 100; r <- 3
Y <- rnorm(T)
F <- matrix(rnorm(T * r), T, r)      
fars_result <- compute_fars(dep_variable = Y, factors = F, h = 1, edge = 0.05)

FARS documentation built on Feb. 17, 2026, 5:06 p.m.