Determining potential output and the output gap-two inherently unobservable variables-is a major challenge for macroeconomists. This paper presents the R package sectorgap, which features a flexible modeling and estimation framework for a multivariate Bayesian state space model identifying...