{"id":24111900,"url":"https://github.com/andybega/ebmahelper","last_synced_at":"2025-11-23T06:04:37.240Z","repository":{"id":144784614,"uuid":"148898658","full_name":"andybega/EBMAhelper","owner":"andybega","description":"Regular S3 model fitting function and methods for EBMAforecast","archived":false,"fork":false,"pushed_at":"2022-04-06T08:37:46.000Z","size":354,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-11T02:53:12.539Z","etag":null,"topics":["ebma","ebma-forecast","ensemble","r","stacking"],"latest_commit_sha":null,"homepage":null,"language":"R","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andybega.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-09-15T12:09:33.000Z","updated_at":"2022-04-06T08:06:47.000Z","dependencies_parsed_at":null,"dependency_job_id":"bf260287-ed9c-41d8-bad6-944370ac3e0b","html_url":"https://github.com/andybega/EBMAhelper","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andybega%2FEBMAhelper","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andybega%2FEBMAhelper/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andybega%2FEBMAhelper/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andybega%2FEBMAhelper/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andybega","download_url":"https://codeload.github.com/andybega/EBMAhelper/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241117324,"owners_count":19912521,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ebma","ebma-forecast","ensemble","r","stacking"],"created_at":"2025-01-11T02:52:22.297Z","updated_at":"2025-11-23T06:04:37.185Z","avatar_url":"https://github.com/andybega.png","language":"R","readme":"---\noutput:\n  md_document:\n    variant: markdown_github\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, echo = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"README-\"\n)\n```\n\n# EBMAhelper\n\n[![Travis build status](https://travis-ci.org/andybega/EBMAhelper.svg?branch=master)](https://travis-ci.org/andybega/EBMAhelper)\n[![CRAN status](https://www.r-pkg.org/badges/version/EBMAhelper)](https://cran.r-project.org/package=EBMAhelper)\n[![Coverage status](https://codecov.io/gh/andybega/EBMAhelper/branch/master/graph/badge.svg)](https://codecov.io/github/andybega/EBMAhelper?branch=master)\n\nEBMAhelper is a wrapper around EBMAforecast ([CRAN](https://cran.r-project.org/web/packages/EBMAforecast/index.html), [GitHub](https://github.com/jmontgomery/EBMAforecast)) that provides some convenience functions more akin to R's conventional model-related functions: \n\n- `ebma()` to create and fit an EBMA ensemble model; wraps `EBMAforecast::makeForecastData` and `EBMAforecast::calibrateEnsemble`\n- `predict` method for the class \"ebma\" object returned by `ebma()`\n\nand a standalone `predict()` (TODO) method to aggregate new forecasts. \n\n## Installation\n\n```{r installation, eval = FALSE}\nlibrary(\"devtools\")\n\ninstall_github(\"andybega/EBMAhelper\")\n```\n\n## Example\n\nA EBMA ensemble can be fitted like this:\n\n```{r example}\nsuppressMessages({\n  library(\"EBMAforecast\")\n  library(\"EBMAhelper\")\n})\n\n\ndata(\"presidentialForecast\")\n\nhead(presidentialForecast)\nstr(presidentialForecast)\n\nfitted_ensemble \u003c- ebma(y = presidentialForecast[ ,7],\n                        x = presidentialForecast[ ,c(1:6)],\n                        model_type = \"normal\")\nsummary(fitted_ensemble)\n```\n\nTo do the same with `EBMAforecast` is slightly more verbose and does not follow R's model fitting conventions. The following code is adapted from the package demo:\n\n```{r}\ndata(\"presidentialForecast\")\n\nfull.forecasts \u003c- presidentialForecast[, c(1:6)]\nfull.observed \u003c- presidentialForecast[, 7]\n\nthis.ForecastData \u003c- makeForecastData(\n  .predCalibration=full.forecasts[1:12,],\n  .outcomeCalibration=full.observed[1:12],\n  .predTest=full.forecasts[13:15,], \n  .outcomeTest=full.observed[13:15], \n  .modelNames=c(\"Campbell\", \"Lewis-Beck\",\"EWT2C2\",\"Fair\",\"Hibbs\",\"Abramowitz\"))\nthisEnsemble \u003c- calibrateEnsemble(this.ForecastData, model=\"normal\", \n                                  useModelParams=FALSE, tol = 0.000000001,\n                                  const = 0)\nsummary(thisEnsemble)\n```\n\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandybega%2Febmahelper","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandybega%2Febmahelper","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandybega%2Febmahelper/lists"}