Skip to content

hpfilter

1.0.2

The One- And Two-Sided Hodrick-Prescott Filter

1packages depend
5.4Kdownloads / year
test coverage
11/13checks pass

Overview

About
Maintained by Alexandru MonahovFirst published 2023-02-243 releasesCRAN page ↗

Provides two functions that implement the one-sided and two-sided versions of the Hodrick-Prescott filter. The one-sided version is a Kalman filter-based implementation, whereas the two- sided version uses sparse matrices for improved efficiency. References: Hodrick, R. J., and Prescott, E. C. (1997) doi:10.2307/2953682 Mcelroy, T. (2008) doi:10.1111/j.1368-423X.2008.00230.x Meyer-Gohde, A. (2010) https://ideas.repec.org/c/dge/qmrbcd/181.html For more references, see the vignette.

Install

Health

CRAN checks
2NOTE11OK
Failing flavors
  • NOTE r-devel-linux-x86_64-debian-clang
  • NOTE r-devel-linux-x86_64-debian-gcc
Slowest check: 2.1 min · r-devel-linux-x86_64-fedora-gcc
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
Yes
Vignettes
Yes
README
1
Dependencies · direct
Check history
  • NOTE2026-03-10
    12 OK · 2 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Downloads

5.4K
CRAN downloads in the past year
Rank #8,541 · ~15/day · ~451/mo
Daily download trend is not available in this view yet.
40330 days
1.4K90 days
5.4K1 year
Compare downloads with other packages →
Also on105 r2u11 autocran17 c2d4u

Dependencies

Declared dependencies
2 external dependencies (excludes base and recommended)
Depends (1)
R >= 3.5.0
Imports (1)
Matrix
LinkingTo (0)
none
Suggests (2)
Enhances (0)
none
Reverse dependencies
1direct
0indirect

Code & Tests

Code Composition
R 383 (41%)Rd 337 (36%)Vignettes 214 (23%)
Code characteristics
Cyclomatic complexity
4.5 median / 7 max
Documented parameters
100%

Test coverage

Line coverage

Expression

Tests / Examples

Functions

2 2 exported

Complexity

4.5 avg / 7 max

Call network

2 nodes / 0 edges

Test coverage has not been measured for this package yet; nodes fall back to a neutral fill.

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

People & History

People (0)

Author records are not tracked yet for this package.

Release timeline

3 releases. Pick two to compare their code metrics. R releases are shown for context.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 1.0.2Latest
    2023-05-28 · current release · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 1.0.1
    2023-02-26 · diff ↗
  • 1.0.0
    2023-02-24
  • R
    R 4.2.0 released · 2022-04-22

Package metadata

First published
2023-02-24
Total releases
3 / 3 yrs
License
CC BY-SA 4.0
Minimum R
≥ 3.5.0
Bundled data
1.1 KB / 1 file
Download size
116 KB
Installed size
not tracked yet
With dependencies
not tracked yet