Approaches to selecting lambda.
select_lambda( freq = c("quarterly", "annual", "monthly", "weekly"), type = c("rot", "ru2002") )
freq |
The frequency of the dataset. |
---|---|
type |
The methodology to select lambda. |
Rule of thumb is from Hodrick and Prescot (1997):
Lambda = 100*(number of periods in a year)^2
Annual data = 100 x 1^2 = 100
Quarterly data = 100 x 4^2 = 1,600
Monthly data = 100 x 12^2 = 14,400
Weekly data = 100 x 52^2 = 270,400
Daily data = 100 x 365^2 = 13,322,500
Ravn and Uhlig (2002) state that lambda should vary by the fourth power of the frequency observation ratio;
Lambda = 6.25 x (number of periods in a year)^4
Thus, the rescaled default values for lambda are:
Annual data = 1600 x 1^4 = 6.25
Quarterly data = 1600 x 4^4= 1600
Monthly data = 1600 x 12^4= 129,600
Weekly data = 1600 x 12^4 = 33,177,600
Hodrick, R. J., & Prescott, E. C. (1997). Postwar US business cycles: an empirical investigation. Journal of Money, credit, and Banking, 1-16.
Ravn, M. O., & Uhlig, H. (2002). On adjusting the Hodrick-Prescott filter for the frequency of observations. Review of economics and statistics, 84(2), 371-376.