Conditional Forecasting and Scenario Analysis Using VAR Models
Overview
Provides tools for interpretable conditional forecasting and scenario analysis in reduced-form vector autoregressive (VAR) models. Implements a Kalman smoothing framework to generate forecasts under path restrictions on selected variables. The package enables decomposition of conditional forecasts into variable-specific contributions, and extraction of observation weights. It also computes measures of overall and marginal variable importance to enhance the economic interpretation of forecast revisions. The framework is structurally agnostic and suited for policy analysis, stress testing, and macro-financial applications. The methodology is described in more detail in Caspi and Ginker (2026) doi:10.13140/RG.2.2.25225.51040.
- New KFAS Backend
Added support for the **KFAS** backend for state-space filtering and smoothing routines. The backend can be selected using the package argument (package = "KFAS").
This backend is particularly useful when the forecast error variance matrix is **singular or near-singular**, a situation in which the default **FKF** implementation may fail. While **KFAS** provides a more robust alternative, it is computationally more demanding and may result in longer execution times.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK6 OK2026-03-10
Documentation
- Help pages
- 7
- Examples that run
- 100%5 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 100%
- Return-value docs
- 100%
- Help pages citing references
- 14%
Downloads
Repository
Stars over time
4 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/timginker/cforecast on 2026-10-18.
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.1.1Latest
- RR 4.6.0 released · 2026-04-24
- 0.1.02026-03-09
- RR 4.5.0 released · 2025-04-11
Package metadata
- First published
- 2026-03-09
- Total releases
- 2 / 1 yrs
- License
- GPL (>= 3) OSI
- Minimum R
- ≥ 3.5.0
- Bundled data
- 5.6 KB / 2 files
- Download size
- 69 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("cforecast")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-21, which the citation names so these numbers can be found later. More on citing and the projects behind them.