{"id":317518,"name":"Open Source Empirical Macro Model","description":"Study Climate Policies and the wider Macro-economy that can easily be applied to all EU countries.","url":"https://github.com/moritzpschwarz/osem","last_synced_at":"2026-05-14T02:00:40.537Z","repository":{"id":302674540,"uuid":"1008404200","full_name":"moritzpschwarz/osem","owner":"moritzpschwarz","description":"A novel Open-Source Empircial Macro (OSEM) Model to study climate policies and the wider macro-economy that can easily be applied to a large set of countries","archived":false,"fork":false,"pushed_at":"2026-05-04T09:18:20.000Z","size":16118,"stargazers_count":3,"open_issues_count":21,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-05T22:05:48.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://www.moritzschwarz.org/osem/","language":"HTML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/moritzpschwarz.png","metadata":{"files":{"readme":"README.Rmd","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.md","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-06-25T13:45:41.000Z","updated_at":"2026-03-23T22:01:22.000Z","dependencies_parsed_at":"2026-04-01T05:01:00.217Z","dependency_job_id":null,"html_url":"https://github.com/moritzpschwarz/osem","commit_stats":null,"previous_names":["moritzpschwarz/osem"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/moritzpschwarz/osem","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritzpschwarz%2Fosem","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritzpschwarz%2Fosem/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritzpschwarz%2Fosem/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritzpschwarz%2Fosem/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moritzpschwarz","download_url":"https://codeload.github.com/moritzpschwarz/osem/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritzpschwarz%2Fosem/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33007321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-13T13:14:54.681Z","status":"online","status_checked_at":"2026-05-14T02:00:06.663Z","response_time":57,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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"}},"owner":{"login":"moritzpschwarz","name":"Moritz Schwarz","uuid":"30114680","kind":"user","description":"Climate Econometrics and Institute for New Economic Thinking at the Oxford Martin School","email":"","website":"moritzschwarz.org","location":"Oxford","twitter":"moritzpschwarz","company":"University of Oxford","icon_url":"https://avatars.githubusercontent.com/u/30114680?u=6b959e1bd1a3649747c0bc1666c93616cbc59c86\u0026v=4","repositories_count":21,"last_synced_at":"2024-05-12T09:40:56.855Z","metadata":{"has_sponsors_listing":false},"html_url":"https://github.com/moritzpschwarz","funding_links":[],"total_stars":17,"followers":31,"following":28,"created_at":"2023-05-02T19:34:44.134Z","updated_at":"2024-05-12T09:41:03.113Z","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moritzpschwarz","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/moritzpschwarz/repositories"},"packages":[],"commits":{"id":10127880,"full_name":"moritzpschwarz/osem","default_branch":"main","total_commits":152,"total_committers":2,"total_bot_commits":0,"total_bot_committers":0,"mean_commits":76.0,"dds":0.4736842105263158,"past_year_total_commits":152,"past_year_total_committers":2,"past_year_total_bot_commits":0,"past_year_total_bot_committers":0,"past_year_mean_commits":76.0,"past_year_dds":0.4736842105263158,"last_synced_at":"2026-05-11T21:00:08.393Z","last_synced_commit":"a99b4ff4e7b5f3722a9855fa7d7f6374d1dc54cc","created_at":"2025-05-30T00:21:34.046Z","updated_at":"2026-05-11T21:00:06.421Z","committers":[{"name":"Jonas Kurle","email":"56522916+jkurle","login":"jkurle","count":80},{"name":"Moritz Schwarz","email":"moritz.schwarz@outlook.com","login":"moritzpschwarz","count":72}],"past_year_committers":[{"name":"Jonas Kurle","email":"56522916+jkurle","login":"jkurle","count":80},{"name":"Moritz Schwarz","email":"moritz.schwarz@outlook.com","login":"moritzpschwarz","count":72}],"commits_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritzpschwarz%2Fosem/commits","host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-05-12T00:00:09.062Z","repositories_count":6233058,"commits_count":895232977,"contributors_count":34900861,"owners_count":1151731,"icon_url":"https://github.com/github.png","host_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://commits.ecosyste.ms/api/v1/hosts/GitHub/repositories"}},"issues_stats":{"full_name":"moritzpschwarz/osem","html_url":"https://github.com/moritzpschwarz/osem","last_synced_at":"2026-04-15T12:00:51.229Z","status":"error","issues_count":56,"pull_requests_count":75,"avg_time_to_close_issue":17565072.923076924,"avg_time_to_close_pull_request":2444907.90625,"issues_closed_count":13,"pull_requests_closed_count":64,"pull_request_authors_count":5,"issue_authors_count":2,"avg_comments_per_issue":0.26785714285714285,"avg_comments_per_pull_request":0.7733333333333333,"merged_pull_requests_count":56,"bot_issues_count":0,"bot_pull_requests_count":1,"past_year_issues_count":14,"past_year_pull_requests_count":17,"past_year_avg_time_to_close_issue":null,"past_year_avg_time_to_close_pull_request":1933620.7272727273,"past_year_issues_closed_count":0,"past_year_pull_requests_closed_count":11,"past_year_pull_request_authors_count":3,"past_year_issue_authors_count":2,"past_year_avg_comments_per_issue":0.14285714285714285,"past_year_avg_comments_per_pull_request":0.35294117647058826,"past_year_bot_issues_count":0,"past_year_bot_pull_requests_count":1,"past_year_merged_pull_requests_count":9,"created_at":"2025-05-30T00:21:48.149Z","updated_at":"2026-04-15T12:00:51.230Z","repository_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritzpschwarz%2Fosem","issues_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories/moritzpschwarz%2Fosem/issues","issue_labels_count":{"enhancement":17,"bug":4,"double check":2,"documentation":2},"pull_request_labels_count":{"enhancement":4},"issue_author_associations_count":{"OWNER":49,"COLLABORATOR":7},"pull_request_author_associations_count":{"OWNER":65,"COLLABORATOR":6,"NONE":3,"CONTRIBUTOR":1},"issue_authors":{"moritzpschwarz":49,"jkurle":7},"pull_request_authors":{"moritzpschwarz":65,"Geoffrey-Harper":5,"jkurle":2,"paulhoea":2,"codecov-ai[bot]":1},"host":{"name":"GitHub","url":"https://github.com","kind":"github","last_synced_at":"2026-05-07T00:00:10.474Z","repositories_count":14528812,"issues_count":34196124,"pull_requests_count":112072204,"authors_count":11256979,"icon_url":"https://github.com/github.png","host_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/repositories","owners_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/owners","authors_url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors"},"past_year_issue_labels_count":{"enhancement":2,"double check":1},"past_year_pull_request_labels_count":{"enhancement":1},"past_year_issue_author_associations_count":{"OWNER":12,"COLLABORATOR":2},"past_year_pull_request_author_associations_count":{"OWNER":15,"COLLABORATOR":1,"NONE":1},"past_year_issue_authors":{"moritzpschwarz":12,"jkurle":2},"past_year_pull_request_authors":{"moritzpschwarz":15,"codecov-ai[bot]":1,"jkurle":1},"maintainers":[{"login":"moritzpschwarz","count":114,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/moritzpschwarz"},{"login":"jkurle","count":9,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/jkurle"},{"login":"Geoffrey-Harper","count":4,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/Geoffrey-Harper"}],"active_maintainers":[{"login":"moritzpschwarz","count":27,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/moritzpschwarz"},{"login":"jkurle","count":3,"url":"https://issues.ecosyste.ms/api/v1/hosts/GitHub/authors/jkurle"}]},"events":{"total":{"ReleaseEvent":1,"DeleteEvent":20,"MemberEvent":1,"PullRequestEvent":29,"IssuesEvent":38,"WatchEvent":3,"IssueCommentEvent":23,"PushEvent":192,"PullRequestReviewEvent":26,"PullRequestReviewCommentEvent":30,"CreateEvent":24},"last_year":{"ReleaseEvent":1,"DeleteEvent":7,"MemberEvent":1,"PullRequestEvent":12,"IssuesEvent":19,"WatchEvent":3,"IssueCommentEvent":12,"PushEvent":61,"PullRequestReviewCommentEvent":23,"PullRequestReviewEvent":17,"CreateEvent":13}},"keywords":[],"dependencies":[{"ecosystem":"actions","filepath":".github/workflows/R-CMD-check.yaml","sha":null,"kind":"manifest","created_at":"2025-07-03T17:13:17.208Z","updated_at":"2025-07-03T17:13:17.208Z","repository_link":"https://github.com/moritzpschwarz/osem/blob/main/.github/workflows/R-CMD-check.yaml","dependencies":[{"id":23956168096,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":23956168097,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":23956168098,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":23956168099,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":23956168100,"package_name":"r-lib/actions/check-r-package","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/pkgdown.yaml","sha":null,"kind":"manifest","created_at":"2025-07-03T17:13:17.276Z","updated_at":"2025-07-03T17:13:17.276Z","repository_link":"https://github.com/moritzpschwarz/osem/blob/main/.github/workflows/pkgdown.yaml","dependencies":[{"id":23956168101,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":23956168102,"package_name":"r-lib/actions/setup-pandoc","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":23956168103,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":23956168104,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":23956168105,"package_name":"JamesIves/github-pages-deploy-action","ecosystem":"actions","requirements":"v4.5.0","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"actions","filepath":".github/workflows/test-coverage.yaml","sha":null,"kind":"manifest","created_at":"2025-07-03T17:13:17.331Z","updated_at":"2025-07-03T17:13:17.331Z","repository_link":"https://github.com/moritzpschwarz/osem/blob/main/.github/workflows/test-coverage.yaml","dependencies":[{"id":23956168418,"package_name":"actions/checkout","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":23956168419,"package_name":"r-lib/actions/setup-r","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":23956168420,"package_name":"r-lib/actions/setup-r-dependencies","ecosystem":"actions","requirements":"v2","direct":true,"kind":"composite","optional":false},{"id":23956168421,"package_name":"codecov/codecov-action","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false},{"id":23956168422,"package_name":"actions/upload-artifact","ecosystem":"actions","requirements":"v4","direct":true,"kind":"composite","optional":false}]},{"ecosystem":"cran","filepath":"DESCRIPTION","sha":null,"kind":"manifest","created_at":"2025-07-03T17:13:17.385Z","updated_at":"2025-07-03T17:13:17.385Z","repository_link":"https://github.com/moritzpschwarz/osem/blob/main/DESCRIPTION","dependencies":[{"id":23956168430,"package_name":"R","ecosystem":"cran","requirements":"\u003e= 3.5","direct":true,"kind":"depends","optional":false},{"id":23956168431,"package_name":"gets","ecosystem":"cran","requirements":"\u003e= 0.37","direct":true,"kind":"imports","optional":false},{"id":23956168550,"package_name":"dplyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168551,"package_name":"tidyr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168552,"package_name":"countrycode","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168553,"package_name":"eurostat","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168554,"package_name":"fastDummies","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168555,"package_name":"lubridate","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168556,"package_name":"rlang","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168557,"package_name":"magrittr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168558,"package_name":"stringr","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168559,"package_name":"utils","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168560,"package_name":"ggplot2","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168561,"package_name":"scales","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168562,"package_name":"zoo","ecosystem":"cran","requirements":"*","direct":true,"kind":"imports","optional":false},{"id":23956168563,"package_name":"shiny","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168564,"package_name":"readxl","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168565,"package_name":"readr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168566,"package_name":"writexl","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168567,"package_name":"DT","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168568,"package_name":"ggraph","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168569,"package_name":"testthat","ecosystem":"cran","requirements":"\u003e= 3.0.0","direct":true,"kind":"suggests","optional":false},{"id":23956168570,"package_name":"tidygraph","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168571,"package_name":"igraph","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168572,"package_name":"plotly","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168573,"package_name":"purrr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168574,"package_name":"forecast","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168575,"package_name":"knitr","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168576,"package_name":"rmarkdown","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168577,"package_name":"statcanR","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168578,"package_name":"imf.data","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168579,"package_name":"modelsummary","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false},{"id":23956168580,"package_name":"broom","ecosystem":"cran","requirements":"*","direct":true,"kind":"suggests","optional":false}]}],"score":3.871201010907891,"created_at":"2025-05-30T00:21:31.805Z","updated_at":"2026-05-14T02:00:40.539Z","avatar_url":"https://github.com/moritzpschwarz.png","language":"HTML","category":"Climate Change","sub_category":"Integrated Assessment and Climate Policy","monthly_downloads":0,"total_dependent_repos":0,"total_dependent_packages":0,"readme":"---\noutput: github_document\nalways_allow_html: true\n---\n\n\u003c!-- README.md is generated from README.Rmd. Please edit that file --\u003e\n\n```{r, include = FALSE}\nknitr::opts_chunk$set(\n  collapse = TRUE,\n  comment = \"#\u003e\",\n  fig.path = \"man/figures/README-\",\n  out.width = \"100%\",\n  fig.width = 7,\n  fig.height = 5,\n  dev = \"png\",\n  dpi = 600\n)\n```\n\n# osem - Open Source Empirical Macro Model\n\n\u003c!-- badges: start --\u003e\n[![R-CMD-check](https://github.com/moritzpschwarz/osem/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/moritzpschwarz/osem/actions/workflows/R-CMD-check.yaml)\n[![Codecov test coverage](https://codecov.io/gh/moritzpschwarz/osem/branch/main/graph/badge.svg)](https://app.codecov.io/gh/moritzpschwarz/osem?branch=main)\n\u003c!-- badges: end --\u003e\n\nThe goal of the {osem} Package is to implement and operationalise the Open Source Empirical Macro (OSEM) Model, developed by Moritz Schwarz, Jonas Kurle, Felix Pretis, and Andrew Martinez. This is an adaptation of the [Norwegian Aggregate Model](https://normetrics.no/nam/), developed by Gunnar Bardsen and Ragnar Nymoen. \n\n## Installation\n\nYou can install the development version of {osem} from [GitHub](https://github.com/) with:\n\n``` r\n# install.packages(\"devtools\")\ndevtools::install_github(\"moritzpschwarz/osem\")\n```\n\n## Basic Workflow\n\nThis is an example which shows you how to run the model:\n\nFirst we load the package:\n\n```{r, include=FALSE}\nlibrary(tidyverse)\n```\n\n\n```{r loading}\nlibrary(osem)\n```\n\n### Specify the model\n\nThe we calibrate the model specification and save this in a tibble. \nHere the column names and the structure of the specification table must follow the basic structure below.\n\n```{r set-up}\nspec \u003c- dplyr::tibble(\n  type = c(\n    \"n\",\n    \"n\",\n    \"n\",\n    \"n\",\n    \"d\",\n    \"n\",\n    \"n\",\n    \"n\",\n    \"n\"\n  ),\n  dependent = c(\n    \"Import\",\n    \"FinConsExpHH\",\n    \"GCapitalForm\",\n    \"Emissions\",\n    \"GDP\",\n    \"GValueAddGov\", # as in NAM, technical relationship\n    \"GValueAddManuf\", # more complicated in NAM, see 2.3.3 and 6.3.1\n    \"GValueAddConstr\" ,\n    \"GValueAddWholesaletrade\"\n  ),\n  independent = c(\n    \"FinConsExpHH + GCapitalForm\",\n    \"\",\n    \"FinConsExpGov + FinConsExpHH\",\n    \"GDP + Export + GValueAddIndus\",\n    \"GValueAddGov + GValueAddAgri + GValueAddIndus + GValueAddConstr + GValueAddWholesaletrade + GValueAddInfocom + GValueAddFinance + GValueAddRealest + GValueAddResearch + GValueAddArts\",\n    \"FinConsExpGov\", # as in NAM, technical relationship\n    \"Export + LabCostManuf\", # NAM uses 'export market indicator' not exports - unclear what this is, NAM uses unit labour cost in NOR manufacturing relative to the foreign price level - here is just total labour cost\n    \"LabCostConstr + BuildingPermits\", # in NAM some form of YFP2J = 0.3JBOL + 0.2JF P N + 0.3JO + 0.3JOIL. Unclear what this is. Using Building Permits instead\n    \"Export + LabCostService\"\n  ))\n```\n\nTo summarise this, we can print out the specification table: \n\n```{r, include=FALSE}\nlibrary(kableExtra, verbose = FALSE)\n```\n\n\n\n```{r, results='asis', echo=FALSE}\nkable(spec) %\u003e% \n  kable_styling() %\u003e% \n  kable_paper()\n```\n\n\nIn order to run this model, we also need a dictionary that translates our model variables to EUROSTAT codes so that the download process can be automated. You can either pass a new dictionary to the model function, or you can use the built in dictionary `osem::dict` (here the first few rows):\n\n\n```{r, results='asis', echo=FALSE}\nosem::dict %\u003e% \n  head() %\u003e% \n  kable() %\u003e% \n  kable_styling() %\u003e% \n  kable_paper()\n```\n\n\u003c!-- The last step in specifying the model is to create a filter list that determines the country that we want to estimate this for and also which unit we need for each variable. This, for the moment, is quite tedious, but this will be improved in the future: --\u003e\n\n\u003c!-- ```{r} --\u003e\n\u003c!-- fa \u003c- list(geo = \"AT\", s_adj = \"SCA\", unit = \"CLV05_MEUR\") --\u003e\n\u003c!-- fb \u003c- list(geo = \"AT\", s_adj = \"SCA\", unit = \"CP_MEUR\") --\u003e\n\u003c!-- fc \u003c- list(geo = \"AT\", unit = \"THS_T\") --\u003e\n\u003c!-- fd \u003c- list(geo = \"AT\", s_adj = \"SCA\") --\u003e\n\u003c!-- fe \u003c- list(geo = \"AT\", s_adj = \"SCA\", unit = \"I15\") --\u003e\n\u003c!-- ff \u003c- list(geo = \"AT\", s_adj = \"SCA\", unit = \"I16\") --\u003e\n\n\u003c!-- filter_list \u003c- list( --\u003e\n\u003c!-- \"P7\" = fa, --\u003e\n\u003c!-- \"YA0\" = fb, --\u003e\n\u003c!-- \"P31_S14_S15\" = fa, --\u003e\n\u003c!-- \"P5G\" = fa, --\u003e\n\u003c!-- \"B1G\" = fa, --\u003e\n\u003c!-- \"P3_S13\" = fa, --\u003e\n\u003c!-- \"P6\" = fa, --\u003e\n\u003c!-- \"GHG\" = fc, --\u003e\n\u003c!-- \"B1GQ\" = fa, --\u003e\n\u003c!-- \"PSQM\" = fe, --\u003e\n\u003c!-- \"LM-LCI-TOT\" = ff --\u003e\n\u003c!-- ) --\u003e\n\u003c!-- ``` --\u003e\n\n\n### Running the model\n\nNow we are ready to run the model with the `run_model()` function:\n\n```{r}\nmodel_result \u003c- run_model(\n  specification = spec,\n  save_to_disk = \"inst/extdata/InputData.xlsx\",\n  primary_source = \"download\",\n  trend = TRUE,\n  saturation.tpval = 0.01,\n  plot = FALSE\n)\n```\n\n```{r}\nmodel_result\n```\n\n\nThe first time that we run this, all data will be downloaded and saved in the folder `data/use/InputData.xlsx`. \n\nThe next time that we run the same model, we can save some time and just load the data from our earlier run: \n```{r, eval=FALSE}\nmodel_result \u003c- run_model(\n  specification = spec,\n  primary_source = \"local\",\n  input = \"inst/extdata/InputData.xlsx\",\n  trend = TRUE,\n  saturation.tpval = 0.01\n)\n```\n\n\n### Forecasting the model\n\nNow that we have run the model, we can forecast the model (here using an AR process for the exogenous values and for 10 time periods):\n\n```{r}\nmodel_forecast \u003c- forecast_model(model_result, n.ahead = 10, exog_fill_method = \"AR\", plot = FALSE)\n```\n\nOnce we are done, we can plot the forecast: \n\n```{r}\nplot(model_forecast, order.as.run = TRUE)\n```\n\n\n\n\n\n\n","funding_links":[],"readme_doi_urls":[],"works":{},"citation_counts":{},"total_citations":0,"keywords_from_contributors":[],"project_url":"https://ost.ecosyste.ms/api/v1/projects/317518","html_url":"https://ost.ecosyste.ms/projects/317518"}