{
  "_id": "6a2e5c9d3efcd9bda430d203",
  "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-06-14 07:41:59 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)",
  "MD5sum": "d3440de1c4cdb2932721c1772c23c0ac",
  "_user": "myaseen208",
  "_type": "src",
  "_file": "mhpfilter_0.1.0.tar.gz",
  "_fileid": "6612f740acb0f7f955f8157a9a7bb0a018bcd77043fe5fc6bc47ed26b7e902ab",
  "_filesize": 1949337,
  "_sha256": "6612f740acb0f7f955f8157a9a7bb0a018bcd77043fe5fc6bc47ed26b7e902ab",
  "_created": "2026-06-14T07:41:59.000Z",
  "_published": "2026-06-14T07:47:41.172Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 81259472661,
      "time": 155,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7618782202"
    },
    {
      "job": 81259472674,
      "time": 170,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7618784783"
    },
    {
      "job": 81259472681,
      "time": 155,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7618782342"
    },
    {
      "job": 81259472684,
      "time": 172,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7618785177"
    },
    {
      "job": 81259472689,
      "time": 106,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7618777109"
    },
    {
      "job": 81259472690,
      "time": 224,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7618793508"
    },
    {
      "job": 81259472678,
      "time": 123,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7618777264"
    },
    {
      "job": 81259472699,
      "time": 281,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7618804151"
    },
    {
      "job": 81259233991,
      "time": 221,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7618758218"
    },
    {
      "job": 81259472656,
      "time": 130,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7618779287"
    },
    {
      "job": 81259472667,
      "time": 146,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7618781287"
    },
    {
      "job": 81259472676,
      "time": 126,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7618777862"
    },
    {
      "job": 81259472664,
      "time": 134,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7618779499"
    }
  ],
  "_buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_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"
  },
  "_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": 46
  },
  "_downloads": {
    "count": 139,
    "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.0",
  "_assets": [
    "extra/citation.cff",
    "extra/citation.html",
    "extra/citation.json",
    "extra/citation.txt",
    "extra/contents.json",
    "extra/mhpfilter.html",
    "extra/NEWS.html",
    "extra/NEWS.txt",
    "extra/readme.html",
    "extra/readme.md",
    "LICENSE",
    "manual.pdf"
  ],
  "_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.26+ds-1ubuntu0.1",
      "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.26+ds-1ubuntu0.1",
      "name": "openblas",
      "homepage": "https://www.openblas.net/",
      "description": "Optimized BLAS (linear algebra) library (shared lib, pthread)"
    },
    {
      "shlib": "libstdc++",
      "package": "libstdc++6",
      "source": "gcc",
      "version": "14.2.0-4ubuntu2~24.04.1",
      "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-06-14T07:44:26.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "939fda4c1cef8b59e303df3a2275cb91d183af5bc0cf6d204499d429a6eb7d22",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-06-14T07:44:34.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "bb6c6f5724920fbd629c01329395697cb3085208470233feefd12d55e40414ea",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-06-14T07:44:27.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "111ebbc1dd1838351382d60d5d1b62e75a72d491d785d55e21a6440e9739bceb",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-06-14T07:44:36.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "4f186785f5878d62fd6cf6231cedf3c0c5cc5c0ddac1ced32193f65b81a4ee04",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-06-14T07:44:02.000Z",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "1d8da3651f4966141733e5a2af8a80f66d68f1ea0a2ddf0a043c8c6564f36fc9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-06-14T07:45:03.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "c4c5f672c22709522cb728c0810140f35f7c36c06227de89929c0846752a25d9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-06-14T07:43:52.000Z",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "9ddf0451ee460644b99c7b289d4ab05acc4780ea018bf79ff825e86d1e692a51",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-06-14T07:45:19.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "2c54d5d998d5a4a3bc512b42c9e6fac6728d1d388854ea0d309cd540e2de31c1",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-06-14T07:44:36.000Z",
      "arch": "emscripten",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "8de0edbd7899c6b5f9cc119acfe92f3493b28fba954d68498148e93fee547517",
      "status": "success",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-06-14T07:43:44.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "9aee46fbe0fcfdd2abe85b38715e7cecad609455c3b7651511c2f414b297451d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-06-14T07:43:23.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "87b4d371a0dd60534c5db386c357f3f028a6444ea04cb72d604309df145361f2",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-06-14T07:43:34.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "a35090dee10279510e31a5fa7cf6aff91b791dae1d55d7a4fbda5ce7082ab513",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/27492139027"
    }
  ]
}