{
  "_id": "6a1f2d58b401979e734264d3",
  "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-05-15 09:47:26 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": "51fdf55feef553f126544f9deb2a9de0",
  "_user": "myaseen208",
  "_type": "src",
  "_file": "mhpfilter_0.1.0.tar.gz",
  "_fileid": "9867ae8bdee52f099c273c9a6ebe5e7e1f63919d82fb452632b8d84330490c0c",
  "_filesize": 1947463,
  "_sha256": "9867ae8bdee52f099c273c9a6ebe5e7e1f63919d82fb452632b8d84330490c0c",
  "_created": "2026-05-15T09:47:26.000Z",
  "_published": "2026-06-02T19:22:00.393Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 79153298324,
      "time": 164,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7014437476"
    },
    {
      "job": 79153298549,
      "time": 169,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7014440445"
    },
    {
      "job": 79153298734,
      "time": 162,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014436940"
    },
    {
      "job": 79153299343,
      "time": 183,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014442425"
    },
    {
      "job": 79153298483,
      "time": 98,
      "config": "macos-oldrel-arm64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7014419305"
    },
    {
      "job": 79153298867,
      "time": 243,
      "config": "macos-oldrel-x86_64",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7014459539"
    },
    {
      "job": 79153298777,
      "time": 152,
      "config": "macos-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014433903"
    },
    {
      "job": 79153298134,
      "time": 232,
      "config": "macos-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014456369"
    },
    {
      "job": 79153297844,
      "time": 224,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014387223"
    },
    {
      "job": 79153297664,
      "time": 137,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7367619089"
    },
    {
      "job": 79153298587,
      "time": 151,
      "config": "windows-devel",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7014433316"
    },
    {
      "job": 79153298546,
      "time": 131,
      "config": "windows-oldrel",
      "r": "4.5.3",
      "check": "OK",
      "artifact": "7014427251"
    },
    {
      "job": 79153298742,
      "time": 157,
      "config": "windows-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7014435447"
    }
  ],
  "_buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150",
  "_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",
    "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"
  },
  "_downloads": {
    "count": 153,
    "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",
    "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-05-15T09:50:00.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "faa7501d015d33d61e86300897f0d82eec6e21a535ef82bba28e3bae51c01083",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-15T09:50:04.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "d0969b9aff32d00a29886a16b01e62b208006b18623d28311a670b801aa1e53e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-15T09:49:56.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "1b212fd8daab7c9f30d8cc7eec45ca00a2e946c674290739a74c83e5b5b81411",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-15T09:50:06.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "a75d26680c46b6b9d07ef75653d3a9792bf09fb9e5fa9f42c502c7d96595498d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-05-15T09:49:11.000Z",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "e4ca783236725ef4767b5c31580c4511c6fb3847966dc12762fd4e63afc1e335",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.5.3",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-05-15T09:50:46.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "aa302b5b06927061950b1912ebc986ed8b0be09aa6d4c8fe2edaed0e627f02a9",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-05-15T09:49:43.000Z",
      "arch": "aarch64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "d6dffd7e0c496185ab7449d4516c6baa461eb2cea2d5114fc05b05f9a6afa9e6",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.6.0",
      "os": "mac",
      "version": "0.1.0",
      "date": "2026-05-15T09:50:41.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "1c462f26060014f2aa5ee87d5b392e783ee1976b531b63709e37a99331671c9d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.7.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-15T09:49:09.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "b9900e5ac4060b696a506553856f8b0e165005bd8a092f061e7247555aefe58a",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.5.3",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-15T09:48:55.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "4c076e12b04cefd4be68cd38b2b32b53dba327c0b54c0ddd273e11305c539c06",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.6.0",
      "os": "win",
      "version": "0.1.0",
      "date": "2026-05-15T09:49:18.000Z",
      "arch": "x86_64",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "b0b958d5c938bfeafde7165c14c55a8865ca70fbda7abfa5e8097bc4e15e8e49",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-06-02T19:21:34.000Z",
      "arch": "emscripten",
      "commit": "308f6886e1eadc3ec9a8e52f3bb799facac3c209",
      "fileid": "f2902213f7d13ccb4e7512f9abcc286073a79d90efc80b75175f5019b59e5ea0",
      "status": "success",
      "buildurl": "https://github.com/r-universe/myaseen208/actions/runs/25911247150"
    }
  ]
}