{
  "_id": "6a15378facfb0bcc41d4faf7",
  "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",
  "Packaged": {
    "Date": "2026-05-26 05:58:44 UTC",
    "User": "root"
  },
  "Author": "Muhammad Yaseen [aut, cre] (ORCID:\n<https://orcid.org/0000-0002-5923-1714>), Javed Iqbal [ctb]\n(Original methodology author), M. Nadim Hanif [ctb] (Original\nmethodology author)",
  "Repository": "https://cran.r-universe.dev",
  "Date/Publication": "2026-02-13 07:40:08 UTC",
  "RemoteUrl": "https://github.com/cran/mhpfilter",
  "RemoteRef": "HEAD",
  "RemoteSha": "c73a77f5d891a2b3c94ff6c9a5bc874c1d11943d",
  "MD5sum": "0788c7fb711a399a5bccd9a48952ed2d",
  "_user": "cran",
  "_type": "src",
  "_file": "mhpfilter_0.1.0.tar.gz",
  "_fileid": "e95931e61bd4c058fd67070f795476e79d41976e9bcec68712af12aced801163",
  "_filesize": 1943804,
  "_sha256": "e95931e61bd4c058fd67070f795476e79d41976e9bcec68712af12aced801163",
  "_created": "2026-05-26T05:58:44.000Z",
  "_published": "2026-05-26T06:02:55.252Z",
  "_distro": "noble",
  "_jobs": [
    {
      "job": 77816206547,
      "time": 164,
      "config": "linux-devel-arm64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7209945453"
    },
    {
      "job": 77816206543,
      "time": 176,
      "config": "linux-devel-x86_64",
      "r": "4.7.0",
      "check": "OK",
      "artifact": "7209947836"
    },
    {
      "job": 77816206565,
      "time": 202,
      "config": "linux-release-arm64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7209953713"
    },
    {
      "job": 77816206541,
      "time": 171,
      "config": "linux-release-x86_64",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7209946959"
    },
    {
      "job": 77815749815,
      "time": 252,
      "config": "source",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7209910557"
    },
    {
      "job": 77816206506,
      "time": 137,
      "config": "wasm-release",
      "r": "4.6.0",
      "check": "OK",
      "artifact": "7209939562"
    }
  ],
  "_buildurl": "https://github.com/r-universe/cran/actions/runs/26435010151",
  "_status": "success",
  "_host": "GitHub-Actions",
  "_upstream": "https://github.com/cran/mhpfilter",
  "_commit": {
    "id": "c73a77f5d891a2b3c94ff6c9a5bc874c1d11943d",
    "author": "Muhammad Yaseen <myaseen208@gmail.com>",
    "committer": "cran-robot <csardi.gabor+cran@gmail.com>",
    "message": "version 0.1.0\n",
    "time": 1770968408
  },
  "_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": "cran",
  "_selfowned": false,
  "_usedby": 0,
  "_updates": [
    {
      "week": "2026-07",
      "n": 1
    }
  ],
  "_tags": [
    {
      "name": "0.1.0",
      "date": "2026-02-13"
    }
  ],
  "_stars": 1,
  "_contributors": [
    {
      "user": "myaseen208",
      "count": 1,
      "uuid": 1450771
    }
  ],
  "_userbio": {
    "uuid": 6899542,
    "type": "organization",
    "name": "cran",
    "description": "Unofficial read-only mirror of all CRAN R packages"
  },
  "_downloads": {
    "count": 142,
    "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": false,
  "_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/cran/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-13 07:40:08",
      "modified": "2026-02-13 07:40:08",
      "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-13 07:40:08",
      "modified": "2026-02-13 07:40:08",
      "commits": 1
    }
  ],
  "_score": 3,
  "_indexed": false,
  "_nocasepkg": "mhpfilter",
  "_universes": [
    "cran"
  ],
  "_indexurl": "https://myaseen208.r-universe.dev/mhpfilter",
  "_binaries": [
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-26T06:01:22.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "c73a77f5d891a2b3c94ff6c9a5bc874c1d11943d",
      "fileid": "930797aa0c6931928960a554e8a64eebf5d93a8bdec915d67a51885b0988a763",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26435010151"
    },
    {
      "r": "4.7.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-26T06:01:25.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "c73a77f5d891a2b3c94ff6c9a5bc874c1d11943d",
      "fileid": "c4f3ca420f1c5a02f7086a90173155da200405d89e7f3dab22e2cbb849d16179",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26435010151"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-26T06:01:59.000Z",
      "distro": "noble",
      "arch": "aarch64",
      "commit": "c73a77f5d891a2b3c94ff6c9a5bc874c1d11943d",
      "fileid": "847b9f0215d37ffbd57eee046e06d568f341ec5896339cc4540096db15076d3e",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26435010151"
    },
    {
      "r": "4.6.0",
      "os": "linux",
      "version": "0.1.0",
      "date": "2026-05-26T06:01:21.000Z",
      "distro": "noble",
      "arch": "x86_64",
      "commit": "c73a77f5d891a2b3c94ff6c9a5bc874c1d11943d",
      "fileid": "f980407aa09c8363a7c2704dfa1323a217ebc4b714478c444cce0f833054909d",
      "status": "success",
      "check": "OK",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26435010151"
    },
    {
      "r": "4.6.0",
      "os": "wasm",
      "version": "0.1.0",
      "date": "2026-05-26T06:01:25.000Z",
      "arch": "emscripten",
      "commit": "c73a77f5d891a2b3c94ff6c9a5bc874c1d11943d",
      "fileid": "b6474e6d856f8fe18b77ae36efec50e662a6d828fbaf94cc86cef2758d3c5676",
      "status": "success",
      "buildurl": "https://github.com/r-universe/cran/actions/runs/26435010151"
    }
  ]
}