{
  "_id": "6acb6abdfe5cc25786e8fb20",
  "Package": "mhpfilter",
  "Type": "Package",
  "Title": "Modified Hodrick-Prescott Filter with Optimal Smoothing\nParameter Selection",
  "Version": "0.1.0",
  "Authors@R": "c(\nperson(\"Muhammad\", \"Yaseen\",\nemail = \"myaseen208@gmail.com\",\nrole = c(\"aut\", \"cre\"),\ncomment = c(ORCID = \"0000-0002-5923-1714\")),\nperson(\"Javed\", \"Iqbal\",\nemail = \"Javed.iqbal6@sbp.org.pk\",\nrole = \"ctb\",\ncomment = \"Original methodology author\"),\nperson(\"M. Nadim\", \"Hanif\",\nemail = \"Nadeem.hanif@sbp.org.pk\",\nrole = \"ctb\",\ncomment = \"Original methodology author\")\n)",
  "Maintainer": "Muhammad Yaseen <myaseen208@gmail.com>",
  "Description": "High-performance implementation of the Modified\nHodrick-Prescott (HP) Filter for decomposing macroeconomic time\nseries into trend and cyclical components. Based on the\nmethodology of Choudhary, Hanif and Iqbal (2014)\n<doi:10.1080/00036846.2014.894631> \"On smoothing macroeconomic\ntime series using the modified HP filter\", which uses\ngeneralized cross-validation (GCV) to automatically select the\noptimal smoothing parameter lambda, following McDermott (1997)\n\"An automatic method for choosing the smoothing parameter in\nthe HP filter\" (as described in Coe and McDermott (1997)\n<doi:10.2307/3867497>). Unlike the standard HP filter that uses\nfixed lambda values (1600 for quarterly, 100 for annual data),\nthis package estimates series-specific lambda values that\nminimize the GCV criterion. Implements efficient C++ routines\nvia 'RcppArmadillo' for fast computation, supports batch\nprocessing of multiple series, and provides comprehensive\nvisualization tools using 'ggplot2'. Particularly useful for\ncross-country macroeconomic comparisons, business cycle\nanalysis, and when the appropriate smoothing parameter is\nuncertain.",
  "License": "MIT + file LICENSE",
  "Encoding": "UTF-8",
  "URL": "https://myaseen208.com/mhpfilter/",
  "BugReports": "https://github.com/myaseen208/mhpfilter/issues",
  "VignetteBuilder": "knitr",
  "RoxygenNote": "7.3.3",
  "NeedsCompilation": "yes",
  "Language": "en-US",
  "Repository": "https://myaseen208.r-universe.dev",
  "Date/Publication": "2026-02-13 07:41:45 UTC",
  "RemoteUrl": "https://github.com/myaseen208/mhpfilter",
  "RemoteRef": "HEAD",
  "RemoteSha": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
  "Packaged": {
    "Date": "2026-10-11 10:45:07 UTC",
    "User": "root"
  },
  "Author": "Muhammad Yaseen [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-5923-1714>),\nJaved Iqbal [ctb] (Original methodology author),\nM. Nadim Hanif [ctb] (Original methodology author)",
  "_user": "myaseen208",
  "_type": "src",
  "_file": "mhpfilter_0.1.0.tar.gz",
  "_fileid": "https://r2.ropensci.org/6ef501d50c9cb4ff81a8556e9e5773374523298f524c475a7933da6301d21057",
  "_filesize": 1943250,
  "_sha256": "6ef501d50c9cb4ff81a8556e9e5773374523298f524c475a7933da6301d21057",
  "_expires": "2027-01-19T10:53:48.000Z",
  "_created": "2026-10-11T10:45:07.000Z",
  "_published": "2026-10-11T10:53:49.820Z",
  "_buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_jobs": [
    {
      "job": 114451312825,
      "time": 148,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11700131370"
    },
    {
      "job": 114451313030,
      "time": 190,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11699563874"
    },
    {
      "job": 114451312867,
      "time": 147,
      "config": "linux-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11700325899"
    },
    {
      "job": 114451312903,
      "time": 135,
      "config": "linux-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11699224461"
    },
    {
      "job": 114451312904,
      "time": 150,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11699734059"
    },
    {
      "job": 114451312908,
      "time": 247,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11700306122"
    },
    {
      "job": 114451312840,
      "time": 149,
      "config": "macos-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11699279586"
    },
    {
      "job": 114451312896,
      "time": 335,
      "config": "macos-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11700131672"
    },
    {
      "job": 114450677253,
      "time": 214,
      "config": "source",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11700335664"
    },
    {
      "job": 114451312835,
      "time": 112,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "11699389091"
    },
    {
      "job": 114451312922,
      "time": 369,
      "config": "windows-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11699534176"
    },
    {
      "job": 114451312982,
      "time": 151,
      "config": "windows-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "11700041585"
    },
    {
      "job": 114451312968,
      "time": 147,
      "config": "windows-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "11699698580"
    },
    {
      "job": 114451312977,
      "time": 351,
      "config": "windows-release-arm64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11700221258"
    },
    {
      "job": 114451312929,
      "time": 143,
      "config": "windows-release-x86_64",
      "r": "4.6.1",
      "check": "OK",
      "artifact": "11699458883"
    }
  ],
  "_upstream": "https://github.com/myaseen208/mhpfilter",
  "_commit": {
    "id": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
    "author": "myaseen208 <myaseen208@gmail.com>",
    "committer": "myaseen208 <myaseen208@gmail.com>",
    "message": "2026-02-13-0243\n",
    "time": 1770968505
  },
  "_maintainer": {
    "name": "Muhammad Yaseen",
    "email": "myaseen208@gmail.com",
    "login": "myaseen208",
    "description": "",
    "uuid": 1450771,
    "orcid": "0000-0002-5923-1714"
  },
  "_distro": "resolute",
  "_registered": true,
  "_dependencies": [
    {
      "package": "R",
      "version": ">= 4.0.0",
      "role": "Depends"
    },
    {
      "package": "Rcpp",
      "role": "LinkingTo"
    },
    {
      "package": "RcppArmadillo",
      "role": "LinkingTo"
    },
    {
      "package": "Rcpp",
      "version": ">= 1.0.0",
      "role": "Imports"
    },
    {
      "package": "RcppArmadillo",
      "version": ">= 0.12.0.0.0",
      "role": "Imports"
    },
    {
      "package": "data.table",
      "version": ">= 1.14.0",
      "role": "Imports"
    },
    {
      "package": "collapse",
      "version": ">= 2.0.0",
      "role": "Imports"
    },
    {
      "package": "ggplot2",
      "version": ">= 3.4.0",
      "role": "Imports"
    },
    {
      "package": "knitr",
      "version": ">= 1.40",
      "role": "Suggests"
    },
    {
      "package": "rmarkdown",
      "version": ">= 2.20",
      "role": "Suggests"
    },
    {
      "package": "testthat",
      "version": ">= 3.0.0",
      "role": "Suggests"
    },
    {
      "package": "tidyverse",
      "version": ">= 2.0.0",
      "role": "Suggests"
    },
    {
      "package": "fastverse",
      "version": ">= 0.3.0",
      "role": "Suggests"
    }
  ],
  "_owner": "myaseen208",
  "_selfowned": true,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-06",
      "n": 9
    },
    {
      "week": "2026-07",
      "n": 1
    }
  ],
  "_tags": [],
  "_stars": 2,
  "_contributors": [
    {
      "user": "myaseen208",
      "count": 10,
      "uuid": 1450771
    }
  ],
  "_userbio": {
    "uuid": 1450771,
    "type": "user",
    "name": "myaseen208",
    "followers": 48
  },
  "_downloads": {
    "count": 203,
    "source": "https://cranlogs.r-pkg.org/downloads/total/last-month/mhpfilter"
  },
  "_devurl": "https://github.com/myaseen208/mhpfilter",
  "_pkgdown": "https://myaseen208.com/mhpfilter/",
  "_searchresults": 0,
  "_topics": [
    "openblas",
    "cpp"
  ],
  "_rbuild": "4.6.1",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/manual.pdf",
    "extra/mhpfilter.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE"
  ],
  "_homeurl": "https://github.com/myaseen208/mhpfilter",
  "_realowner": "myaseen208",
  "_cranurl": true,
  "_releases": [
    {
      "version": "0.1.0",
      "date": "2026-02-16"
    }
  ],
  "_exports": [
    "batch_compare",
    "get_gcv",
    "get_lambda",
    "hp_filter",
    "mhp_batch",
    "mhp_compare",
    "mhp_filter",
    "plot_batch",
    "plot_comparison"
  ],
  "_help": [
    {
      "page": "mhpfilter-package",
      "title": "mhpfilter: Fast Modified Hodrick-Prescott Filter",
      "topics": [
        "mhpfilter-package",
        "mhpfilter"
      ]
    },
    {
      "page": "autoplot.mhp",
      "title": "Plot Method for mhp Objects",
      "topics": [
        "autoplot.mhp"
      ]
    },
    {
      "page": "batch_compare",
      "title": "Batch Comparison of HP vs Modified HP",
      "topics": [
        "batch_compare"
      ]
    },
    {
      "page": "get_gcv",
      "title": "Extract GCV Value",
      "topics": [
        "get_gcv"
      ]
    },
    {
      "page": "get_lambda",
      "title": "Extract Optimal Lambda",
      "topics": [
        "get_lambda"
      ]
    },
    {
      "page": "hp_filter",
      "title": "Standard Hodrick-Prescott Filter",
      "topics": [
        "hp_filter"
      ]
    },
    {
      "page": "mhp_batch",
      "title": "Batch Modified HP Filter",
      "topics": [
        "mhp_batch"
      ]
    },
    {
      "page": "mhp_compare",
      "title": "Compare HP vs Modified HP Filter",
      "topics": [
        "mhp_compare"
      ]
    },
    {
      "page": "mhp_filter",
      "title": "Modified Hodrick-Prescott Filter",
      "topics": [
        "mhp_filter"
      ]
    },
    {
      "page": "plot_batch",
      "title": "Plot Batch Results",
      "topics": [
        "plot_batch"
      ]
    },
    {
      "page": "plot_comparison",
      "title": "Plot Comparison of HP vs Modified HP",
      "topics": [
        "plot_comparison"
      ]
    },
    {
      "page": "print.mhp",
      "title": "Print Method for mhp Objects",
      "topics": [
        "print.mhp"
      ]
    }
  ],
  "_readme": "https://github.com/myaseen208/mhpfilter/raw/HEAD/README.md",
  "_rundeps": [
    "cli",
    "collapse",
    "cpp11",
    "data.table",
    "farver",
    "ggplot2",
    "glue",
    "gtable",
    "isoband",
    "labeling",
    "lifecycle",
    "R6",
    "RColorBrewer",
    "Rcpp",
    "RcppArmadillo",
    "rlang",
    "S7",
    "scales",
    "vctrs",
    "viridisLite",
    "withr"
  ],
  "_sysdeps": [
    {
      "shlib": "liblapack",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.32+ds-5",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libblas",
      "package": "libopenblas0-pthread",
      "source": "openblas",
      "version": "0.3.32+ds-5",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "16-20260322-1ubuntu1",
      "name": "c++",
      "homepage": "http://gcc.gnu.org/",
      "description": "GNU Standard C++ Library v3"
    }
  ],
  "_vignettes": [
    {
      "source": "introduction.Rmd",
      "filename": "introduction.html",
      "title": "Introduction to mhpfilter",
      "author": "Muhammad Yaseen, Javed Iqbal, M. Nadim Hanif",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Overview",
        "Why Modified HP Filter?",
        "Installation",
        "Quick Start",
        "Example 1: GDP-like Series",
        "Visualization with autoplot",
        "Comparison with Standard HP Filter",
        "Example 2: Why Fixed Lambda Matters",
        "Visual Comparison",
        "Key Insights from Comparison",
        "Batch Processing: Multi-Country Analysis",
        "Example 3: Cross-Country GDP Comparison",
        "Visualizing Cross-Country Cycles",
        "Highlighting Specific Countries",
        "Batch Comparison with Standard HP",
        "Example 4: Real Business Cycle Analysis",
        "Cyclical Properties Visualization",
        "Example 5: Sensitivity to Lambda",
        "Performance Tips",
        "Choosing max_lambda",
        "Batch Processing Efficiency",
        "Summary and Recommendations",
        "When to Use Modified HP Filter",
        "Key Takeaways",
        "References",
        "See Also"
      ],
      "created": "2026-02-06 18:11:55",
      "modified": "2026-02-06 18:11:55",
      "commits": 1
    },
    {
      "source": "methodology.Rmd",
      "filename": "methodology.html",
      "title": "Modified HP Filter: Theory and Methodology",
      "author": "Muhammad Yaseen, Javed Iqbal, M. Nadim Hanif",
      "engine": "knitr::rmarkdown",
      "headings": [
        "Introduction",
        "1. The Standard HP Filter",
        "1.1 Problem Formulation",
        "1.2 Matrix Formulation",
        "1.3 The Problem with Fixed Lambda",
        "2. The Modified HP Filter",
        "2.1 Cross-Validation Approach",
        "2.2 Generalized Cross-Validation",
        "2.3 Algorithm",
        "3. Why Modified HP Filter Works Better",
        "3.1 Simulation Evidence",
        "3.2 Empirical Evidence",
        "4. Theoretical Justification",
        "4.1 Why Cross-Validation?",
        "4.2 Relationship to Signal Extraction",
        "4.3 Connection to Spline Smoothing",
        "5. Practical Recommendations",
        "5.1 When to Use Modified HP Filter",
        "5.2 Choosing max_lambda",
        "5.3 Interpreting Results",
        "6. Mathematical Appendix",
        "6.1 Derivation of HP Filter Solution",
        "6.2 Structure of Matrix A",
        "6.3 GCV Approximation",
        "References"
      ],
      "created": "2026-02-06 18:11:55",
      "modified": "2026-02-13 07:41:45",
      "commits": 2
    }
  ],
  "_score": 4.6020599913279625,
  "_indexed": true,
  "_nocasepkg": "mhpfilter",
  "_universes": [
    "myaseen208"
  ],
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-10-11T10:47:25.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/5411e61be10c5f1998dac9cabb18c1436068ff1ea23125e934470e3683a4aae3",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-10-11T10:48:03.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/16a23e7f1c26264356895769ae3cb43805be6589bb3d56dfcdc3454e834352ce",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-10-11T10:47:28.000Z",
      "distro": "resolute",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/09fb6ac2fd3b828c5899ca2b4362ffed761c212f66bb37c91688cf5cf5649e05",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.6.1",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-10-11T10:47:21.000Z",
      "distro": "resolute",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/8702054cdf6d6f92330903778b031bd4a8ba33d8e6a4ab85c997db09929f5e57",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-10-11T10:52:34.000Z",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/bfe6b294379aa24ab530596046eacbd22c6df1d271aa84f419ed292d2aea5626",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-10-11T10:49:21.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/3b6e5a5bc542c912ded81d8e3a7c418678002419a4b322059f9d64d8441c1bac",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-10-11T10:49:14.000Z",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/0a8b8ed4b31cbc3b8c56f2bd47e072af05a33cfd0ee907b600b05ae245859150",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.6.1",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-10-11T10:50:05.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/5e5e01e61daccfa726833d546a8470f07d43892de8d416cae34751b16400078a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-10-11T10:47:17.000Z",
      "arch": "emscripten",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/8cd02ff8656d6285d80159693da65fc030f982111ab5420b3fb459990ddd92b0",
      "status": "success",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-11T10:50:25.000Z",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/913fefcac1bee88fedb45c6486e1e19ed50c7209d156cb9659d5fd7f8c43b900",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-11T10:46:21.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/3459a627e983233801748ee7236bba2f0ee05de5a1e17d6a062f616798e1cca0",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-11T10:46:44.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/e1eb4f778d7b4febb01b3c2a4b66972e9288b20f030a1553a7c0a90fb66a382c",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-11T10:49:56.000Z",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/e408ee6f30f4f7c8d784a444cceae2b4426726f0fbbd0654b0a54c36464b5a6a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    },
    {
      "r": "4.6.1",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-10-11T10:46:59.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "https://r2.ropensci.org/1fad1ba0fdeaf4cac330ef29e55430b2a3b82d962f8d609f0dbc143c238d4e2e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/38132862326"
    }
  ]
}