Learn R Programming

FARS - Factor-Augmented Regression Scenarios

The FARS package provides a comprehensive framework in R for modeling and forecasting economic scenarios based on the multi-level dynamic factor model (MLDFM). The package enables users to:

  • (i) Extract global and group-specific factors using a flexible multi-level factor structure.
  • (ii) Compute asymptotically valid confidence regions for the estimated factors, accounting for uncertainty in the factor loading.
  • (iii) Obtain estimates of the parameters of the factor-augmented quantile regressions together with their standard deviations.
  • (iv) Recover full predictive conditional densities from estimated quantiles.
  • (v) Obtain risk measures based on extreme quantiles of the conditional densities.
  • (vi) estimate the conditional density and the corresponding extreme quantiles when the factors are stressed.

Installation and Usage

For detailed usage and examples please refer to the FARS Vignette. The Vignette llustrates the functionalities of the FARS package by extracting factors, estimating conditional densities, and constructing stressed scenarios in two applications:

  • (i) Aggregate inflation in Europe
  • (ii) Building growth density scenarios for the United States (replicating González-Rivera, G., Rodríguez-Caballero, C. V., & Ruiz, E., 2024. Expecting the unexpected: Stressed scenarios for economic growth. Journal of Applied Econometrics, 39(5), 926–942. https://doi.org/10.1002/jae.3060)

Copy Link

Version

Install

install.packages('FARS')

Monthly Downloads

254

Version

0.7.1

License

GPL (>= 2)

Maintainer

Gian Pietro Bellocca

Last Published

November 5th, 2025

Functions in FARS (0.7.1)

factors

Generic Function to Extract Estimated Factors
compute_stressed_factors

Compute Stressed Factors
create_scenario

Create Stressed Scenarios
get_ellipsoids

Generic Function to Extract Ellipsoids
get_mldfm_list.mldfm_subsample

Extract List of MLDFMs from a mldfm_subsample Object
get_distribution

Generic Function to Extract Distribution
compute_optimal_delta

Compute Optimal Delta for FPR Gamma Computation
factors.mldfm

Extract Estimated Factors from a mldfm Object
fitted.mldfm

Extract Fitted Values from a mldfm Object
correct_outliers

Correct Dataset Outliers
fitted.fars

Fitted Values for fars Object
get_quantile_levels

Generic Function to Extract Quantile Levels
loadings

Generic Function to Extract Factor Loadings
get_mldfm_model.mldfm_subsample

Extract a Specific mldfm Object from a mldfm_subsample Object
get_mldfm_model

Generic Function to Extract a Specific mldfm Object
get_level_factors

Extract Factors at a Given Hierarchical Level
get_distribution.fars_density

Extract Distribution from a fars_density Object
get_mldfm_list

Generic Function to Extract List of MLDFMs
dep_variable

US GDP Growth Series
compute_subsample

Compute Subsample of Data by Block
get_rq_model.fars

Extract a Specific rq Object from a fars Object
get_ellipsoids.fars_scenario

Get Ellipsoids from a fars_scenario Object.
get_sigma_list

Generic Function to Get Sigma List
plot.fars

Plot Method for fars Object
logLik.fars

Log-Likelihoods for fars Object
orthogonalize_factors

Orthogonalize Factors
l_density

Compute Skew-t Densities from Quantiles (Linear Optimization)
inflation_data

European Countries Inflation Series
mf_data

Macro-Financial Database
loadings.mldfm

Extract Factor Loadings from a mldfm Object
plot.fars_density

Plot Method for fars_density Object
plot.fars_scenario

Plot Method for fars_scenario Object
print.fars_scenario

Print Method for fars_scenario Object
print.mldfm_subsample

Print Method for mldfm_subsample Object
mldfm

Multi-Level Dynamic Factor Model (MLDFM)
quantile_risk

Extract Conditional Quantile from fars_density Object
print.fars

Print Method for fars Object
get_rq_model

Generic Function to Extract a Specific rq Object
plot.mldfm

Plot Method for MLDFM object
get_quantile_levels.fars

Extract Quantile Levels from a fars Object
plot.mldfm_subsample

Plot Method for mldfm_subsample Object
mldfm_subsampling

Subsampling Procedure for MLDFM Estimation
plot_residuals.mldfm

Plot Residuals from mldfm Object
update_factor_list

Update Factor List
plot_loadings.mldfm

Plot Loadings from mldfm Object
multiple_blocks

Multi-level Dynamic Factor Model - Multiple Blocks (MLDFM)
plot_factors.mldfm

Plot Factors from mldfm Object
residuals.mldfm

Extract Residuals from a mldfm Object
print.fars_density

Print Method for fars_density Object
residuals.fars

Residuals for fars Object
print.mldfm

Print Method for mldfm Object
summary.fars

Summary Method for fars Object
predict.fars

Predict Method for fars Object
nl_density

Compute Skew-t Densities from Quantiles (Non-Linear Optimization)
single_block

Multi-Level Dynamic Factor Model - Single Block (DFM)
summary.mldfm

Summary Method for mldfm Object
summary.mldfm_subsample

Summary Method for mldfm_subsample Object
summary.fars_density

Summary Method for fars_density Object
summary.fars_scenario

Summary Method for fars_scenario Object
canonical_correlation_analysis

Canonical Correlation Analysis for MLDFM
compute_fars

Compute Factor Augmented Quantile Regressions
coef.fars

Coefficients for fars Object
compute_density

Compute Skew-t Densities from Quantiles
compute_initial_factors

Compute Initial Factors for Multi-Level Dynamic Factor Model
beta_ols

Efficient OLS Estimation
build_factor_structure

Build Factor Structure for Multi-level Dynamic Factor Model
compute_loadings

Compute Loadings
apply_identifications

Apply Identification Constraints to Factors and Loadings
compute_fpr_gamma

Compute Adaptive Threshold Cross-Sectional Robust Gamma (FPR Gamma)