FARS Package: Factor Augmented Regression in R
- FARS Package is a tool that integrates latent factor extraction, quantile-based forecasting, and stress testing for macro-financial scenario design.
- It employs multi-level dynamic factor models and factor-augmented quantile regressions to convert high-dimensional predictors into full conditional densities.
- The methodology features uncertainty quantification via asymptotic confidence regions and stress testing by exploring extreme factor realizations.
FARS is an R package for factor-augmented regression scenarios that integrates latent-factor extraction, quantile-based forecasting, density recovery, and factor stressing into a single workflow for scenario design in macroeconomic and financial applications. In the formulation of "FARS: Factor Augmented Regression Scenarios in R" (Bellocca et al., 14 Jul 2025), the package is intended to model and design scenarios for the distribution of key economic variables by combining multi-level dynamic factor models (ML-DFMs) with factor-augmented quantile regressions (FA-QRs), and then converting quantile forecasts into full conditional densities. Its canonical use cases include baseline Growth-at-Risk (GaR) estimation and stressed Growth-in-Stress (GiS) analysis.
1. Statistical scope and design objective
FARS addresses a familiar problem in empirical macro-finance: a target variable of interest must be forecast conditionally on a large predictor panel whose dependence structure is too rich to handle through low-dimensional regression alone. The package resolves this by first extracting latent common components from a high-dimensional panel and then using those factors as covariates in quantile regressions for the target series (Bellocca et al., 14 Jul 2025).
The package workflow is explicitly sequential. It:
- estimates latent factors from a large predictor panel using a dynamic factor model, possibly with a multi-level block structure;
- quantifies factor uncertainty through asymptotic confidence regions corrected for loading uncertainty;
- fits factor-augmented quantile regressions for the target variable;
- recovers a full conditional density from the estimated conditional quantiles by fitting a skew- distribution; and
- optionally stresses the factors by searching along the boundary of a confidence ellipsoid for values that minimize or maximize a target quantile.
This design makes FARS a scenario-construction package rather than only a factor-modeling package or only a quantile-regression package. Its distinctive feature is the explicit linkage between factor extraction, uncertainty quantification, tail-oriented prediction, and stress testing. In the paper’s terminology, the package is designed to produce scenarios for “the distribution of key economic variables” under both ordinary and adverse factor realizations (Bellocca et al., 14 Jul 2025).
2. Multi-level dynamic factor models
The factor-extraction layer of FARS is built around dynamic factor models, beginning with the standard representation
where is the observed predictor vector, is the vector of latent common factors, is the loading matrix, and contains idiosyncratic components (Bellocca et al., 14 Jul 2025).
The package emphasizes multi-level dynamic factor models because many macro-financial datasets are naturally partitioned into blocks. In the non-overlapping case, FARS distinguishes pervasive/global factors from block-specific factors , writing
The associated loading matrix is block-structured with zero restrictions, so only the relevant factors affect each block.
For overlapping blocks, the package supports a richer hierarchy with global factors, pairwise semipervasive factors, and block-specific factors. For three blocks, the paper gives
This architecture allows the package to represent shocks that are fully common, partially shared, or strictly local.
Estimation is performed through the sequential least squares estimator of Breitung and Eickmeier. The paper describes the residual sum of squares objective as
0
and states that the algorithm iteratively initializes factors using CCA or PCA, filters out higher-level factors, extracts lower-level factors sequentially, updates loadings by least squares, and repeats until convergence. FARS also applies a Gram–Schmidt-style orthogonalization of factor layers so that global, semipervasive, and block-specific factors are ordered and separated (Bellocca et al., 14 Jul 2025).
3. Factor uncertainty and confidence regions
A central methodological feature of FARS is that it does not treat estimated factors as error-free. Instead, it computes asymptotically valid confidence regions for factors and corrects them for loading uncertainty (Bellocca et al., 14 Jul 2025).
For the standard dynamic factor model, the asymptotic distribution of the principal-components factor estimator is given as
1
where
2
The corresponding finite-sample covariance approximation is
3
The package implements two estimators for 4. Under cross-sectionally uncorrelated idiosyncratic components, it uses the Bai–Ng estimator
5
with residuals 6. To allow weak cross-sectional dependence, it also implements the Fresoli–Poncela–Ruiz estimator with adaptive thresholding,
7
The package then adds a subsampling correction for loading uncertainty, following Maldonado and Ruiz:
8
Using this corrected covariance, FARS constructs confidence ellipsoids of the form
9
These ellipsoids are not merely inferential summaries. They are the geometric objects that define the admissible stress set used later in scenario generation. For one factor they reduce to intervals; for two factors the package uses ellipse; for higher dimensions it uses SyScSelection mesh-based hyperellipsoids (Bellocca et al., 14 Jul 2025).
4. Factor-augmented quantile regressions and density recovery
After factor extraction, FARS estimates factor-augmented quantile regressions for the target variable 0. The paper writes the 1-step-ahead conditional quantile as
2
In practice, the unknown factors are replaced with their estimates. Estimation uses standard quantile regression, specifically the Koenker–D’Orey algorithm through the R package quantreg. By default, the package estimates quantiles at
3
with an edge argument allowing other extremes such as 4 and 5 (Bellocca et al., 14 Jul 2025).
Quantile forecasts alone do not provide a full predictive density. FARS therefore fits a skew-6 distribution to the estimated quantiles. The density is written as
7
where 8 is location, 9 is scale, 0 is shape, and 1 governs tail thickness.
The fitted parameters are obtained by minimizing squared discrepancy between estimated conditional quantiles and skew-2-implied quantiles:
3
This step converts a finite set of regression quantiles into a smooth conditional distribution from which risk measures can be extracted. The package’s quantile_risk() function is then used to obtain quantities such as the 1% GaR from the fitted density (Bellocca et al., 14 Jul 2025).
5. Stress scenarios, workflow, and software interface
The stressed-scenario functionality is the package’s most distinctive operational feature. Given a confidence ellipsoid 4, FARS searches its boundary for factor values that minimize or maximize a selected conditional quantile. For a lower-tail stress, the paper states the problem as
5
The resulting stressed factors 6 are substituted back into the FA-QR, producing stressed quantiles, and the same skew-7 smoothing step is applied to recover a stressed conditional density (Bellocca et al., 14 Jul 2025).
The package exposes this pipeline through a small number of functions.
| Function | Role |
|---|---|
mldfm() |
Estimate ML-DFMs |
mldfm_subsampling() |
Generate subsample-based factor estimates |
create_scenario() |
Construct factor confidence ellipsoids |
compute_fars() |
Estimate FA-QRs; optionally stressed quantiles |
compute_density() |
Fit skew-8 conditional densities |
quantile_risk() |
Extract risk quantiles from fitted densities |
The principal interfaces are structured around S3 objects. mldfm() returns an object of class mldfm containing Factors, Lambda, Residuals, Method, Iterations, and Factors_list. compute_fars() returns an object of class fars containing Quantiles, Coeff, StdError, Pvalue, and Levels, and in stressed mode also Stressed_Factors and Stressed_Quantiles. compute_density() returns a fars_density object with density, distribution, optimization, and x_vals.
The package also specifies several key arguments. For mldfm(), these include data, global, blocks, block_ind, local, middle_layer, method, tol, and max_iter. For compute_density(), the main inputs are quantiles, optionally levels, est_points, random_samples, support, and nl, where nl = TRUE invokes nonlinear optimization through nloptr rather than the default optim() route. This organization reflects the package’s intended use as a reproducible end-to-end scenario pipeline rather than an ad hoc collection of unrelated routines (Bellocca et al., 14 Jul 2025).
6. Empirical use, economic interpretation, and nomenclature
The paper’s worked application uses U.S. GDP growth with a quarterly dataset from 2005Q3 to 2020Q1 containing 63 global macro variables, 248 domestic macro variables, and 208 global financial variables (Bellocca et al., 14 Jul 2025). The example estimates an ML-DFM with one global factor, one pairwise factor for blocks 1 and 3, and one local factor per block, then proceeds through baseline GaR estimation, construction of a 99% stressed scenario, and estimation of GiS.
The reported economic interpretation is that GiS can be substantially more negative than GaR, implying that densities conditional on average factor realizations may understate downside risk relative to densities conditioned on stressed but statistically plausible factor realizations. This is the policy and risk-management rationale for combining factor models with quantile regression and ellipsoidal stressing in a single package.
Within recent arXiv literature, the acronym FARS is not unique. It has also denoted “Fuzzy Logic Theory-based Adaptive Reward Shaping” in reinforcement learning (Şahin et al., 17 Apr 2026) and “Fully Automated Research System” in AI-for-AI research automation (Tang et al., 30 Jun 2026). In the present package context, however, FARS specifically denotes Factor Augmented Regression Scenarios in R (Bellocca et al., 14 Jul 2025). That distinction matters because the econometric package is centered on ML-DFMs, FA-QRs, skew-9 density recovery, and stress testing, rather than on reinforcement-learning reward shaping or autonomous scientific workflows.
Taken as a whole, FARS provides a unified statistical framework for extracting hierarchical latent factors, attaching confidence regions to those factors, projecting them into conditional quantiles of a target series, and translating those quantiles into baseline and stressed predictive densities. Its methodological significance lies in making factor modeling, quantile-based tail analysis, and scenario design under factor uncertainty operational within a single R package (Bellocca et al., 14 Jul 2025).