diff --git a/articles/how-to-run-ITHIM.html b/articles/how-to-run-ITHIM.html index dd2b0e63..ddb81030 100644 --- a/articles/how-to-run-ITHIM.html +++ b/articles/how-to-run-ITHIM.html @@ -447,17 +447,306 @@

ithim_objects -

Summary of key results - NEEDS FURTHER WORK!!!!! +

Summaries of key results

There are various scripts which can be used to produce output summary -tables of the results

+tables of the results:

+

The following outputs are produced:

+
+
summary_tables.Rmd +
+

The .Rmd file summarises mode splits, distances and durations +travelled and looks at health outcomes (YLLs and deaths) for the +different air pollution (AP), injury and physical activity (PA) pathways +but also by disease

+

It produces the following output documents:

+ +
+
+
summary_tables_PA_AP.Rmd +
+

This .Rmd file can be used to summarise the PM2.5 personal exposure +levels, the PM2.5 and CO2 concentrations and physical activity levels +for all scenarios including the baseline.

+

It produces the following output documents:

+ +
+
+
injury_tables.Rmd +
+

This .Rmd file can be used to summarise the injury outcomes. It +produces the following output documents:

+
+
+
Producing the .Rmd file outputs +
+

To run the various .Rmd files, you can use the +Create_output_summaries.R script saved in the root +folder.

+
+
+
Shiny App Pivot table +
+

This application allows you to produce Pivot tables for both health +and injury outcomes. The Pivot tables allow you to filter the outcomes +as follows.

+ +
+
+
Producing the Shiny App Pivot table output +
+

To produce these Shiny App Pivot tables, run the function +app.R in the results_app folder. Depending on +whether you want to read in the results from the latest updates on +Github or from your local drive, set

+

github_path <- “https://raw.githubusercontent.com/ITHIM/ITHIM-R/bogota/

+

or

+

github_path <- “../”

+

(Comment out the option you don’t need.)

+
+

Structure of ITHIM-Global Github repository - Bogota branch @@ -469,8 +758,6 @@

Structure o documents, automatically created by Github.

  • R: contains all the R functions written for the ITIHM-R package.

  • -
  • docs: documentation of the ITHIM-R package which -is build automatically.

  • inst/extdata: folder containing the local city specific and the global input files.

  • man: manual containing the various functions @@ -480,6 +767,8 @@

    Structure o runs.

  • results_app: contains the functions used to produce Shiny pivot tables of the results.

  • +
  • vignettes: contains additional documentation +information

  • .Rbuildignore, .gitignore: metadata created by Github.

  • Bogota_InputParameters_vxx.xlsx - file containing the city specific input parameters which needs manual updating.

  • @@ -491,6 +780,8 @@

    Structure o preparing the input parameter files and running the code.

  • ITHIM-R.Rproj: contains the metadata for the ITHIM-R package.

  • +
  • LICENSE: gives information about the licence that has been +applied to this repository

  • NAMESPACE: automatically created by Github.

  • OutputVersionControl.txt: file storing the main run information of the ITHIM-R runs. This is automatically updated, if required, when @@ -498,14 +789,23 @@

    Structure o
  • README: document giving an overview of the ITHIM-R package.

  • _config.yml, _pkgdown.yml: metadata created by Github.

  • -
  • injury_tables.Rmd: xxxxxxxxxxxxxxxxxxxx

  • -
  • license.md: details the license conditions when using this -ITHIM-R package.

  • +
  • injury_tables.Rmd: R markdown document that can be used to create +summary statistics of the injury results

  • +
  • injury_tables_output_version.html: html files containing +injury summary statistics of the respective model runs

  • multi_city_script.R: wrapper function to call all the various functions needed to perform the ITHIM-Global analysis.

  • -
  • summary_tables.Rmd: xxxxxxxx

  • -
  • summary_tables_SHAnumber: xxxxxx

  • -
  • summary_tables_PA: xxxxxxxxxx

  • +
  • summary_tables.Rmd: R markdown document to create summary output +statistics about distance, duration, mode splits and health +outcomes

  • +
  • summary_tables_output_version.html: html files +containing output summaries of the respective model runs

  • +
  • summary_tables_PA.Rmd: R markdown document to create summary +output statistics about air pollution and physical activity +levels

  • +
  • summary_tables_PA_output_version.html: html files +containing air pollution and physical activity output statistics of the +respective model runs

  • diff --git a/index.html b/index.html index 33e13417..8fc9476a 100644 --- a/index.html +++ b/index.html @@ -64,6 +64,7 @@
    +
    @@ -243,7 +244,6 @@

    Developers

    Dev status

    • DOI
    • -
    • R-CMD-check
    diff --git a/pkgdown.yml b/pkgdown.yml index 2c178e02..31308ec0 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -3,7 +3,7 @@ pkgdown: 2.0.7 pkgdown_sha: ~ articles: how-to-run-ITHIM: how-to-run-ITHIM.html -last_built: 2023-11-24T11:35Z +last_built: 2023-12-11T11:29Z urls: reference: https://ithim.github.io/ITHIM-R/reference article: https://ithim.github.io/ITHIM-R/articles diff --git a/reference/create_bogota_scenarios.html b/reference/create_bogota_scenarios.html index c3f25e21..e84a43d8 100644 --- a/reference/create_bogota_scenarios.html +++ b/reference/create_bogota_scenarios.html @@ -116,7 +116,7 @@

    DetailsThe function performs the following steps:

  • read in the local Global Burden of Disease (GBD) data:

    • combine various head and neck cancers, combine myeloid leukemia diseases, combine respiratory diseases at level 2

    • diff --git a/search.json b/search.json index 263de9e9..25a3c31b 100644 --- a/search.json +++ b/search.json @@ -1 +1 @@ -[{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"how-to-run-ithim-global","dir":"Articles","previous_headings":"","what":"How to run ITHIM-Global","title":"How to run ITHIM","text":"guide explain install ITHIM-R package, run model ITHIM-Global using package produce summaries key results. Please note guide written Windows 10 work similarly different operating systems.","code":""},{"path":[]},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"pre-requisites","dir":"Articles","previous_headings":"How to run ITHIM-Global > How to install the ITHIM-R package","what":"Pre-requisites","title":"How to run ITHIM","text":"following programmes need installed ITHIM-R package can used: Git R R Studio","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"cloning-the-github-repository","dir":"Articles","previous_headings":"How to run ITHIM-Global > How to install the ITHIM-R package","what":"Cloning the Github repository","title":"How to run ITHIM","text":"clone (.e. download) ITHIM-R Github repository, open command window, navigate folder want install repository type: ‘git clone https://github.com/ITHIM/ITHIM-R.git’ change Bogota branch guide written, navigate ITHIM-R folder within command window, type: ‘git checkout bogota’ Github repository now downloaded computer working branch set Bogota branch branch documentation refers .","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"installing-the-package-in-rstudio","dir":"Articles","previous_headings":"How to run ITHIM-Global > How to install the ITHIM-R package","what":"Installing the package in RStudio","title":"How to run ITHIM","text":"open ITHIM-R package RStudio double click ITHIM-R.Rproj file inside ITHIM-R folder saved computer. open package RStudio. install ITHIM-R package RStudio, following steps need performed: 1.) Git installed ‘Build’ tab top right hand corner RStudio. Click tab ‘Install’ panel . install ITHIM-R package also likely initially throw error message ‘Exited status 1’ stating R packages needed ITHIM-R package yet installed. install missing packages, click ‘Packages’ tab right hand side middle pane ‘Install’. open pop-window lets type packages still need installing. Click ‘Install’. missing R packages installed, go back ‘Build’ tab install ITHIM-R package . now install smoothly. get newest updates Bogota branch, go ‘Git’ tab RStudio next ‘Build’ tab click ‘Pull’. automatically download newest changes Github. update ITHIM-R package computer, need go ‘Build’ tab click ‘Install’ . (Alternatively, code none input files changed, instead clicking ‘Install’, can also click ‘’ ‘Load ’ option exists , .e. ‘devtools’ installed. faster way update package work minor code changes.) recommended pull install newest updates regular basis. Finally, also install ‘drpa’ package Github (drpa) first installing ‘remotes’ package explained typing remotes::install_github(“meta-analyses/drpa”) RStudio console.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"running-ithim-global","dir":"Articles","previous_headings":"How to run ITHIM-Global","what":"Running ITHIM-Global","title":"How to run ITHIM","text":"run ITHIM-Global using ITHIM-R package various input files parameters need updated first. multi_city_script.R can used call core functions required run ITHIM-R. Note multi_city_script.R set run ITHIM-Global various cities one go required looping cities one one.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"update-input-parameters","dir":"Articles","previous_headings":"How to run ITHIM-Global > Running ITHIM-Global","what":"Update input parameters","title":"How to run ITHIM","text":"several input parameter files need updating running ITIHM-Global: 5 files specific city saved directory city’s name. (See inst/ext/local/bogota example files also information). files need saved inst/extdata/local/‘city’ folder, ‘city’ replaced appropriate city name. file containing various input parameters cities code run saved ITHIM-R folder. branch, file called Bogota_InputParameters_vxx.xlsx, vxx refers latest version number file. contains input parameters Bogota can easily extended contain input parameter values various cities. global datasets - dose-response relationships air pollution pathway e.g.. files can found inst/extdata/global folder usually need changed. (See information.)","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"city-specific-files","dir":"Articles","previous_headings":"How to run ITHIM-Global > Running ITHIM-Global > Update input parameters","what":"City specific files","title":"How to run ITHIM","text":"section covers 5 city specific input files required run model. Travel survey (example trips dataset). table trips taken group people given day. also includes people take trips. data come official travel survey city possible. One row per trip (stage trip) Minimal columns: participant_id, age, sex, trip_mode, trip_duration (trip_distance) columns: stage_mode, stage_duration (stage_distance) Injury events (example injuries dataset). table recorded road-traffic injury (fatality) events city one years. One row per event Minimal columns: victim mode (cas_mode) strike mode (strike_mode) columns: year, cas_age, cas_gender, weight (weight column give number years data exists year information given) Disease burden data (example burden dataset). gives burden disease different diseases. city specific information exists, country level information can used. One row per disease/metric/age/gender combination Minimal rows: Measure (death/YLL); sex_name (Male/Female); age_name (‘x y’); cause_name (disease names); val (value burden); population (number people val corresponds , e.g. population country) Population city (example population dataset). information used scale Burden Disease data city’s population question. One row per demographic group Columns: sex, age, population age column share boundaries age_name Disease burden data, can aggregated Physical activity survey (example physical activity dataset). used represent physical activity levels city taken official physical activity survey city possible. One row per person Columns: sex, age, ltpa_marg_met (total non-occupational PA week)","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"global-file-inputs","dir":"Articles","previous_headings":"How to run ITHIM-Global > Running ITHIM-Global > Update input parameters","what":"Global file inputs","title":"How to run ITHIM","text":"order setup model, need fixed list tables/datasets, : Disease interaction table. table list diseases/causes specific pathway Air Pollution Physical Activity also interaction . Air Pollution Exposure Response Functions (ERFs). give exposure response relationships air pollution (PM2.5) impact health different diseases/causes. collected/cleaned datasets published studies . Physical Activity Dose-Response Functions (DRFs). dose response relationships physical activity impact health different diseases/causes. Similar air pollution, comes published studies. now sits independent R package called drpa. Ventilation rate tables. data can found inst/extdata/global/ventilation_rate details much air inhaled different people model population.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"call-multi_city_script-r","dir":"Articles","previous_headings":"How to run ITHIM-Global > Running ITHIM-Global","what":"Call multi_city_script.R","title":"How to run ITHIM","text":"order run ITHIM-R installed various input files described updated, open multi_city_script.R file within RStudio. (file can found ‘Files’ tab middle pane right hand side). key script run ITIHM-Global constant mode (.e. without sampling input parameters distributions). reads required datasets initialises variables calling run_ithim_setup runs model calling run_ithim. First update parameter values beginning script set-e.g. city / cities script run. several city names given vector, model performs ITHIM-R analysis one city another. parameter values updated, click ‘Source’ model run. produces pop-windows showing plots results giving years life lost scenario required disease outcome.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"results","dir":"Articles","previous_headings":"How to run ITHIM-Global","what":"Results","title":"How to run ITHIM","text":"Apart pop-windows produced end multi_city_script.R give years life lost scenario disease outcome, main file containing model outputs ithim_objects list, saved results/multi_city/io_,‘output_version’,.rds, output_version currently set SHA number (.e. unique identifier) latest update Github can also updated manually user. health effects ITHIM presented years life lost (YLLs) number attributable deaths. background burden data study areas estimated Global Burden Disease studies.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"ithim_objects","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results","what":"ithim_objects","title":"How to run ITHIM","text":"ithim_objects list saved results/multi_city/io_“,output_version,”.rds, output_version currently set SHA number (.e. unique identifier) latest update Github can also updated manually user multi_city_script.R. list contains comprehensive set intermediate final results model run: city contains following data: trip_scen_sets: trip data scenarios synthetic population, .e. population sample built combining physical activity survey travel survey data. dist: total stage mode distances mode scenario (incl. baseline) synthetic population. dur: total stage mode durations mode scenario (incl. baseline) synthetic population. true_dist: distances trip data scaled total distance travelled population city (age ranges considered model ) scenario (incl. baseline) mode transport. inj_distances: true_distances: city population mode distances age category sex considered model. injuries_list: scenarios (incl. baseline) two lists given, one ‘whw’ (-hit-) accidents strike casualty mode known one ‘nov’ (vehicle) accidents strike vehicle involved accident. lists contain casualty (strike) mode combinations age category sex. Furthermore, detail casualty (strike) mode distances travelled entire city population considered model (‘_sum’) just respective age sex category. also detail casualty (strike) mode exponents used injury Poisson model. reg_model: parameterised Poisson injury regression model. injuries_for_model: baseline data containing fatality counts casualty strike mode combinations associated city population distance data. demographic: city population counts age category sex combinations considered model. synth_pop: population extracted physical activity survey giving marginal met leisure physical activity values person. outcomes: mmets: Marginal MET values person synthetic population scenario. pm_conc_pp: PM2.5 concentration attributed person synthetic population scenario (incl. baseline). co2_conc: total CO2 concentration levels mode transport scenario (incl. baseline). ref_injuries: number injury deaths years life lost age sex category reference scenario including upper lower boundaries. hb: health burden (deaths years life lost (YLLs) two separate dataframes) age sex category disease using combined result diseases affected air pollution physical activity levels. pathway_hb: health burden (deaths years life lost (YLLs) two separate dataframes) age sex category disease keeping results diseases affected air pollution physical activity levels separate. whw: number fatalities strike casualty modes -hit---vehicle injuries scenarios (incl. baseline). disease_burden: disease burden diseases baseline scenario (deaths years life lost) age sex categories considered model (input data). PM_emission_inventory: PM emission inventory mode transport baseline scenario (input data). injury_table: summarised total injury counts injury input data age sex category strike casualty mode years (‘weight’ column) given input data ‘whw’ (-hit-) ‘nov’ (--vehicle) accidents. vehicle_inventory: gives speed CO2 PM2.5 emissions inventories vehicles baseline scenario. location: country continent information. new_walk_trips_count: number rail bus trips additional walking stage added model run. Scen_prop: proportion trips mode converted distance category scenario. Ithim_run: information ITHIM-R run name input parameter file, name scenario definition used, reference scenario, scenario names, computation mode (constant sample), timestamp model run, output version number, author model run additional comments particular model run.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"summary-of-key-results---needs-further-work","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results","what":"Summary of key results - NEEDS FURTHER WORK!!!!!","title":"How to run ITHIM","text":"various scripts can used produce output summary tables results call markdown documents output .html files csv files (location stored) results_app - Shiny application","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"structure-of-ithim-global-github-repository---bogota-branch","dir":"Articles","previous_headings":"How to run ITHIM-Global","what":"Structure of ITHIM-Global Github repository - Bogota branch","title":"How to run ITHIM","text":"Github repository Bogota branch structured follows: .github: specifies metadata various documents, automatically created Github. R: contains R functions written ITIHM-R package. docs: documentation ITHIM-R package build automatically. inst/extdata: folder containing local city specific global input files. man: manual containing various functions used within ITHIM-R figures used various documentation documents. also build automatically. results: contains results model runs. results_app: contains functions used produce Shiny pivot tables results. .Rbuildignore, .gitignore: metadata created Github. Bogota_InputParameters_vxx.xlsx - file containing city specific input parameters needs manual updating. Create_output_summaries.R - wrapper script create various output documents. DESCRIPTION: automatically created Github. How_To_Run_ITHIM: document describing various steps needed run ITHIM-Global model downloading installing ITHIM-R preparing input parameter files running code. ITHIM-R.Rproj: contains metadata ITHIM-R package. NAMESPACE: automatically created Github. OutputVersionControl.txt: file storing main run information ITHIM-R runs. automatically updated, required, using multi_city_script.R. README: document giving overview ITHIM-R package. _config.yml, _pkgdown.yml: metadata created Github. injury_tables.Rmd: xxxxxxxxxxxxxxxxxxxx license.md: details license conditions using ITHIM-R package. multi_city_script.R: wrapper function call various functions needed perform ITHIM-Global analysis. summary_tables.Rmd: xxxxxxxx summary_tables_SHAnumber: xxxxxx summary_tables_PA: xxxxxxxxxx","code":""},{"path":"https://ithim.github.io/ITHIM-R/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Ali Abbas. Author, maintainer. Anna Schroeder. Author. Daniel Gil. Author. Lambed Tatah. Author. Rob Johnson. Author.","code":""},{"path":"https://ithim.github.io/ITHIM-R/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Abbas , Schroeder , Gil D, Tatah L, Johnson R (2023). “ithimr: Integrated Transport Health Impact Model.” https://ithim.github.io/ITHIM-R/.","code":"@Misc{ithim_methods_paper, url = {https://ithim.github.io/ITHIM-R/}, author = {Ali Abbas and Anna Schroeder and Daniel Gil and Lambed Tatah and Rob Johnson}, title = {ithimr: Integrated Transport and Health Impact Model}, year = {2023}, }"},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"ithim-r","dir":"","previous_headings":"","what":"Integrated Transport and Health Impact Model","title":"Integrated Transport and Health Impact Model","text":"Development Integrated Transport Health Impact Modelling Tool (ITHIM) R, also known ITHIM version 3.0. Started January 2018. document aims comprehensive record calculations ITHIM pipeline, specifically ITHIM- R package.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"website-for-the-package","dir":"","previous_headings":"","what":"Website for the package","title":"Integrated Transport and Health Impact Model","text":"Using pkgdown package, published documentation ITHIMR package github-pages. Please read : documentation + helpful resources","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"how-to-use-the-package","dir":"","previous_headings":"","what":"How to use the package","title":"Integrated Transport and Health Impact Model","text":"written -guide explains install ITHIM-R package, run ITHIM-Global model using package produce summaries key results. Please read : run ITHIM?","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"citation","dir":"","previous_headings":"How to use the package","what":"Citation","title":"Integrated Transport and Health Impact Model","text":"cite package ‘ithimr’ publications use: Ali Abbas, Anna Schroeder et al. (2023). ithimr: Integrated Transport Health Impact Model. R package version 0.1.2. BibTeX entry LaTeX users @Manual{, title = {ithimr: Integrated Transport Health Impact Model}, author = {Ali Abbas Anna Schroeder Daniel Gil Lambed Tatah Rob Johnson}, year = {2023}, note = {R package version 0.1.2, https://github.com/ITHIM/ITHIM-R}, url = {https://ithim.github.io/ITHIM-R/}, }","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"outline","dir":"","previous_headings":"How to use the package","what":"Outline","title":"Integrated Transport and Health Impact Model","text":"ITHIM performs integrated assessments health effects transport scenarios policies urban national levels. health effects transport policies modelled changes physical activity, road traffic injury risk, exposure fine particulate matter (PM2.5) air pollution CO2 emissions. ITHIM used researchers health transport professionals estimate health impacts scenarios, compare effects travel patterns different locations, model effects interventions. ITHIM works either stand-alone model can linked models (e.g. transport, health, economic) quasi-microsimulation model exposure individual person level, health impacts estimated aggregated age groups, constrained available Global Burden Disease (GBD) data.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"physical-activity","dir":"","previous_headings":"How to use the package > Outline","what":"Physical Activity","title":"Integrated Transport and Health Impact Model","text":"ITHIM models exposure physical activity comparing distributions weekly physical activity different scenarios. Walking, cycling types physical activity combined marginal MET hours per week activity. Outcomes affected physical activity include several cardiovascular diseases, depression, dementia, diabetes, breast cancer colon cancer. ITHIM also models changes health -cause mortality. comparative risk assessment method used estimate changes population physical activity lead changes health burden.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"road-traffic-injuries","dir":"","previous_headings":"How to use the package > Outline","what":"Road traffic injuries","title":"Integrated Transport and Health Impact Model","text":"Road traffic injuries modelled using model based risk, distance speed. Differences risk sex age also taken account. approach allows ITHIM look absolute number injuries risk injury might change different modes transport travel distances modes change.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"air-pollution","dir":"","previous_headings":"How to use the package > Outline","what":"Air Pollution","title":"Integrated Transport and Health Impact Model","text":"Fine particulate matter (PM2.5) air pollution risks calculated general population (background rates) well mode specific rates different transport modes. Exposure changes population based comparison locally generated PM2.5 emissions concentrations study area. current ITHIM version (v3), personal exposure air pollution walking cycling also taken account.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"co2-emissions","dir":"","previous_headings":"How to use the package > Outline","what":"CO2 Emissions","title":"Integrated Transport and Health Impact Model","text":"carbon effects pathway models carbon dioxide (CO2) emissions motorised vehicles. CO2 pathway estimates single metric: total CO2 emissions modelled scenario. method calculate CO2 emissions similar one PM2.5.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"health-outcomes","dir":"","previous_headings":"How to use the package > Outline","what":"Health outcomes","title":"Integrated Transport and Health Impact Model","text":"health effects ITHIM presented years life lost (YLLs) number attributable deaths. Background burden data study areas estimated Global Burden Disease studies.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"data-inputs","dir":"","previous_headings":"How to use the package","what":"Data inputs","title":"Integrated Transport and Health Impact Model","text":"ITHIM-R requires 5 user defined input files csv format, saved directory city’s name. See inst/ext/local/bogota example files. also numerous assumptions can parameterize model.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"file-inputs","dir":"","previous_headings":"How to use the package > Data inputs","what":"File inputs","title":"Integrated Transport and Health Impact Model","text":"section talks files (datasets) required setup run model. two subsections, : case study specific datasets global datasets - dose-response relationship Air Pollution module etc","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"case-study-specifics","dir":"","previous_headings":"How to use the package","what":"Case study specifics","title":"Integrated Transport and Health Impact Model","text":"section covers file inputs (specific city) required run model. Travel survey (example trips dataset). table trips taken group people given day. also includes people take trips. One row per trip (stage trip) Minimal columns: participant_id, age, sex, trip_mode, trip_duration (trip_distance) columns: stage_mode, stage_duration (stage_distance) Injury events (example injuries dataset). table recorded road-traffic injury (fatality) events city one years. One row per event Minimal columns: victim mode (cas_mode) strike mode (strike_mode) columns: year, cas_age, cas_gender, weight (e.g. multiple years combined) Disease burden data (example burden dataset). One row per disease/metric/age/gender combination Minimal rows: Measure (death/YLL); sex_name (Male/Female); age_name (‘x y’); cause_name (disease names); val (value burden); population (number people val corresponds , e.g. population country) Population city (example population dataset). used order scale burden Disease burden data city’s population study One row per demographic group Columns: sex, age, population age column share boundaries age_name Disease burden data, can aggregated Physical activity survey (example physical activity dataset) One row per person Columns: sex, age, ltpa_marg_met (total non-occupational PA week)","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"global-file-inputs","dir":"","previous_headings":"How to use the package","what":"Global file inputs","title":"Integrated Transport and Health Impact Model","text":"order setup model, need fixed list tables/datasets, : Disease interaction table . table list diseases/causes specific module Air Pollution Physical Activity also interaction Air Pollution Exposure Response Functions (ERFs) exposure response relationships air pollution (PM2.5) impact health via diseases/causes. collected/cleaned datasets published studies . Physical Activity Dose-Response Functions (DRFs) dose response relationships physical activity impact health via diseases/causes. Similar AP, comes published studies. now sits independent R package called drpa.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"how-to-run-the-model","dir":"","previous_headings":"","what":"How to run the model?","title":"Integrated Transport and Health Impact Model","text":"setup, reading required datasets initialising variables, call run_ithim_setup() run model, call run_ithim(). function used call run_ithim_setup run_ithim multi_city_script also reads relevant input parameter file.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":null,"dir":"Reference","previous_headings":"","what":"Add strike and casualty distances to injury tables — add_distance_columns","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"function adds strike casualty distance information individual age sex categories aggregated mode -hit-(whw) --vehicle (nov) injury fatality matrices.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"","code":"add_distance_columns( injury_table, mode_names, true_distances_0, dist, scenarios = SCEN )"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"injury_table (list ) data frame(s) edited, contains aggregated fatality counts split whw nov matrices mode_names modes take distances , taken aggregated modes trip data true_distances_0 population distances add injury table dist table used access bus distance - currently used scenarios scenarios process","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"injury tables strike casualty distance information whw nov matrices","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"function performs following steps: set dataframe containing age sex categories found injury table input data add age sex index mode distances define list two elements whw nov indices used true_distances dataframe age sex categories define list (two elements whw nov) matching indices mode_names casualty modes injury table whw matrix create strike mode indices vector matching strike modes injury table strike_modes vector find strike casualty distances modes injury tables sum across age sex categories individual age sex category. modes exist injury tables known distances, mean mode distances known modes used add strike casualty modes whw nov matrices injuries_list output list","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":null,"dir":"Reference","previous_headings":"","what":"Addition of ghost trips — add_ghost_trips","title":"Addition of ghost trips — add_ghost_trips","text":"Add trips get assigned physical activity component, can used proxy vehicle distances.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Addition of ghost trips — add_ghost_trips","text":"","code":"add_ghost_trips( raw_trip_set, trip_mode = \"bus_driver\", distance_ratio = BUS_TO_PASSENGER_RATIO * DISTANCE_SCALAR_PT, reference_mode = \"bus\", prop_male = 1, agerange_male = \"18, 65\", agerange_female = \"18, 65\", scenario = NA )"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Addition of ghost trips — add_ghost_trips","text":"raw_trip_set data frame trips trip_mode mode add distance_ratio fraction reference distance use calculate new mode distance reference_mode name reference mode prop_male proportion newly added mode assigned males agerange_male age range males associated newly added mode agerange_female age range female drivers associated newly added mode scenario name scenario mode added","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Addition of ghost trips — add_ghost_trips","text":"data frame trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Addition of ghost trips — add_ghost_trips","text":"function creates trips based distance relative another (reference) mode, without altering synthetic population. .e. adds trips get assigned physical activity component. function can used add e.g. car_driver bus_driver trips used proxy vehicle distances needed injury CO2 pathways. can also used add truck commercial motorcycle trips included travel surveys. needed injury pathway, newly added trips assigned trips made males females based proportion males given input parameter. age ranges males females taking newly added trips can also defined. new mode distance equally split number people times number trips per people added. used distance new male trips. proportion female trips tends low, distance calculated male trips split 10 using 10th distance male trips, 10 times many female trips added compared low number female trips added distance used male trips. E.g. number people added 100 1 trip per person 98 trips made males, add 98 male trips 10 * 2 = 20 female trips 10th distance male trips. ensure better representation demographics female trips whilst keeping number newly added trips small possible reduce run time model. function performs following steps: set number people (regards males) trips per per person added find total distance reference mode find age ranges male female trips find number male female participants calculate total distance new mode added based reference distance find speed new mode male trips: define distance range male trip added, assume trip equal length add new male trips sampling given age range (add_trips.R) add age distance categories plus scenario name repeat female trips (assuming female trips 10th distance male trips adding proportionally 10 times many female trips)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":null,"dir":"Reference","previous_headings":"","what":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"Function create personal motorcycle trips Chilean cities","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"","code":"add_motorcycle_trips_Chile(raw_trip_set, PROPORTION_MOTORCYCLE_TRIPS)"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"raw_trip_set data frame trips travel survey PROPORTION_MOTORCYCLE_TRIPS proportion trips travel survey added personal motorcycle trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"original trip data additional personal motorcycle trips added","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"function used create personal motorcycle trips Chilean cities motorcycle trips travel surveys. uses input existing travel survey data city proportion travel survey trips added additional new motorcycle trips. Based analysis motorcycle trips travel surveys Santiago, San Antonio, Valparaiso Puerto Montt makes assumptions split male female motorcyclists, number trips per person truncated normal distributions distances ages drivers personal motorcycle trips added. creates new trips assuming trip one stage, .e. trip duration distance equals stage duration distance. function contains following steps: characteristics motorcycle trips added defined set parameters truncated normal distributions male female trip duration set parameters truncated normal distributions male female age ranges find number male female motorcycle trips added divide number new male female trips 2 (= number trips per person) calculate number new participant ids added. number male female trips odd, add additional trip get trip number divisible 2 sample truncated normal distributions find duration new trips (assuming trip consists one stage) sample known age ranges find ages new male female motorcycle trips create new motorcycle trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":null,"dir":"Reference","previous_headings":"","what":"Additional trips for trip data set — add_trips","title":"Additional trips for trip data set — add_trips","text":"Creates data frame given characteristics added existing trip data set.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Additional trips for trip data set — add_trips","text":"","code":"add_trips( trip_ids = 0, new_mode = \"pedestrian\", distance = 1, participant_id = 0, age = 20, sex = \"male\", nTrips = 3, speed = 4.8 )"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Additional trips for trip data set — add_trips","text":"trip_ids ids new trips new_mode mode new trips distance distances sample participant_id participant id new trips age age participant sex sex participant nTrips number trips participant speed speed new trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Additional trips for trip data set — add_trips","text":"data frame trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Additional trips for trip data set — add_trips","text":"function used create new trips certain characteristics can added existing trip data set. input distance given upper limit trip distances added function takes number trips per person (nTrips) random samples 1 input distance given. Age sex participant also sampled range input age sex values. function performs following steps: create nTrips new trips sampling distances, ages sexes","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":null,"dir":"Reference","previous_headings":"","what":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"Add walk 'public transport stages' public transport trips walking stage","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"","code":"add_walk_trips(pt_trips)"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"pt_trips data frame PT trips without walking component","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"list data frames PT trips walk--PT trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"Function add additional walking stages public transport trips walking stage longer trip duration MINIMUM_PT_TIME plus BUS_WALK_TIME / RAIL_WALK_TIME parameters. MINIMUM_PT_TIME global input parameter determines minimum amount time (minutes) person travelling public transport spends public transport stage. BUS_WALK_TIME / RAIL_WALK_TIME parameter city specific input parameter determines duration walk public transport walking stage. function performs following steps: filter PT stages PT trips keep stage longest duration add one 'walk public transport' stage per trip find trip stages need changing add new 'walk pt' stages. duration public transport stage shorter BUS_WALK_TIME / RAIL_WALK_TIME + MINIMUM_PT_TIME, set new stage duration 3. Otherwise, set new stage duration either BUS_WALK_TIME RAIL_WALK_TIME depending trip mode update original public transport stage duration calculate 'walk pt' stage distance using walking speed update original public transport stage distance using respective public transport speed updated duration keep record number newly added 'walk pt' stages update total trip distances update trip distance categories remove 'walk pt' stages zero duration length","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate relative risk given PM exposure level — AP_dose_response","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"Calculate relative risk (RR) person synthetic population disease related air pollution scenario based individual PM exposure levels","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"","code":"AP_dose_response(cause, dose, quantile, confidence_intervals = F)"},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"cause name disease dose vector PM exposure levels individuals given age range scenario quantile quantile dose response functions used output value confidence_intervals logic: whether return confidence intervals","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"data frame relative risks person synthetic population AP related disease scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"function performs following steps: various checks ensure correct PM exposure levels (doses) disease read get lookup table required dose response functions contains dose median RR upper lower confidence interval RR values PM exposure doses synthetic population find needed RR extrapolating dose responses given lookup table confidence interval required, repeat interpolation using upper lower confidence RR values required quantile 0.5, .e. median, find required RR value defining normal function mean median RR value dose standard deviations defined upper lower confidence RR values. Use correct quantile normal function RR value.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ap_dose_response_curve.html","id":null,"dir":"Reference","previous_headings":"","what":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","title":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","text":"Computes RR DR relationship given four parameters PM2.5 exposure","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ap_dose_response_curve.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","text":"","code":"ap_dose_response_curve(pm, alpha, beta, gamma, tmrel)"},{"path":"https://ithim.github.io/ITHIM-R/reference/ap_dose_response_curve.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","text":"pm PM2.5 exposure alpha DR parameter beta DR parameter gamma DR parameter tmrel DR parameter","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ap_dose_response_curve.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","text":"RR","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":null,"dir":"Reference","previous_headings":"","what":"Assign age groups to individuals — assign_age_groups","title":"Assign age groups to individuals — assign_age_groups","text":"Prunes dataset given max min ages, .e. removes entries people ages outside scope model assigns age group labels given age","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assign age groups to individuals — assign_age_groups","text":"","code":"assign_age_groups( dataset, age_category = AGE_CATEGORY, age_lower_bounds = AGE_LOWER_BOUNDS, max_age = MAX_AGE, min_age = AGE_LOWER_BOUNDS[1], age_label = \"age\" )"},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assign age groups to individuals — assign_age_groups","text":"dataset data frame age categories added ages outside model scope removed age_category vector strings giving age categories age_lower_bounds lower boundaries age categories max_age maximum age model min_age minimum age model age_label string label age column","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assign age groups to individuals — assign_age_groups","text":"edited data frame","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Assign age groups to individuals — assign_age_groups","text":"function contains following steps: remove dataset entries ages max min ages missing age information add age categories","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/beta_pointiness.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","title":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","text":"Takes confidence value 0 1 returns parameter beta distribution","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/beta_pointiness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","text":"","code":"beta_pointiness(confidence)"},{"path":"https://ithim.github.io/ITHIM-R/reference/beta_pointiness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","text":"confidence value 0 1 representing confident PA dataset","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/beta_pointiness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","text":"value parametrise beta distribution","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"Combine relative risks (RR) air pollution (AP) physical activity (PA) multiplication diseases affected AP PA","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"","code":"combined_rr_ap_pa(ind_pa, ind_ap, conf_int = FALSE)"},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"ind_pa data frame individual RRs diseases affected PA ind_ap data frame individual RRs diseases affected AP conf_int logic: whether include confidence interval dose response relationships ","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"dataframe giving RR risk AP, PA combined AP PA exposure levels every person synthetic population scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"function performs following steps: join ap pa relative risk datasets loop disease outcomes affected PA AP: scenario multiply relative risks PA AP store new column confidence intervals required, multiply upper lower RR AP PA respectively wherever possible, otherwise use given median RR values instead","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"Applies PIF calculated relative risks (RRs) current observed health burden Global Burden Disease data generate scenario health burdens","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"","code":"combine_health_and_pif(pif_values, hc = DISEASE_BURDEN)"},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"pif_values vector values PIFs age sex categories hc data frame current burden disease","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"estimated scenario burden disease age sex categories","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"function performs following steps: current observed health burden particular disease multiplied PIF, .e change fraction disease expected current scenario compared reference scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/complete_trip_distance_duration.html","id":null,"dir":"Reference","previous_headings":"","what":"Add missing trip information — complete_trip_distance_duration","title":"Add missing trip information — complete_trip_distance_duration","text":"Adds missing trip information stage duration stage distance.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/complete_trip_distance_duration.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add missing trip information — complete_trip_distance_duration","text":"","code":"complete_trip_distance_duration()"},{"path":"https://ithim.github.io/ITHIM-R/reference/complete_trip_distance_duration.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add missing trip information — complete_trip_distance_duration","text":"function performs following steps calculate stage duration stage distance. Note need least trip duration stage distance stage stage duration: add speed column stage duration: calculate stage duration stage distance given using mode speeds stage duration sum 'NA' (.e. stage distances exist stage distances ): trip duration exists sum NA, find trip ids 'NA' stage duration replace stage duration trip duration divided number stages particular trip remove remaining trips 'NA' stage distance update stage speed column stage distance: calculate stage distance using stage duration mode speeds trip distance: calculate trip distance summing stage distances","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":null,"dir":"Reference","previous_headings":"","what":"Create scenarios for Bogota — create_bogota_scenarios","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"Creates three scenarios one, mode share given mode elevated set percentage total trips. scenario modes cycle, car, bus.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"","code":"create_bogota_scenarios(trip_set)"},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"trip_set data frame, baseline scenario trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"list baseline scenario three scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"function creates three scenarios increasing mode shares cycling, car bus pre-defined percentage total mode shares. assume : total number trips remains trips modes (apart truck, bus driver, car driver commercial motorcycle trips remain unchanged - least initially) converted mode question; truck commercial motorcycle trips remain constant across scenarios whilst bus driver car driver trips updated based new total distance car bus trips increase mode share conducted scenario percentage share across three distance bands mode increased preserved, .e. 10 band 0-2km increasing cycling mode share x still 10 scenario always convert question, independently original overall mode share mode. .e. e.g. 1 5 car scenario 55 total trips. preserve proportion trips distance band. E.g. 20 trips distance band 0-2km, scenario 20 trips still distance band 0-2km. Example: Assume two distance bands B 80 cycling trips lie distance band remaining 20 band B. Assume 60 band B. Assume want increase cycling mode share 5 , need convert 5 cycling trips 5 cycling trips. Overall, leads increase (5 cycling trips, whilst preserving cycling mode shares 80 band 20 distance band 40 preserved. function performs following steps: overall mode shares cycle, car bus modes across three distance categories defined trip data extract trip information, calculate total number trips find proportion trips distance category find proportion trips converted mode, scenario distance category define modes changeable (least initially) scenarios divide trip data set modes can changed another set trips whose modes changed split changeable trips also trips distance band create scenarios loop scenarios: loop distance band: find changeable trips mode increased count number trips made mode increased bus scenario aim increase public transport trips, .e. find changeable trips made bus rail count number trips made bus rail find number total trips like convert number trips changeable equals number trips converted, changeable trips converted mode question trips changeable want change, sample number trips change changeable trip ids trips converted changeable trips, convert many trips possible create warning message convert required trips new mode question add trips across distance bands add non-changeable trips update bus_driver car_driver trips create list containing trips scenario elements","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":null,"dir":"Reference","previous_headings":"","what":"Create global scenarios — create_global_scenarios","title":"Create global scenarios — create_global_scenarios","text":"Creates four scenarios one, mode share given mode elevated set percentage total trips. scenario modes cycle, car, bus motorcycle.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create global scenarios — create_global_scenarios","text":"","code":"create_global_scenarios(trip_set)"},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create global scenarios — create_global_scenarios","text":"trip_set data frame, baseline scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create global scenarios — create_global_scenarios","text":"list baseline scenario four mode scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create global scenarios — create_global_scenarios","text":"function creates four scenarios increasing mode shares cycling, car, bus motorcycle pre-defined percentage total mode shares. assume : total number trips remains trips modes (apart truck, bus driver, car driver commercial motorcycle trips remain unchanged - least initially) converted mode question; truck commercial motorcycle trips remain constant across scenarios whilst bus driver car driver trips updated based new total distance car bus trips increase mode share conducted scenario percentage share across three distance bands mode increased preserved, .e. 10 band 0-2km increasing cycling mode share x still 10 mean mode split across 28 cities (Antofagasta, Arica, Belo Horizonte, Bogota, Buenos Aires, Cali, Copiapo, Coquimbo / La Serena, Gran Valparaiso, Iquique / Alto Hospicio, Medellin, Mexico City, Montevideo, Osorno, Puerto Montt, San Antonio, Santiago, Sao Paulo, Temuco / Padre las Casas, Valdivia, Accra, Bangalore, Cape Town, Delhi, Vizag, Kisumu, Nairobi Port Louis) baseline mode split mode. scenario always convert question, independently original overall mode share mode. .e. e.g. 1 5 car scenario 55 total trips. preserve proportion trips distance band. E.g. 20 trips distance band 0-2km, scenario 20 trips still distance band 0-2km. proportions calculated city individually. Example: Assume two distance bands B 80 cycling trips lie distance band remaining 20 band B. Assume 60 band B. Assume want increase cycling mode share 5 , need convert 5 cycling trips 5 cycling trips. Overall, leads increase (5 cycling trips, whilst preserving cycling mode shares 80 band 20 distance band 40 preserved. function performs following steps: overall mode shares cycle, car, bus motorcycle modes across three distance categories defined trip data extract trip information, calculate total number trips find proportion trips distance category find proportion trips converted mode, scenario distance category define modes changeable (least initially) scenarios divide trip data set modes can changed another set trips whose modes changed split changeable trips also trips distance band create scenarios loop scenarios, .e. 4 different modes: loop distance band: find changeable trips mode increased count number trips made mode increased bus scenario aim increase public transport trips, .e. find changeable trips made bus rail count number trips made bus rail find number total trips like convert number trips changeable equals number trips converted, changeable trips converted mode question trips changeable want change, sample number trips change changeable trip ids trips converted changeable trips, convert many trips possible create warning message convert required trips new mode question add trips across distance bands add non-changeable trips update bus_driver car_driver trips create list containing trips scenario elements","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates synthetic population — create_synth_pop","title":"Creates synthetic population — create_synth_pop","text":"Creates synthetic population matching individuals trip set individuals physical activity (PA) dataset","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates synthetic population — create_synth_pop","text":"","code":"create_synth_pop(raw_trip_set)"},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates synthetic population — create_synth_pop","text":"raw_trip_set data frame raw trips taken, bus_driver, new motorcycle truck trips already added","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates synthetic population — create_synth_pop","text":"synthetic population trip set pruned","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creates synthetic population — create_synth_pop","text":"function performs following steps: adds age category trip physical activity datasets calling assign_age_groups.R match people trip data people physical activity dataset: create synthetic population taking unique participant ids together age gender information trip data (including bus driver, truck, car driver commercial motorcycle trips) assign non-occupational physical activity MMET values synthetic population, following steps performed: sex age category, find proportion people zero non-occupational MMET values also find list people non-zero MMET values BACKGROUND_PA_CONFIDENCE < 1 calling value information script, .e. input values sampled distributions, beta distribution built proportion people zero work leisure MMET values sampled using known proportion mean distribution sample replacement vector 0 MMET values vector non-zero MMET values ( people non-zero work leisure MMET values) using proportion people zero work leisure MMET values assign sampled MMET values synthetic population remove participants trip stage modes Vehicle inventory","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":null,"dir":"Reference","previous_headings":"","what":"Function for Dirichlet parameters — dirichlet_pointiness","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"Function map confidence value parameterisation Dirichlet distribution.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"","code":"dirichlet_pointiness(confidence)"},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"confidence value 0 1","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"parameterisation","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"Note parameterisation somewhat arbitrary seems work visual inspection.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"Computes exposures (distances) mode parameterise injury regression model, computed Poisson model used ITHIM-Global model predict injury fatalities later stage","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"","code":"distances_for_injury_function(journeys, dist)"},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"journeys data frame total distance (total population) age sex category scenario dist table (total population) distances per mode","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"true_distances (mode distances age sex walking modes car modes combined bus drivers added relevant), injuries_list (list strike, casualty, age, sex mode distance combinations baseline scenarios), reg_model (parameterised Poisson regression model), injuries_for_model (baseline data containing injury counts casualty strike mode combinations associated distance data)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"function uses distance data individual injury fatality data perform following steps parameterise Poisson injury regression model: stage modes aggregated walk related stages (walk walk pt) mode (walk), similarly car related journeys bus drivers added bus journeys (relevant) accurately represent people bus Takes Baseline injury tables, split -hit (whw) --vehicle (nov) parts, adds total population distances strike casualty mode (add_distance_columns.R). Distances added age gender category exists information injury counts (injuries_for_model dataframe). exists fatality casualty strike mode age sex category mode distance age sex category, fatalities distances aggregated strike casualty mode. , aggregation still exist fatalities either casualty strike mode distance missing, fatalities removed predict injury counts zero distances. However, happen total distances modes (possibly inferred modes) appear injury data. - data used parameterise Poisson injury model. new list (injuries_list) created containing strike casualty mode age sex combinations together strike casualty mode distances (add_distance_columns()) baseline scenarios. whw model, strike mode casualty pairs strike mode equals casualty mode removed fatalities combinations already added nov matrix. Combinations non-zero strike casualty mode distance also removed. list later used injuries_function_2() function predict fatality counts using Poisson injury regression model. casualty strike mode exponents used account safety number effect added injuries_for_model injuries_list. best possible regression model built using Baseline injury counts distances (injuries_for_model) standard errors small wherever possible. Strike casualty mode pairs cas mode = strike mode removed still exist removed ithim_load_data.R function. Two different forms whw nov matrices defined, taking account age sex information exists. standard errors newly built regression models checked large data aggregated age sex yet, data aggregated new Poisson regression model build. standard errors still large aggregation, message printed screen warning standard errors large.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":null,"dir":"Reference","previous_headings":"","what":"Get distances and duration summaries by mode — dist_dur_tbls","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"Summaries total distances durations spent travelling per mode per scenario, synthetic population","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"","code":"dist_dur_tbls(trip_scen_sets)"},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"trip_scen_sets list synthetic trip sets scenario including baseline","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"list table (total) distances durations per mode per scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"function performs following steps: loop scenarios (incl Baseline): using trip data, sum across distances stage mode get total distance mode scenario synthetic population sum across duration stage mode get total duration mode scenario 'walk_to_pt' stages exist, add pedestrian stages duration distance create one dataframe containing total distances mode scenario create one dataframe containing total duration mode scenario remove 'walk_to_pt' stages added pedestrian stages update bus car driver distances duration scenarios using ratio bus/car bus_driver/car_driver baseline scenario ( redundant GLOBAL, BOGOTA, AFRICA_INDIA LATAM scenario definitions bus car driver distances already updated scenario creation)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":null,"dir":"Reference","previous_headings":"","what":"Get relative risk for diseases given PM exposure — gen_ap_rr","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"Computes relative risk (RR) individuals synthetic population disease given PM exposure","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"","code":"gen_ap_rr(pm_conc_pp)"},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"pm_conc_pp individual PM exposures person synthetic population","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"data frame relative risks per person disease scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"function performs following steps: minimum ages age group corresponding disease risks assigned individuals synthetic population (added PM exposure levels) loop diseases related PM pollution: depending disease (disease different relative risks depending age individual) loop disease specific age groups (just one age group disease) set quantile value dose response curves extracted. running constant mode, quantile usually set 0.5, .e. median dose response curves. running sample mode, quantile can set sampled distribution input parameters. loop scenarios: assign relative risk given disease, age group, quantile scenario relevant people synthetic population calling AP_dose_response() function","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":null,"dir":"Reference","previous_headings":"","what":"Get relative risk for diseases given mMETs — gen_pa_rr","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"Computes relative risks (RR) individuals synthetic population disease given mMETs (PA exposure)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"","code":"gen_pa_rr(mmets_pp, conf_int = F)"},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"mmets_pp individual mMETs","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"data frame relative risks per person per disease","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"function performs following steps: loop diseases related physical activity levels: set quantile value dose response curves extracted. running constant mode, quantile usually set 0.5, .e. median dose response curves. running sample mode, quantile can set sampled distribution input parameters. create one vector containing mMET values scenarios assign relative risk given disease quantile given mMET values people synthetic population scenarios calling drpa::dose_response function extract RR scenario vector containing RR scenarios confidence intervals required, also extract RR upper lower confidence values scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":null,"dir":"Reference","previous_headings":"","what":"Find population distances by mode for entire population — get_all_distances","title":"Find population distances by mode for entire population — get_all_distances","text":"Function find distances travelled age, sex, scenario mode entire population rather just synthetic population.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find population distances by mode for entire population — get_all_distances","text":"","code":"get_all_distances(ithim_object)"},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find population distances by mode for entire population — get_all_distances","text":"ithim_object list containing city specific information including synthetic trip set","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find population distances by mode for entire population — get_all_distances","text":"ithim_object , additional total population distance mode scenario, distances injury pathway plus parameterised Poisson injury regression model","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find population distances by mode for entire population — get_all_distances","text":"function performs following steps: generate distance duration matrices age, sex, mode scenario ithim_object$trip_scen_sets synthetic population calling dist_dur_tbls() function find total mode distances scenario scale distance travelled entire population using demographic information city order scale distances age, sex, mode scenario entire population, proportion distances travelled age, sex, mode scenario combination synthetic population total distances mode scenario synthetic population found. total population distances mode multiplied proportions find total population distances travelled mode age sex category. distances_for_injury_function() function called creates list inj_distances added ithim_object containing following matrices: true_distances (population mode distances age sex walking modes car modes combined bus drivers added relevant) injuries_list (list strike, casualty, age, sex mode distance combinations baseline scenarios, used predict fatalities later model run) reg_model (parameterised Poisson injury regression model) injuries_for_model (baseline data containing injury counts casualty strike mode combinations associated distance data)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":null,"dir":"Reference","previous_headings":"","what":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"Computes mode shares different distance categories maximum mode share specified mode types specified distance categories across specified (stored) cities. Used max mode share scenario generation.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"","code":"get_scenario_settings( cities = c(\"accra\", \"bangalore\", \"belo_horizonte\", \"bogota\", \"buenos_aires\", \"cape_town\", \"delhi\", \"mexico_city\", \"santiago\", \"sao_paulo\", \"vizag\"), modes = c(\"pedestrian\", \"cycle\", \"car\", \"motorcycle\", \"bus\"), distances = c(\"0-2 km\", \"2-6 km\", \"6+ km\"), speeds = list(bus = 8.1, bus_driver = 8.1, minibus = 8.1, minibus_driver = 8.1, car = 13.8, car_driver = 13.8, taxi = 13.8, pedestrian = 2.5, walk_to_pt = 2.5, cycle = 7.2, motorcycle = 15.2, truck = 8.1, van = 13.8, subway = 18.1, rail = 21.9, auto_rickshaw = 4, shared_auto = 13.8, shared_taxi = 13.8, cycle_rickshaw = 4, other = 9.1) )"},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"cities cities use modes modes use distances distance categories use speeds named list mode speeds (applied cities)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"data frame maximum proportions mode distance category","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"function performs following steps: define minimum distances distance category loop pre-defined cities: read trip data get data correct format assign distance categories distance category pre-defined mode find proportional modal share (distance category, proportion modes adds 100 rail trips exist, added proportion bus trips get one value public transport find maximum mode shares mode distance category city print one table showing mode shares distance category","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_synthetic_from_trips.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate synthetic population from trip data — get_synthetic_from_trips","title":"Generate synthetic population from trip data — get_synthetic_from_trips","text":"Sequence functions set synthetic population, synthetic trips, scenarios.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_synthetic_from_trips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate synthetic population from trip data — get_synthetic_from_trips","text":"","code":"get_synthetic_from_trips()"},{"path":"https://ithim.github.io/ITHIM-R/reference/get_synthetic_from_trips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate synthetic population from trip data — get_synthetic_from_trips","text":"data frame synthetic trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_synthetic_from_trips.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate synthetic population from trip data — get_synthetic_from_trips","text":"function performs following steps: columns TRIP_SET put correct order multiply trip distances, stage distances, durations day_to_week scalar divide 7 get distances durations 'average' day week add bus_driver truck trips required (add_ghost_trips()) add personal motorcycle trips needed (call appropriate function) add commercial motorcycle trips required (add_ghost_trips()) build synthetic population creating data set contains (non-zero) participant ids demographic information trip data set adds work leisure MMET values calling create_synth_pop() (non travel entries trip data set also removed) adds car driver trips required (add_ghost_trips()) call ithim_setup_baseline_scenario() function get baseline data correct format creation different scenarios create required scenarios calling appropriate function add walk pt trips combine scenarios one dataframe calling walk_to_pt_and_combine_scen() function","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute health burden — health_burden","title":"Compute health burden — health_burden","text":"Compute health burden population scenarios given relative risks diseases","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute health burden — health_burden","text":"","code":"health_burden(ind_ap_pa, conf_int = F, combined_AP_PA = T)"},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute health burden — health_burden","text":"ind_ap_pa dataframe individuals' relative risks diseases conf_int=F logic: whether include confidence interval dose response relationships combined_AP_PA=T logic: whether combine two exposure pathways (AP PA) compute independently","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute health burden — health_burden","text":"list dataframes: one deaths per disease per demographic group scenario, likewise YLLs","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute health burden — health_burden","text":"function performs following steps: get demographic disease burden (subset Global Burden Disease dataset) data correct formats join two datasets scale burden data CHRONIC_DISEASE_SCALAR account bias data split dataframe two dataframes, one deaths one years life lost (YLLs) add demographic index (age sex category) dataframe containing individual relative risk different diseases set reference scenarios iterate disease outcomes: define column names loop either 1 2 pathways depending whether PA AP affecting disease whether AP PA pathways combined : extract relevant burden disease specific scenario YLLs deaths find sum relative risks (RR) specific disease age sex category reference scenario loop non-reference scenarios: define column names find sum relative risks (RR) specific disease age sex category non-reference scenario calculate PIF (potential impact fraction), .e proportional change sum relative risks reference non-reference scenario age sex category calculate health burden (deaths ylls) non-reference scenario compared reference scenario multiplying current burden disease PIF (combine_health_and_pif.R) confidence intervals required, loop upper lower confidence interval limits calculate health burden deaths YLLs using upper lower confidence relative risks. upper lower relative risk values exist, use median value instead","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict injuries — injuries_function_2","title":"Predict injuries — injuries_function_2","text":"Predict injuries baseline scenarios based Poisson regression model fitted baseline fatality counts distances","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict injuries — injuries_function_2","text":"","code":"injuries_function_2( true_distances, injuries_list, reg_model, constant_mode = F )"},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict injuries — injuries_function_2","text":"true_distances data frame containing population distances scenario injuries_list list dataframes set scenario specific information supply regression model prediction reg_model Poisson injury regression model constant_mode whether constant (vs sampling) mode","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predict injuries — injuries_function_2","text":"injuries2 - dataframe containing predicted fatality counts casualty mode age sex scenario, plus confidence interval limits constant mode whw_temp - list containing fatality predictions casualty strike mode pair split whw nov matrices scenario. Upper lower confidence interval predictions also included constant mode","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Predict injuries — injuries_function_2","text":"function uses Poisson regression model built distances_for_injury_function() predict fatality counts Baseline scenarios. performs following steps: create injuries data frame containing distances travelled mode, age, sex scenario predict fatalities strike casualty mode combination, age sex category scenario (incl Baseline). sample mode set 'constant' ('sample'), also predict upper lower confidence interval boundaries create whw_temp list containing total predicted fatality counts casualty strike mode pair scenario split whw nov matrices , constant mode also give upper lower confidence interval limit predictions create injuries2 data frame containing total predicted fatality counts casualty mode age sex scenario. dataframe also contains total death per age sex category , constant mode upper lower total death predictions confidence interval.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":null,"dir":"Reference","previous_headings":"","what":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"Calculate YLL burden death burden injury based ratio GBD data.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"","code":"injury_death_to_yll(injuries)"},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"injuries data frame injury deaths age sex category scenario incl. baseline","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"list injury deaths YLLs (given differences reference scenario) plus values reference scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"function performs following steps: join estimated injury deaths global burden disease (GBD) injury data age sex multiply estimated injury deaths yll injury death ratio GBD data predict YLL estimated injury deaths extract create matrices deaths ylls one column scenario create dataframe ylls deaths reference scenario create dataframe B showing differences deaths yll non-reference scenario reference scenario confidence intervals required: create dataframe ylls deaths reference scenario using lower upper relative risk boundary values create dataframe showing differences deaths yll non-reference scenario reference scenario using lower upper relative risk boundary values add confidence upper lower interval boundary values two output dataframes B","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":null,"dir":"Reference","previous_headings":"","what":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"Ordered set computations part ITHIM-Global calculates required output parameters","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"","code":"ithim_calculation_sequence(ithim_object, seed = 1)"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"ithim_object name disease seed","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"ithim_object - list items making ithim result","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"function performs following steps: extract lists variables ithim_object list air pollution pathway: calculate PM2.5 exposure person synthetic population PM2.5 emissions mode scenario (scenario_pm_calculations()) calculate CO2 emissions mode scenario (scenario_co2_calculations()) assign relative risk person synthetic population disease related PM pollution scenario based individual PM exposure levels (gen_ap_rr()) physical activity pathway: calculate total mMETs person synthetic population (total_mmet()) assign relative risk person synthetic population disease related physical activity levels scenario based individual mMET values (gen_pa_rr()) physical activity air pollution combined: combine PA AP datasets joining two datasets. disease affected PA AP calculate joined relative risk multiplying PA AP relative risks (combined_rr_ap_pa()) calculate health burden (Yll deaths) disease age sex category (health_burden()): calculate health burden (Yll deaths) disease age sex category. Combine AP PA pathways diseases affected AP PA running constant mode also calculate health burden AP PA pathways separately injury pathway: estimate injury deaths baseline scenario age sex category, also estimate total injury deaths counts -hit---vehicle matrices casualty (strike) mode baseline scenario (injuries_function2()) running constant mode include upper lower confidence intervals calculate years life lost injury deaths (injury_death_to_yll()) combine pathways using outputs 3. 4.: combine AP, PA injury health burden data ylls deaths (join_hb_and_injury()) diseases, injuries scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_load_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Load data for model and prepare input data for model — ithim_load_data","title":"Load data for model and prepare input data for model — ithim_load_data","text":"Loads processes data files using city specific local data global data. Processes input data ready ITHIM-Global model run. Writes objects global environment.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_load_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load data for model and prepare input data for model — ithim_load_data","text":"","code":"ithim_load_data( speeds = list(bus = 8.1, bus_driver = 8.1, minibus = 8.1, minibus_driver = 8.1, car = 13.8, car_driver = 13.8, taxi = 13.8, pedestrian = 2.5, walk_to_pt = 2.5, cycle = 7.2, motorcycle = 15.2, truck = 8.1, van = 13.8, subway = 18.1, rail = 21.9, auto_rickshaw = 4, shared_auto = 13.8, shared_taxi = 13.8, cycle_rickshaw = 4, other = 9.1) )"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_load_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load data for model and prepare input data for model — ithim_load_data","text":"speeds named list mode speeds","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_load_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Load data for model and prepare input data for model — ithim_load_data","text":"function performs following steps load process input data: find path ithimr package global local data can found check whether drpa package installed read Global Burden Disease data country read city specific trip data: set missing stage trip information known stage trip information, e.g. stage duration missing trip duration known set stage duration trip duration ensure stage modes trip modes consist set keywords, replace mode names key words, e.g. replace 'train' 'rail' remove trips age sex 'NA' Rename pedestrian stage modes non-pedestrian trips 'pedestrian' 'walk_to_pt' remove walk_to_pt stages belong either rail bus trip modes (call get_scenario_settings() using max_mode_share_scenario) read local Global Burden Disease (GBD) data: combine various head neck cancers, combine myeloid leukemia diseases, combine respiratory diseases level 2 adjust rectum cancer combined colon rectum cancer burden read local demographic data: find / re-define max min ages based max min ages trip data, demographic data max min ages considered model remove population data outside max min ages find proportion total population considered model total population get age-category details population data, ages max min ages removed extract diseases plus road injures GBD data, update format max min ages entry compute proportion injuries age range considered model GBD data, proportion applied injury datasets without age sex information remove ages outside age ranges considered model GBD_data create burden_of_disease dataframe GBD_data changing layout GBD_data: add city specific population data add country specific disease rate GBD data, ie. proportion number people country disease population country age sex category using country disease rate calculate city population affected disease using burden_of_disease data (now called DISEASE_BURDEN), calculate ratio YLL death age sex category road_injuries data read city specific road injury data: Set 'weight' column unique number years injury data exists (column already exist) strike mode equals casualty mode, set strike mode 'nov' (vehicle) call set_injury_contingency.R function set tables WHW (hit ) NOV (vehicle) fatalities","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":null,"dir":"Reference","previous_headings":"","what":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"Set baseline scenario ready scenario development","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"","code":"ithim_setup_baseline_scenario(trip_set)"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"trip_set data frame trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"trip_set baseline scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"function performs following steps trip set data: add distance categories add scenario='baseline' column","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Set parameters for ITHIM-Global run — ithim_setup_parameters","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"Function set parameters either using constant value sampling pre-defined function","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"","code":"ithim_setup_parameters( NSAMPLES = 1, BUS_WALK_TIME = 16, RAIL_WALK_TIME = 12.5, CYCLING_MET = 6.8, WALKING_MET = 3.5, PASSENGER_MET = 1.3, CAR_DRIVER_MET = 2.5, MOTORCYCLIST_MET = 2.8, SEDENTARY_ACTIVITY_MET = 1.3, LIGHT_ACTIVITY_MET = 1.3, MODERATE_PA_MET = 4, VIGOROUS_PA_MET = 8, PM_CONC_BASE = 12.69, PM_TRANS_SHARE = 0.42, PA_DOSE_RESPONSE_QUANTILE = F, AP_DOSE_RESPONSE_QUANTILE = F, BACKGROUND_PA_SCALAR = 1, BACKGROUND_PA_CONFIDENCE = 1, INJURY_REPORTING_RATE = 1, CHRONIC_DISEASE_SCALAR = 1, DAY_TO_WEEK_TRAVEL_SCALAR = 7, SIN_EXPONENT_SUM = 2, CASUALTY_EXPONENT_FRACTION = 0.5, SIN_EXPONENT_SUM_NOV = 1, SIN_EXPONENT_SUM_CYCLE = 2, CASUALTY_EXPONENT_FRACTION_CYCLE = 0.5, SIN_EXPONENT_SUM_PED = 2, CASUALTY_EXPONENT_FRACTION_PED = 0.5, SIN_EXPONENT_SUM_VEH = 2, CASUALTY_EXPONENT_FRACTION_VEH = 0.5, BUS_TO_PASSENGER_RATIO = 0.0389, CAR_OCCUPANCY_RATIO = 0.625, TRUCK_TO_CAR_RATIO = 0.3, FLEET_TO_MOTORCYCLE_RATIO = 0.441, PROPORTION_MOTORCYCLE_TRIPS = 0, PM_EMISSION_INVENTORY_CONFIDENCE = 1, CO2_EMISSION_INVENTORY_CONFIDENCE = 1, DISTANCE_SCALAR_CAR_TAXI = 1, DISTANCE_SCALAR_WALKING = 1, DISTANCE_SCALAR_PT = 1, DISTANCE_SCALAR_CYCLING = 1, DISTANCE_SCALAR_MOTORCYCLE = 1, BUS_DRIVER_PROP_MALE = 0.98, BUS_DRIVER_MALE_AGERANGE = \"19, 65\", BUS_DRIVER_FEMALE_AGERANGE = \"19, 65\", TRUCK_DRIVER_PROP_MALE = 0.98, TRUCK_DRIVER_MALE_AGERANGE = \"18, 65\", TRUCK_DRIVER_FEMALE_AGERANGE = \"18, 65\", COMMERCIAL_MBIKE_PROP_MALE = 0.99, COMMERCIAL_MBIKE_MALE_AGERANGE = \"18, 65\", COMMERCIAL_MBIKE_FEMALE_AGERANGE = \"18, 65\", MINIMUM_PT_TIME = 3, MODERATE_PA_CONTRIBUTION = 0.5, CALL_INDIVIDUAL_SIN = F, SCENARIO_NAME = \"GLOBAL\", SCENARIO_INCREASE = 0.05 )"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"NSAMPLES constant integer: number samples take BUS_WALK_TIME lognormal parameter: duration walk bus stage RAIL_WALK_TIME lognormal parameter: duration walk rail stage CYCLING_MET lognormal parameter: METs cycling WALKING_MET lognormal parameter: METs walking PASSENGER_MET lognormal parameter: MET value associated passenger public transport CAR_DRIVER_MET lognormal parameter: MET value associated car driver MOTORCYCLIST_MET lognormal parameter: MET value associated motorcyclist SEDENTARY_ACTIVITY_MET lognormal parameter: MET value associated sedentary activity LIGHT_ACTIVITY_MET lognormal parameter: MET value associated light activity MODERATE_PA_MET lognormal parameter: MET value associated moderate activity VIGOROUS_PA_MET lognormal parameter: MET value associated vigorous activity PM_CONC_BASE lognormal parameter: background PM2.5 concentration PM_TRANS_SHARE beta parameter: fraction background PM2.5 attributable transport PA_DOSE_RESPONSE_QUANTILE logic: whether sample physical activity relative risk dose response functions AP_DOSE_RESPONSE_QUANTILE logic: whether sample air pollution relative risk dose response functions BACKGROUND_PA_SCALAR lognormal parameter: reporting scalar physical activity correct bias data BACKGROUND_PA_CONFIDENCE beta parameter: confidence accuracy zero non-travel physical activity levels INJURY_REPORTING_RATE lognormal parameter: rate injury fatality reporting CHRONIC_DISEASE_SCALAR lognormal parameter: scalar background disease rates adjust bias GBD data DAY_TO_WEEK_TRAVEL_SCALAR beta parameter: rate scaling travel one day one week - CURRENTLY used constant (using beta parameter need considerations) SIN_EXPONENT_SUM lognormal parameter: linearity injuries respect two modes. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION beta parameter: casualty exponent contribution SIN_EXPONENT_SUM SIN_EXPONENT_SUM_NOV lognormal parameter: linearity injuries respect two modes strike mode = NOV. SIN_EXPONENT_SUM=2 means safety numbers SIN_EXPONENT_SUM_CYCLE lognormal parameter: linearity injuries respect two modes victim mode = cycle. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_CYCLE beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_CYCLE victim mode = cycle SIN_EXPONENT_SUM_PED lognormal parameter: linearity injuries respect two modes victim mode = pedestrian. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_PED beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_PED victim mode = pedestrian SIN_EXPONENT_SUM_VEH lognormal parameter: linearity injuries respect two modes victim mode = vehicle. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_VEH beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_VEH victim mode = vehicle BUS_TO_PASSENGER_RATIO beta parameter: number buses per passenger CAR_OCCUPANCY_RATIO beta parameter: number people per car (including driver) TRUCK_TO_CAR_RATIO beta parameter: proportion truck car vehicle km travelled FLEET_TO_MOTORCYCLE_RATIO beta parameter: amount motorcycle trips added commercial trips PROPORTION_MOTORCYCLE_TRIPS beta parameter: proportion trips added personal motorcycle trips PM_EMISSION_INVENTORY_CONFIDENCE beta parameter: confidence accuracy PM emission inventory CO2_EMISSION_INVENTORY_CONFIDENCE beta parameter: confidence accuracy CO2 emission inventory DISTANCE_SCALAR_CAR_TAXI lognormal parameter: scalar adjust bias car distance travelled DISTANCE_SCALAR_WALKING lognormal parameter: scalar adjust bias walking distance travelled DISTANCE_SCALAR_PT lognormal parameter: scalar adjust bias PT distance travelled DISTANCE_SCALAR_CYCLING lognormal parameter: scalar adjust bias cycling distance travelled DISTANCE_SCALAR_MOTORCYCLE lognormal parameter: scalar adjust biase motorcycle distance travelled BUS_DRIVER_PROP_MALE scalar: proportion bus drivers male BUS_DRIVER_MALE_AGERANGE character: age range male bus drivers BUS_DRIVER_FEMALE_AGERANGE character: age range female bus drivers TRUCK_DRIVER_PROP_MALE scalar: proportion truck drivers male TRUCK_DRIVER_MALE_AGERANGE character: age range male truck drivers TRUCK_DRIVER_FEMALE_AGERANGE character: age range female truck drivers COMMERCIAL_MBIKE_PROP_MALE scalar: proportion commercial motorcycle drivers male COMMERCIAL_MBIKE_MALE_AGERANGE character: age range male commercial motorcycle drivers COMMERCIAL_MBIKE_FEMALE_AGERANGE character: age range female commercial motorcycle drivers MINIMUM_PT_TIME scalar: minimum time person spends public transport MODERATE_PA_CONTRIBUTION scalar: proportion contribution moderate PA Leisure MVPA CALL_INDIVIDUAL_SIN logic: whether call safety number coefficients individual vehicles use coefficients modes","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"list samples uncertain parameters","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"input parameters two options: set constant, sampled specified distribution. parameter given argument length 1 2. length 1, constant, set global environment. length 2, distribution defined sampled NSAMPLE times. exceptions, listed . function performs following steps: set input parameters global environment (sampling function called, overwritten) loop potential variables lognormal distribution sample distribution required loop potential variables beta distribution sample distribution required BACKGROUND_PA_CONFIDENCE<1 add BACKGROUND_PA_ZEROS parameters PM_EMISSION_INVENTORY_CONFIDENCE<1, sample PM inventory values using Dirichlet distribution parameterised gamma random variables CO2_EMISSION_INVENTORY_CONFIDENCE<1, sample CO2 inventory values using Dirichlet distribution parameterised gamma random variables PA_DOSE_RESPONSE_QUANTILE == T, find diseases related physical activity levels assign quantile sampling uniform distribution 0 1 AP_DOSE_RESPONSE_QUANTILE == T, find diseases related air pollution levels assign quantile sampling uniform distribution 0 1 bottom function, dirichlet_pointiness() function defined parameterises Dirichlet distributions PM CO2 emission inventories.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":null,"dir":"Reference","previous_headings":"","what":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"Sets sampled parameters global environment calls ITHIM routine","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"","code":"ithim_uncertainty(ithim_object, seed = 1)"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"ithim_object list necessary inputs, including parameters seed sample take","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"list ITHIM outcomes","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"function works performing following steps: extract ithim_object list entries extract sampled parameters stored ithim_object call set_vehicle_inventory() update emissions emission parameters sampled distribution call get_synthetic_from_trips() update synthetic trips synthetic population relevant input parameters sampled distribution call get_all_distances() recalculate distances relevant input parameters sampled distribution run ITHIM-Global model calling ithim_calculation_sequence()","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":null,"dir":"Reference","previous_headings":"","what":"Join disease health burden and injury data — join_hb_and_injury","title":"Join disease health burden and injury data — join_hb_and_injury","text":"Join two data frames health burden: disease, road-traffic injury","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join disease health burden and injury data — join_hb_and_injury","text":"","code":"join_hb_and_injury(ind_ap_pa, inj)"},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join disease health burden and injury data — join_hb_and_injury","text":"ind_ap_pa list (deaths, YLLs) data frames demographic groups' burdens diseases inj list (deaths, YLLs) data frames demographic groups' burdens road-traffic injury","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join disease health burden and injury data — join_hb_and_injury","text":"list dataframes: one deaths per cause per demographic group, likewise YLLs","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Join disease health burden and injury data — join_hb_and_injury","text":"function performs following steps: extract yll deaths data AP PA pathways extract yll deaths data injury data create one dataframe yll one deaths containing AP, PA injury data","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper for running ITHIM — run_ithim","title":"Wrapper for running ITHIM — run_ithim","text":"Switch either calculate health burden using constant input parameter values sample distributions first","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper for running ITHIM — run_ithim","text":"","code":"run_ithim(ithim_object, seed = 1)"},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper for running ITHIM — run_ithim","text":"ithim_object list input data needed calculate health burden seed","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper for running ITHIM — run_ithim","text":"ithim_object list items giving input data output results","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wrapper for running ITHIM — run_ithim","text":"function works creating switch run computation calling ithim_calculation_sequence() directly, divert sampling case ithim_uncertainty() first extracts sampled parameters calls ithim_calculation_sequence().","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":null,"dir":"Reference","previous_headings":"","what":"Run the set up scripts for ITHIM — run_ithim_setup","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"Sets basic ITHIM object onward calculation. Data loading, processing harmonisation. Setting global values.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"","code":"run_ithim_setup( seed = 1, CITY = \"bogota\", speeds = NULL, PM_emission_inventory = NULL, CO2_emission_inventory = NULL, DIST_CAT = c(\"0-2 km\", \"2-6 km\", \"6+ km\"), AGE_RANGE = c(15, 69), ADD_WALK_TO_PT_TRIPS = T, ADD_BUS_DRIVERS = T, ADD_CAR_DRIVERS = T, ADD_TRUCK_DRIVERS = T, ADD_MOTORCYCLE_FLEET = T, ADD_PERSONAL_MOTORCYCLE_TRIPS = \"no\", REFERENCE_SCENARIO = \"baseline\", PATH_TO_LOCAL_DATA = NULL, NSAMPLES = 1, BUS_WALK_TIME = 16, RAIL_WALK_TIME = 12.5, CYCLING_MET = 6.8, WALKING_MET = 3.5, PASSENGER_MET = 1.3, CAR_DRIVER_MET = 2.5, MOTORCYCLIST_MET = 2.8, SEDENTARY_ACTIVITY_MET = 1.3, LIGHT_ACTIVITY_MET = 1.3, MODERATE_PA_MET = 4, VIGOROUS_PA_MET = 8, PM_CONC_BASE = 12.69, PM_TRANS_SHARE = 0.42, PA_DOSE_RESPONSE_QUANTILE = F, AP_DOSE_RESPONSE_QUANTILE = F, BACKGROUND_PA_SCALAR = 1, BACKGROUND_PA_CONFIDENCE = 1, INJURY_REPORTING_RATE = 1, CHRONIC_DISEASE_SCALAR = 1, DAY_TO_WEEK_TRAVEL_SCALAR = 7, SIN_EXPONENT_SUM = 2, CASUALTY_EXPONENT_FRACTION = 0.5, SIN_EXPONENT_SUM_NOV = 1, SIN_EXPONENT_SUM_CYCLE = 2, CASUALTY_EXPONENT_FRACTION_CYCLE = 0.5, SIN_EXPONENT_SUM_PED = 2, CASUALTY_EXPONENT_FRACTION_PED = 0.5, SIN_EXPONENT_SUM_VEH = 2, CASUALTY_EXPONENT_FRACTION_VEH = 0.5, BUS_TO_PASSENGER_RATIO = 0.0389, CAR_OCCUPANCY_RATIO = 0.625, TRUCK_TO_CAR_RATIO = 0.3, FLEET_TO_MOTORCYCLE_RATIO = 0.441, PROPORTION_MOTORCYCLE_TRIPS = 0, PM_EMISSION_INVENTORY_CONFIDENCE = 1, CO2_EMISSION_INVENTORY_CONFIDENCE = 1, DISTANCE_SCALAR_CAR_TAXI = 1, DISTANCE_SCALAR_WALKING = 1, DISTANCE_SCALAR_PT = 1, DISTANCE_SCALAR_CYCLING = 1, DISTANCE_SCALAR_MOTORCYCLE = 1, BUS_DRIVER_PROP_MALE = 0.98, BUS_DRIVER_MALE_AGERANGE = \"19, 65\", BUS_DRIVER_FEMALE_AGERANGE = \"19, 65\", TRUCK_DRIVER_PROP_MALE = 0.98, TRUCK_DRIVER_MALE_AGERANGE = \"18, 65\", TRUCK_DRIVER_FEMALE_AGERANGE = \"18, 65\", COMMERCIAL_MBIKE_PROP_MALE = 0.99, COMMERCIAL_MBIKE_MALE_AGERANGE = \"18, 65\", COMMERCIAL_MBIKE_FEMALE_AGERANGE = \"18, 65\", MINIMUM_PT_TIME = 3, MODERATE_PA_CONTRIBUTION = 0.5, CALL_INDIVIDUAL_SIN = F, SCENARIO_NAME = \"GLOBAL\", SCENARIO_INCREASE = 0.05 )"},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"seed set seed get results sampling distribution CITY name city, name directory containing city data files speeds named list mode speeds PM_emission_inventory named list mode PM emissions CO2_emission_inventory named list CO2 mode emissions DIST_CAT vector string distance categories form '0-6'. (unit assumed trip set related speed values, usually km) AGE_RANGE vector minimum maximum ages include ADD_WALK_TO_PT_TRIPS logic: whether add short walks PT trips ADD_BUS_DRIVERS logic: whether add bus drivers ADD_CAR_DRIVERS logic: whether find add distance travelled individual cars, denoted car drivers ADD_TRUCK_DRIVERS logic: whether add truck drivers ADD_MOTORCYCLE_FLEET logic: whether add additional commercial motorcycle fleet ghost trips ADD_PERSONAL_MOTORCYCLE_TRIPS character: '' add personal motorcycle trips otherwise set geographic region defines set-motorcycle trips added REFERENCE_SCENARIO scenario forms reference health comparison PATH_TO_LOCAL_DATA path CITY directory, using package NSAMPLES constant integer: number samples take BUS_WALK_TIME lognormal parameter: duration walk bus stage RAIL_WALK_TIME lognormal parameter: duration walk rail stage CYCLING_MET lognormal parameter: METs cycling WALKING_MET lognormal parameter: METs walking PASSENGER_MET lognormal parameter: MET value associated passenger public transport CAR_DRIVER_MET lognormal parameter: MET value associated car driver MOTORCYCLIST_MET lognormal parameter: MET value associated motorcyclist SEDENTARY_ACTIVITY_MET lognormal parameter: MET value associated sedentary activity LIGHT_ACTIVITY_MET lognormal parameter: MET value associated light activity MODERATE_PA_MET lognormal parameter: MET value associated moderate activity VIGOROUS_PA_MET lognormal parameter: MET value associated vigorous activity PM_CONC_BASE lognormal parameter: background PM2.5 concentration PM_TRANS_SHARE beta parameter: fraction background PM2.5 attributable transport PA_DOSE_RESPONSE_QUANTILE logic: whether sample physical activity relative risk dose response functions AP_DOSE_RESPONSE_QUANTILE logic: whether sample air pollution relative risk dose response functions BACKGROUND_PA_SCALAR lognormal parameter: reporting scalar physical activity correct bias data BACKGROUND_PA_CONFIDENCE beta parameter: confidence accuracy zero non-travel physical activity levels INJURY_REPORTING_RATE lognormal parameter: rate injury fatality reporting CHRONIC_DISEASE_SCALAR lognormal parameter: scalar background disease rates adjust bias GBD data DAY_TO_WEEK_TRAVEL_SCALAR beta parameter: rate scaling travel one day one week - CURRENTLY used constant (using beta parameter need considerations) SIN_EXPONENT_SUM lognormal parameter: linearity injuries respect two modes. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION beta parameter: casualty exponent contribution SIN_EXPONENT_SUM SIN_EXPONENT_SUM_NOV lognormal parameter: linearity injuries respect two modes strike mode = NOV. SIN_EXPONENT_SUM=2 means safety numbers SIN_EXPONENT_SUM_CYCLE lognormal parameter: linearity injuries respect two modes victim mode = cycle. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_CYCLE beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_CYCLE victim mode = cycle SIN_EXPONENT_SUM_PED lognormal parameter: linearity injuries respect two modes victim mode = pedestrian. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_PED beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_PED victim mode = pedestrian SIN_EXPONENT_SUM_VEH lognormal parameter: linearity injuries respect two modes victim mode = vehicle. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_VEH beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_VEH victim mode = vehicle BUS_TO_PASSENGER_RATIO beta parameter: number buses per passenger CAR_OCCUPANCY_RATIO beta parameter: number people per car (including driver) TRUCK_TO_CAR_RATIO beta parameter: proportion truck car vehicle km travelled FLEET_TO_MOTORCYCLE_RATIO beta parameter: amount motorcycle trips added commercial trips PROPORTION_MOTORCYCLE_TRIPS beta parameter: proportion trips added personal motorcycle trips PM_EMISSION_INVENTORY_CONFIDENCE beta parameter: confidence accuracy PM emission inventory CO2_EMISSION_INVENTORY_CONFIDENCE beta parameter: confidence accuracy CO2 emission inventory DISTANCE_SCALAR_CAR_TAXI lognormal parameter: scalar adjust bias car distance travelled DISTANCE_SCALAR_WALKING lognormal parameter: scalar adjust bias walking distance travelled DISTANCE_SCALAR_PT lognormal parameter: scalar adjust bias PT distance travelled DISTANCE_SCALAR_CYCLING lognormal parameter: scalar adjust bias cycling distance travelled DISTANCE_SCALAR_MOTORCYCLE lognormal parameter: scalar adjust biase motorcycle distance travelled BUS_DRIVER_PROP_MALE scalar: proportion bus drivers male BUS_DRIVER_MALE_AGERANGE character: age range male bus drivers BUS_DRIVER_FEMALE_AGERANGE character: age range female bus drivers TRUCK_DRIVER_PROP_MALE scalar: proportion truck drivers male TRUCK_DRIVER_MALE_AGERANGE character: age range male truck drivers TRUCK_DRIVER_FEMALE_AGERANGE character: age range female truck drivers COMMERCIAL_MBIKE_PROP_MALE scalar: proportion commercial motorcycle drivers male COMMERCIAL_MBIKE_MALE_AGERANGE character: age range male commercial motorcycle drivers COMMERCIAL_MBIKE_FEMALE_AGERANGE character: age range female commercial motorcycle drivers MINIMUM_PT_TIME scalar: minimum time person spends public transport MODERATE_PA_CONTRIBUTION scalar: proportion contribution moderate PA Leisure MVPA CALL_INDIVIDUAL_SIN logic: whether call safety number coefficients individual vehicles use coefficients modes SCENARIO_NAME name scenarios (currently supports: TEST_WALK_SCENARIO, TEST_CYCLE_SCENARIO, MAX_MODE_SHARE_SCENARIO, LATAM, GLOBAL, AFRICA_INDIA, BOGOTA) SCENARIO_INCREASE increase given mode scenario (currently used GLOBAL, BOGOTA, LATAM AFRICA_INDIA scenarios)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"ithim_object list objects onward use.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"function used read various input files parameters process harmonise data ready health impact assessment. Input Parameters two options: set constant sampled pre-specified distribution. parameters given argument length 1 2. length 1, parameter usually used constant. parameter length 2, distribution defined sampled NSAMPLE times. function performs following steps: check whether valid scenario name called, get error message set various input parameters global parameters find path local data define fixed parameters air pollution inhalation define mode speeds: set default speeds various modes update default speeds city specific mode speeds given input parameters ensure similar modes speed assigned set-dataframe modes speeds define PM emissions inventory define default emission values update default values city specific values given input parameters define CO2 emissions inventory set default emission values update default values city specific values given input parameters load process data files calling ithim_load_data() call ithim_setup_parameters() set given input parameters global environment running constant mode obtain NSAMPLE samples given distributions input parameters running sample mode set flags cause certain parts model called later stage (ithim_uncertainty()) certain input parameters sampled distribution call complete_trip_distance_duration() add missing stage distance information trip data none corresponding input parameters sampled distribution, call set_vehicle_inventory() create dataframe mode specific speed, distance emission information none corresponding input parameters sampled distribution, call get_synthetic_from_trips() set synthetic trips synthetic population none corresponding input parameters sampled distribution, call get_all_distances() calculate trip distances","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale trip distances — scale_trip_distances","title":"Scale trip distances — scale_trip_distances","text":"Applies mode-specific distance scalars trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale trip distances — scale_trip_distances","text":"","code":"scale_trip_distances(trips)"},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale trip distances — scale_trip_distances","text":"trips data frame, trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scale trip distances — scale_trip_distances","text":"data frame, trips scenarios scaled distances","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scale trip distances — scale_trip_distances","text":"function used multiply trip stages belonging certain mode city specific scalar. Note walk pt stages counted public transport stages multiplied DISTANCE_SCALAR_PT function performs following steps: define car public transport modes multiply stage distances stage durations corresponding distance scalars","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"Calculate total CO2 exposure mode scenario based CO2 emissions inventory","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"","code":"scenario_co2_calculations(dist)"},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"dist data frame population travel scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"total CO2 exposure per mode","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"function performs following steps: calculate emission factors mode dividing total emissions distances travelled calculate CO2 emissions mode scenario multiplying scenario distance times emission factors modes without assigned distance, use CO2 emissions VEHICLE_INVENTORY instead","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate total AP exposure per person — scenario_pm_calculations","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"Calculate total AP exposure per person based population personal travel","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"","code":"scenario_pm_calculations(dist, trip_scen_sets)"},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"dist total distance travelled mode population scenarios trip_scen_sets trips data frame trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"background PM concentration baseline scenarios total AP exposure per person synthetic population (baseline scenarios)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"function performs following steps: exposure factor rates activity defined - parameters fixed calculate pm concentration related transport calculate PM emission factors mode dividing total emissions distances travelled calculate PM emissions mode scenario multiplying scenario distance emission factors modes without assigned distance, use PM emissions VEHICLE_INVENTORY instead calculate total PM concentrations scenario add exposure factors trip set stage mode add total scenario PM concentrations trip set calculate ventilation rate stage taking account demographic characteristics exposure factors calculate inhaled air total PM (micro grams) trip set calculate amount time per day spent sleep, moderate vigorous activities add total time spent travelling participant trip set calculate ventilation rate sleep, moderate vigorous activities participant synthetic population (travel component), calculate total air inhaled, total PM inhaled total PM concentration inhaled scenario assign participants synthetic population without travel component, baseline scenario PM concentrations join people without travel synthetic population","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_injury_contingency.html","id":null,"dir":"Reference","previous_headings":"","what":"Injury summary statistics — set_injury_contingency","title":"Injury summary statistics — set_injury_contingency","text":"Creates summarised injury tables 'hit ' 'vehicle' fatality counts casualty strike mode combination (age sex combination information exists)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_injury_contingency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Injury summary statistics — set_injury_contingency","text":"","code":"set_injury_contingency(injuries)"},{"path":"https://ithim.github.io/ITHIM-R/reference/set_injury_contingency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Injury summary statistics — set_injury_contingency","text":"injuries data frame individual injury events","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_injury_contingency.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Injury summary statistics — set_injury_contingency","text":"function performs following steps using individual fatality injury input file: data split WHW (hit ) matrix casualty strike mode given NOV (vehicle) matrix strike mode set NOV ithim_load_data() vehicle involved accident. age gender information given, counts multiplied proportion injuries relevant proportion population considered model (e.g. 15 - 65 year olds) based GBD data Data aggregated casualty strike mode, age sex information exists Complete whw nov matrices containing casualty strike (age sex) combinations created zero counts combinations fatalities list aggregated whw nov matrices set Global environment","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_scenario_specific_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Set scenario specific variables - CURRENTLY NOT CALLED — set_scenario_specific_variables","title":"Set scenario specific variables - CURRENTLY NOT CALLED — set_scenario_specific_variables","text":"Set NSCEN, SCEN SCEN_SHORT_NAME","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_scenario_specific_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set scenario specific variables - CURRENTLY NOT CALLED — set_scenario_specific_variables","text":"","code":"set_scenario_specific_variables()"},{"path":"https://ithim.github.io/ITHIM-R/reference/set_vehicle_inventory.html","id":null,"dir":"Reference","previous_headings":"","what":"Collate all vehicle information — set_vehicle_inventory","title":"Collate all vehicle information — set_vehicle_inventory","text":"Puts vehicle information one place including speeds emission factors. Writes global environment.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_vehicle_inventory.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collate all vehicle information — set_vehicle_inventory","text":"","code":"set_vehicle_inventory()"},{"path":"https://ithim.github.io/ITHIM-R/reference/set_vehicle_inventory.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Collate all vehicle information — set_vehicle_inventory","text":"function performs following operations: Based city specific (default) mode speeds, vehicle inventory initialised PM emissions added city specific (default) PM inventory big_truck mode added distance mode used air pollution modules mode added already exist travel survey (hence mode speeds) CO2 emissions added city specific (default) CO2 inventory car_driver exists, car_driver emissions set PM CO2 car emissions VEHICLE_INVENTORY set global variable","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate total mMETs per person — total_mmet","title":"Calculate total mMETs per person — total_mmet","text":"Calculate total mMETs per person synthetic population based non-travel PA active travel scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate total mMETs per person — total_mmet","text":"","code":"total_mmet(trip_scen_sets)"},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate total mMETs per person — total_mmet","text":"trip_scen_sets data frame trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate total mMETs per person — total_mmet","text":"mmets - total mMETs per week per person scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate total mMETs per person — total_mmet","text":"function performs following steps: extract people trip set active travel (walk cycle) stage mode (non-ghost trips ) calculate weekly time spent active travel scenario: scale non-travel mMET value people synthetic population BACKGROUND_PA_SCALAR adjust biases PA data calculate total cycling walking mMET values relevant person trip set scale week add active travel mMET non-travel mMET values person synthetic population create one dataframe total MMET people synthetic population scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":null,"dir":"Reference","previous_headings":"","what":"Add walk to public transport stages — walk_to_pt_and_combine_scen","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"Adds short walk stage public transport (PT) trip required.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"","code":"walk_to_pt_and_combine_scen(SYNTHETIC_TRIPS)"},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"trip_set list data frames, trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"data frame, trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"function performs following steps: create list containing dataframes synthetic trips scenario ADD_WALK_TO_PT_TRIPS == T, .e additional 'walk pt' stages added: filter trips public transport stage mode divide public transport trips without 'walk pt' stage add 'walk pt' stage public transport trips without walking stage (add_walk_trips()) combine trips scenarios one dataframe scale stage distances durations calling scale_trip_distances.R function","code":""}] +[{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"how-to-run-ithim-global","dir":"Articles","previous_headings":"","what":"How to run ITHIM-Global","title":"How to run ITHIM","text":"guide explain install ITHIM-R package, run model ITHIM-Global using package produce summaries key results. Please note guide written Windows 10 work similarly different operating systems.","code":""},{"path":[]},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"pre-requisites","dir":"Articles","previous_headings":"How to run ITHIM-Global > How to install the ITHIM-R package","what":"Pre-requisites","title":"How to run ITHIM","text":"following programmes need installed ITHIM-R package can used: Git R R Studio","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"cloning-the-github-repository","dir":"Articles","previous_headings":"How to run ITHIM-Global > How to install the ITHIM-R package","what":"Cloning the Github repository","title":"How to run ITHIM","text":"clone (.e. download) ITHIM-R Github repository, open command window, navigate folder want install repository type: ‘git clone https://github.com/ITHIM/ITHIM-R.git’ change Bogota branch guide written, navigate ITHIM-R folder within command window, type: ‘git checkout bogota’ Github repository now downloaded computer working branch set Bogota branch branch documentation refers .","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"installing-the-package-in-rstudio","dir":"Articles","previous_headings":"How to run ITHIM-Global > How to install the ITHIM-R package","what":"Installing the package in RStudio","title":"How to run ITHIM","text":"open ITHIM-R package RStudio double click ITHIM-R.Rproj file inside ITHIM-R folder saved computer. open package RStudio. install ITHIM-R package RStudio, following steps need performed: 1.) Git installed ‘Build’ tab top right hand corner RStudio. Click tab ‘Install’ panel . install ITHIM-R package also likely initially throw error message ‘Exited status 1’ stating R packages needed ITHIM-R package yet installed. install missing packages, click ‘Packages’ tab right hand side middle pane ‘Install’. open pop-window lets type packages still need installing. Click ‘Install’. missing R packages installed, go back ‘Build’ tab install ITHIM-R package . now install smoothly. get newest updates Bogota branch, go ‘Git’ tab RStudio next ‘Build’ tab click ‘Pull’. automatically download newest changes Github. update ITHIM-R package computer, need go ‘Build’ tab click ‘Install’ . (Alternatively, code none input files changed, instead clicking ‘Install’, can also click ‘’ ‘Load ’ option exists , .e. ‘devtools’ installed. faster way update package work minor code changes.) recommended pull install newest updates regular basis. Finally, also install ‘drpa’ package Github (drpa) first installing ‘remotes’ package explained typing remotes::install_github(“meta-analyses/drpa”) RStudio console.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"running-ithim-global","dir":"Articles","previous_headings":"How to run ITHIM-Global","what":"Running ITHIM-Global","title":"How to run ITHIM","text":"run ITHIM-Global using ITHIM-R package various input files parameters need updated first. multi_city_script.R can used call core functions required run ITHIM-R. Note multi_city_script.R set run ITHIM-Global various cities one go required looping cities one one.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"update-input-parameters","dir":"Articles","previous_headings":"How to run ITHIM-Global > Running ITHIM-Global","what":"Update input parameters","title":"How to run ITHIM","text":"several input parameter files need updating running ITIHM-Global: 5 files specific city saved directory city’s name. (See inst/ext/local/bogota example files also information). files need saved inst/extdata/local/‘city’ folder, ‘city’ replaced appropriate city name. file containing various input parameters cities code run saved ITHIM-R folder. branch, file called Bogota_InputParameters_vxx.xlsx, vxx refers latest version number file. contains input parameters Bogota can easily extended contain input parameter values various cities. global datasets - dose-response relationships air pollution pathway e.g.. files can found inst/extdata/global folder usually need changed. (See information.)","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"city-specific-files","dir":"Articles","previous_headings":"How to run ITHIM-Global > Running ITHIM-Global > Update input parameters","what":"City specific files","title":"How to run ITHIM","text":"section covers 5 city specific input files required run model. Travel survey (example trips dataset). table trips taken group people given day. also includes people take trips. data come official travel survey city possible. One row per trip (stage trip) Minimal columns: participant_id, age, sex, trip_mode, trip_duration (trip_distance) columns: stage_mode, stage_duration (stage_distance) Injury events (example injuries dataset). table recorded road-traffic injury (fatality) events city one years. One row per event Minimal columns: victim mode (cas_mode) strike mode (strike_mode) columns: year, cas_age, cas_gender, weight (weight column give number years data exists year information given) Disease burden data (example burden dataset). gives burden disease different diseases. city specific information exists, country level information can used. One row per disease/metric/age/gender combination Minimal rows: Measure (death/YLL); sex_name (Male/Female); age_name (‘x y’); cause_name (disease names); val (value burden); population (number people val corresponds , e.g. population country) Population city (example population dataset). information used scale Burden Disease data city’s population question. One row per demographic group Columns: sex, age, population age column share boundaries age_name Disease burden data, can aggregated Physical activity survey (example physical activity dataset). used represent physical activity levels city taken official physical activity survey city possible. One row per person Columns: sex, age, ltpa_marg_met (total non-occupational PA week)","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"global-file-inputs","dir":"Articles","previous_headings":"How to run ITHIM-Global > Running ITHIM-Global > Update input parameters","what":"Global file inputs","title":"How to run ITHIM","text":"order setup model, need fixed list tables/datasets, : Disease interaction table. table list diseases/causes specific pathway Air Pollution Physical Activity also interaction . Air Pollution Exposure Response Functions (ERFs). give exposure response relationships air pollution (PM2.5) impact health different diseases/causes. collected/cleaned datasets published studies . Physical Activity Dose-Response Functions (DRFs). dose response relationships physical activity impact health different diseases/causes. Similar air pollution, comes published studies. now sits independent R package called drpa. Ventilation rate tables. data can found inst/extdata/global/ventilation_rate details much air inhaled different people model population.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"call-multi_city_script-r","dir":"Articles","previous_headings":"How to run ITHIM-Global > Running ITHIM-Global","what":"Call multi_city_script.R","title":"How to run ITHIM","text":"order run ITHIM-R installed various input files described updated, open multi_city_script.R file within RStudio. (file can found ‘Files’ tab middle pane right hand side). key script run ITIHM-Global constant mode (.e. without sampling input parameters distributions). reads required datasets initialises variables calling run_ithim_setup runs model calling run_ithim. First update parameter values beginning script set-e.g. city / cities script run. several city names given vector, model performs ITHIM-R analysis one city another. parameter values updated, click ‘Source’ model run. produces pop-windows showing plots results giving years life lost scenario required disease outcome.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"results","dir":"Articles","previous_headings":"How to run ITHIM-Global","what":"Results","title":"How to run ITHIM","text":"Apart pop-windows produced end multi_city_script.R give years life lost scenario disease outcome, main file containing model outputs ithim_objects list, saved results/multi_city/io_,‘output_version’,.rds, output_version currently set SHA number (.e. unique identifier) latest update Github can also updated manually user. health effects ITHIM presented years life lost (YLLs) number attributable deaths. background burden data study areas estimated Global Burden Disease studies.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"ithim_objects","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results","what":"ithim_objects","title":"How to run ITHIM","text":"ithim_objects list saved results/multi_city/io_“,output_version,”.rds, output_version currently set SHA number (.e. unique identifier) latest update Github can also updated manually user multi_city_script.R. list contains comprehensive set intermediate final results model run: city contains following data: trip_scen_sets: trip data scenarios synthetic population, .e. population sample built combining physical activity survey travel survey data. dist: total stage mode distances mode scenario (incl. baseline) synthetic population. dur: total stage mode durations mode scenario (incl. baseline) synthetic population. true_dist: distances trip data scaled total distance travelled population city (age ranges considered model ) scenario (incl. baseline) mode transport. inj_distances: true_distances: city population mode distances age category sex considered model. injuries_list: scenarios (incl. baseline) two lists given, one ‘whw’ (-hit-) accidents strike casualty mode known one ‘nov’ (vehicle) accidents strike vehicle involved accident. lists contain casualty (strike) mode combinations age category sex. Furthermore, detail casualty (strike) mode distances travelled entire city population considered model (‘_sum’) just respective age sex category. also detail casualty (strike) mode exponents used injury Poisson model. reg_model: parameterised Poisson injury regression model. injuries_for_model: baseline data containing fatality counts casualty strike mode combinations associated city population distance data. demographic: city population counts age category sex combinations considered model. synth_pop: population extracted physical activity survey giving marginal met leisure physical activity values person. outcomes: mmets: Marginal MET values person synthetic population scenario. pm_conc_pp: PM2.5 concentration attributed person synthetic population scenario (incl. baseline). co2_conc: total CO2 concentration levels mode transport scenario (incl. baseline). ref_injuries: number injury deaths years life lost age sex category reference scenario including upper lower boundaries. hb: health burden (deaths years life lost (YLLs) two separate dataframes) age sex category disease using combined result diseases affected air pollution physical activity levels. pathway_hb: health burden (deaths years life lost (YLLs) two separate dataframes) age sex category disease keeping results diseases affected air pollution physical activity levels separate. whw: number fatalities strike casualty modes -hit---vehicle injuries scenarios (incl. baseline). disease_burden: disease burden diseases baseline scenario (deaths years life lost) age sex categories considered model (input data). PM_emission_inventory: PM emission inventory mode transport baseline scenario (input data). injury_table: summarised total injury counts injury input data age sex category strike casualty mode years (‘weight’ column) given input data ‘whw’ (-hit-) ‘nov’ (--vehicle) accidents. vehicle_inventory: gives speed CO2 PM2.5 emissions inventories vehicles baseline scenario. location: country continent information. new_walk_trips_count: number rail bus trips additional walking stage added model run. Scen_prop: proportion trips mode converted distance category scenario. Ithim_run: information ITHIM-R run name input parameter file, name scenario definition used, reference scenario, scenario names, computation mode (constant sample), timestamp model run, output version number, author model run additional comments particular model run.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"summaries-of-key-results","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results","what":"Summaries of key results","title":"How to run ITHIM","text":"various scripts can used produce output summary tables results: three markdown documents (root folder) producing html csv files: summary_tables.Rmd summary_tables_PA_AP.Rmd injury_tables.Rmd Shiny application creating Pivot table: app.R results_app folder following outputs produced:","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"summary_tables-rmd","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results > Summaries of key results","what":"summary_tables.Rmd","title":"How to run ITHIM","text":".Rmd file summarises mode splits, distances durations travelled looks health outcomes (YLLs deaths) different air pollution (AP), injury physical activity (PA) pathways also disease produces following output documents: html file (saved root folder) containing following information. (Note Rmd file set produce lot distance, duration health outcomes tables commented highlight main results easily added ): city table displayed showing Baseline mode split distance category city table given showing mode split scenario city specific distance tables showing average daily distances km travelled person synthetic population mode scenarios (incl Baseline) city specific distance tables showing average daily distances km travelled person synthetic population trip mode scenarios (incl Baseline) one table giving city specific baseline average daily distances (km) travelled person synthetic population cities city specific duration tables showing average daily duration (h) spent travelling person synthetic population mode scenarios (incl Baseline) city specific duration tables showing average daily duration (h) spent travelling person synthetic population trip mode scenarios (incl Baseline) output .csv files containing following information. (Note files also saved version number file name): ylls.csv file (results/multi_city/health_impacts/ylls.csv) gives changes YLLs age sex category, age category per 100,000 people, age sex category per 100,000 people city, disease scenario compared reference scenario. also shows disease level, whether disease exasperated changes AP, PA , age, age sex specific population levels. results either AP PA diseases affected AP PA results combined AP PA effects diseases affected AP PA. ylls_pathway.csv file (results/multi_city/health_impacts/ylls_pathway.csv) gives changes YLLs age sex category, age category per 100,000 people, age sex category per 100,000 people city, disease scenario compared reference scenario. also shows disease level, whether disease exasperated changes AP PA, age, age sex specific population levels. results given AP PA independently even disease affected pathways. deaths.csv file (results/multi_city/health_impacts/deaths.csv) gives changes deaths age sex category, age category per 100,000 people, age sex category per 100,000 people city, disease scenario compared reference scenario. also shows disease level, whether disease exasperated changes AP, PA , age, age sex specific population levels. results either AP PA diseases affected AP PA results combined AP PA effects diseases affected AP PA. deaths_pathway.csv file (results/multi_city/health_impacts/deaths_pathway.csv) gives changes deaths age sex category, age category per 100,000 people, age sex category per 100,000 people city, disease scenario compared reference scenario. also shows disease level, whether disease exasperated changes AP PA, age, age sex specific population levels. results given AP PA independently even disease affected pathways.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"summary_tables_pa_ap-rmd","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results > Summaries of key results","what":"summary_tables_PA_AP.Rmd","title":"How to run ITHIM","text":".Rmd file can used summarise PM2.5 personal exposure levels, PM2.5 CO2 concentrations physical activity levels scenarios including baseline. produces following output documents: html file (saved root folder) containing following information: boxplots city daily individual PM2.5 exposure levels scenario one table city detailing individual PM2.5 exposure levels including mean, 5th, 50th 95th percentiles, mean PM2.5 concentration levels scenario change PM2.5 compared reference scenario one table detailing percentage Baseline PM2.5 emissions attributed transport mode, city wide PM2.5 concentration levels percentage concentrations attributed transport cities one table detailing Baseline CO2 concentration levels scenario cities boxplots city individual mMET physical activity levels scenario one table city giving mean, 5th, 50th 95th percentile levels individual physical activity levels (mMETs) scenario one table detailing average mMETs levels scenario cities 2nd Option: boxplots city daily individual PM2.5 exposure levels scenario one table detailing Baseline PM2.5 emissions mode, city wide PM2.5 concentration levels percentage concentrations attributed transport cities one table city detailing individual PM2.5 exposure levels including mean, 5th, 50th 95th percentiles, mean PM2.5 concentration levels scenario change PM2.5 compared reference scenario. Table also contains CO2 concentrations scenario boxplots city individual mMET physical activity levels scenario output .csv/.xlsx files containing following information: desc_stats.csv file (results/multi_city/AP/desc_stats.csv, also saved output version name) containing summary statistics individual PM2.5 exposure levels, total PM2.5 concentrations levels, change PM2.5 concentration levels compared reference scenario total transport related CO2 emission concentrations scenario city desc_stats.xlsx file (results/multi_city/AP/desc_stats_output_version.xlsx) containing following tabs: PM_2.5_emission_inventory: table detailing percentage Baseline PM2.5 emissions attributed transport mode, city wide PM2.5 concentration levels percentage concentrations attributed transport cities CO2_conc: table detailing CO2 concentration levels scenario cities summary_stats_PM2.5_CO2: summary statistics individual PM2.5 exposure levels, total PM2.5 concentrations levels, change PM2.5 concentration levels compared reference scenario total transport related CO2 emission concentrations scenario city","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"injury_tables-rmd","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results > Summaries of key results","what":"injury_tables.Rmd","title":"How to run ITHIM","text":".Rmd file can used summarise injury outcomes. produces following output documents: html file (saved root folder) containing following information: fatality counts strike casualty mode scenario city (incl lower upper confidence interval limits applicable); one table city, scenario mean, upper lower confidence interval values fatality counts giving lower, mean upper bounds (exist) casualty mode strike mode scenario city; one table casualty mode, scenario city tables showing fatalities per billion km travelled city, scenario mean, upper lower confidence interval values (applicable). tables showing number deaths per 100,000 people city, scenario mean, upper lower confidence interval values (applicable). tables showing fatalities per 100 million hours travelled city, scenario mean, upper lower confidence interval values (applicable). output .csv files containing following information.(Note files also saved version number file name): inj_counts.csv file (‘results/multi_city/inj/inj_counts.csv’) contains fatality counts (mean upper lower confidence interval boundaries required) city, scenario casualty strike mode pair. also includes observed baseline fatality counts active travel fatality counts (sum cycle walk casualty mode fatalities) injury_risks_per_billion_kms.csv file (‘results/multi_city/inj/injury_risks_per_billion_kms.csv’) gives fatalities per billion km travelled city, scenario casualty mode. also includes upper lower confidence interval boundary values required active travel counts injury_risks_per_100k_pop.csv file (‘results/multi_city/inj/injury_risks_per_100k_pop.csv’) gives fatalities per 100k people city, scenario casualty mode. also includes upper lower confidence interval boundary values required active travel counts distances.csv file (‘results/multi_city/inj/distances.csv’) contains population distances travelled per day city, scenario mode injury_risks_per_100million_h.csv file (‘results/multi_city/inj/injury_risks_per_100million_h.csv’) gives fatalities per 100 million hours travelled city, scenario casualty mode. also includes upper lower confidence interval boundary values required active travel counts inj_data.xlsx file (results/multi_city/inj/inj_data.xlsx) contains injury output csv files","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"producing-the--rmd-file-outputs","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results > Summaries of key results","what":"Producing the .Rmd file outputs","title":"How to run ITHIM","text":"run various .Rmd files, can use Create_output_summaries.R script saved root folder.","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"shiny-app-pivot-table","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results > Summaries of key results","what":"Shiny App Pivot table","title":"How to run ITHIM","text":"application allows produce Pivot tables health injury outcomes. Pivot tables allow filter outcomes follows. scenario deaths years life lost disease/cause levels age sex group pathway / dose whether want include interaction air pollution physical activity pathways whether include confidence intervals scenario mode risk type (total fatalities, per billion km, per 100k people, per 100 million hours)","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"producing-the-shiny-app-pivot-table-output","dir":"Articles","previous_headings":"How to run ITHIM-Global > Results > Summaries of key results","what":"Producing the Shiny App Pivot table output","title":"How to run ITHIM","text":"produce Shiny App Pivot tables, run function app.R results_app folder. Depending whether want read results latest updates Github local drive, set github_path <- “https://raw.githubusercontent.com/ITHIM/ITHIM-R/bogota/” github_path <- “../” (Comment option don’t need.)","code":""},{"path":"https://ithim.github.io/ITHIM-R/articles/how-to-run-ITHIM.html","id":"structure-of-ithim-global-github-repository---bogota-branch","dir":"Articles","previous_headings":"How to run ITHIM-Global","what":"Structure of ITHIM-Global Github repository - Bogota branch","title":"How to run ITHIM","text":"Github repository Bogota branch structured follows: .github: specifies metadata various documents, automatically created Github. R: contains R functions written ITIHM-R package. inst/extdata: folder containing local city specific global input files. man: manual containing various functions used within ITHIM-R figures used various documentation documents. also build automatically. results: contains results model runs. results_app: contains functions used produce Shiny pivot tables results. vignettes: contains additional documentation information .Rbuildignore, .gitignore: metadata created Github. Bogota_InputParameters_vxx.xlsx - file containing city specific input parameters needs manual updating. Create_output_summaries.R - wrapper script create various output documents. DESCRIPTION: automatically created Github. How_To_Run_ITHIM: document describing various steps needed run ITHIM-Global model downloading installing ITHIM-R preparing input parameter files running code. ITHIM-R.Rproj: contains metadata ITHIM-R package. LICENSE: gives information licence applied repository NAMESPACE: automatically created Github. OutputVersionControl.txt: file storing main run information ITHIM-R runs. automatically updated, required, using multi_city_script.R. README: document giving overview ITHIM-R package. _config.yml, _pkgdown.yml: metadata created Github. injury_tables.Rmd: R markdown document can used create summary statistics injury results injury_tables_output_version.html: html files containing injury summary statistics respective model runs multi_city_script.R: wrapper function call various functions needed perform ITHIM-Global analysis. summary_tables.Rmd: R markdown document create summary output statistics distance, duration, mode splits health outcomes summary_tables_output_version.html: html files containing output summaries respective model runs summary_tables_PA.Rmd: R markdown document create summary output statistics air pollution physical activity levels summary_tables_PA_output_version.html: html files containing air pollution physical activity output statistics respective model runs","code":""},{"path":"https://ithim.github.io/ITHIM-R/authors.html","id":null,"dir":"","previous_headings":"","what":"Authors","title":"Authors and Citation","text":"Ali Abbas. Author, maintainer. Anna Schroeder. Author. Daniel Gil. Author. Lambed Tatah. Author. Rob Johnson. Author.","code":""},{"path":"https://ithim.github.io/ITHIM-R/authors.html","id":"citation","dir":"","previous_headings":"","what":"Citation","title":"Authors and Citation","text":"Abbas , Schroeder , Gil D, Tatah L, Johnson R (2023). “ithimr: Integrated Transport Health Impact Model.” https://ithim.github.io/ITHIM-R/.","code":"@Misc{ithim_methods_paper, url = {https://ithim.github.io/ITHIM-R/}, author = {Ali Abbas and Anna Schroeder and Daniel Gil and Lambed Tatah and Rob Johnson}, title = {ithimr: Integrated Transport and Health Impact Model}, year = {2023}, }"},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"ithim-r","dir":"","previous_headings":"","what":"Integrated Transport and Health Impact Model","title":"Integrated Transport and Health Impact Model","text":"Development Integrated Transport Health Impact Modelling Tool (ITHIM) R, also known ITHIM version 3.0. Started January 2018. document aims comprehensive record calculations ITHIM pipeline, specifically ITHIM- R package.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"website-for-the-package","dir":"","previous_headings":"","what":"Website for the package","title":"Integrated Transport and Health Impact Model","text":"Using pkgdown package, published documentation ITHIMR package github-pages. Please read : documentation + helpful resources","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"how-to-use-the-package","dir":"","previous_headings":"","what":"How to use the package","title":"Integrated Transport and Health Impact Model","text":"written -guide explains install ITHIM-R package, run ITHIM-Global model using package produce summaries key results. Please read : run ITHIM?","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"citation","dir":"","previous_headings":"How to use the package","what":"Citation","title":"Integrated Transport and Health Impact Model","text":"cite package ‘ithimr’ publications use: Ali Abbas, Anna Schroeder et al. (2023). ithimr: Integrated Transport Health Impact Model. R package version 0.1.2. BibTeX entry LaTeX users @Manual{, title = {ithimr: Integrated Transport Health Impact Model}, author = {Ali Abbas Anna Schroeder Daniel Gil Lambed Tatah Rob Johnson}, year = {2023}, note = {R package version 0.1.2, https://github.com/ITHIM/ITHIM-R}, url = {https://ithim.github.io/ITHIM-R/}, }","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"outline","dir":"","previous_headings":"How to use the package","what":"Outline","title":"Integrated Transport and Health Impact Model","text":"ITHIM performs integrated assessments health effects transport scenarios policies urban national levels. health effects transport policies modelled changes physical activity, road traffic injury risk, exposure fine particulate matter (PM2.5) air pollution CO2 emissions. ITHIM used researchers health transport professionals estimate health impacts scenarios, compare effects travel patterns different locations, model effects interventions. ITHIM works either stand-alone model can linked models (e.g. transport, health, economic) quasi-microsimulation model exposure individual person level, health impacts estimated aggregated age groups, constrained available Global Burden Disease (GBD) data.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"physical-activity","dir":"","previous_headings":"How to use the package > Outline","what":"Physical Activity","title":"Integrated Transport and Health Impact Model","text":"ITHIM models exposure physical activity comparing distributions weekly physical activity different scenarios. Walking, cycling types physical activity combined marginal MET hours per week activity. Outcomes affected physical activity include several cardiovascular diseases, depression, dementia, diabetes, breast cancer colon cancer. ITHIM also models changes health -cause mortality. comparative risk assessment method used estimate changes population physical activity lead changes health burden.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"road-traffic-injuries","dir":"","previous_headings":"How to use the package > Outline","what":"Road traffic injuries","title":"Integrated Transport and Health Impact Model","text":"Road traffic injuries modelled using model based risk, distance speed. Differences risk sex age also taken account. approach allows ITHIM look absolute number injuries risk injury might change different modes transport travel distances modes change.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"air-pollution","dir":"","previous_headings":"How to use the package > Outline","what":"Air Pollution","title":"Integrated Transport and Health Impact Model","text":"Fine particulate matter (PM2.5) air pollution risks calculated general population (background rates) well mode specific rates different transport modes. Exposure changes population based comparison locally generated PM2.5 emissions concentrations study area. current ITHIM version (v3), personal exposure air pollution walking cycling also taken account.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"co2-emissions","dir":"","previous_headings":"How to use the package > Outline","what":"CO2 Emissions","title":"Integrated Transport and Health Impact Model","text":"carbon effects pathway models carbon dioxide (CO2) emissions motorised vehicles. CO2 pathway estimates single metric: total CO2 emissions modelled scenario. method calculate CO2 emissions similar one PM2.5.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"health-outcomes","dir":"","previous_headings":"How to use the package > Outline","what":"Health outcomes","title":"Integrated Transport and Health Impact Model","text":"health effects ITHIM presented years life lost (YLLs) number attributable deaths. Background burden data study areas estimated Global Burden Disease studies.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"data-inputs","dir":"","previous_headings":"How to use the package","what":"Data inputs","title":"Integrated Transport and Health Impact Model","text":"ITHIM-R requires 5 user defined input files csv format, saved directory city’s name. See inst/ext/local/bogota example files. also numerous assumptions can parameterize model.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"file-inputs","dir":"","previous_headings":"How to use the package > Data inputs","what":"File inputs","title":"Integrated Transport and Health Impact Model","text":"section talks files (datasets) required setup run model. two subsections, : case study specific datasets global datasets - dose-response relationship Air Pollution module etc","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"case-study-specifics","dir":"","previous_headings":"How to use the package","what":"Case study specifics","title":"Integrated Transport and Health Impact Model","text":"section covers file inputs (specific city) required run model. Travel survey (example trips dataset). table trips taken group people given day. also includes people take trips. One row per trip (stage trip) Minimal columns: participant_id, age, sex, trip_mode, trip_duration (trip_distance) columns: stage_mode, stage_duration (stage_distance) Injury events (example injuries dataset). table recorded road-traffic injury (fatality) events city one years. One row per event Minimal columns: victim mode (cas_mode) strike mode (strike_mode) columns: year, cas_age, cas_gender, weight (e.g. multiple years combined) Disease burden data (example burden dataset). One row per disease/metric/age/gender combination Minimal rows: Measure (death/YLL); sex_name (Male/Female); age_name (‘x y’); cause_name (disease names); val (value burden); population (number people val corresponds , e.g. population country) Population city (example population dataset). used order scale burden Disease burden data city’s population study One row per demographic group Columns: sex, age, population age column share boundaries age_name Disease burden data, can aggregated Physical activity survey (example physical activity dataset) One row per person Columns: sex, age, ltpa_marg_met (total non-occupational PA week)","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"global-file-inputs","dir":"","previous_headings":"How to use the package","what":"Global file inputs","title":"Integrated Transport and Health Impact Model","text":"order setup model, need fixed list tables/datasets, : Disease interaction table . table list diseases/causes specific module Air Pollution Physical Activity also interaction Air Pollution Exposure Response Functions (ERFs) exposure response relationships air pollution (PM2.5) impact health via diseases/causes. collected/cleaned datasets published studies . Physical Activity Dose-Response Functions (DRFs) dose response relationships physical activity impact health via diseases/causes. Similar AP, comes published studies. now sits independent R package called drpa.","code":""},{"path":"https://ithim.github.io/ITHIM-R/index.html","id":"how-to-run-the-model","dir":"","previous_headings":"","what":"How to run the model?","title":"Integrated Transport and Health Impact Model","text":"setup, reading required datasets initialising variables, call run_ithim_setup() run model, call run_ithim(). function used call run_ithim_setup run_ithim multi_city_script also reads relevant input parameter file.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":null,"dir":"","previous_headings":"","what":"GNU General Public License","title":"GNU General Public License","text":"Version 3, 29 June 2007Copyright © 2007 Free Software Foundation, Inc.  Everyone permitted copy distribute verbatim copies license document, changing allowed.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"preamble","dir":"","previous_headings":"","what":"Preamble","title":"GNU General Public License","text":"GNU General Public License free, copyleft license software kinds works. licenses software practical works designed take away freedom share change works. contrast, GNU General Public License intended guarantee freedom share change versions program–make sure remains free software users. , Free Software Foundation, use GNU General Public License software; applies also work released way authors. can apply programs, . speak free software, referring freedom, price. General Public Licenses designed make sure freedom distribute copies free software (charge wish), receive source code can get want , can change software use pieces new free programs, know can things. protect rights, need prevent others denying rights asking surrender rights. Therefore, certain responsibilities distribute copies software, modify : responsibilities respect freedom others. example, distribute copies program, whether gratis fee, must pass recipients freedoms received. must make sure , , receive can get source code. must show terms know rights. Developers use GNU GPL protect rights two steps: (1) assert copyright software, (2) offer License giving legal permission copy, distribute /modify . developers’ authors’ protection, GPL clearly explains warranty free software. users’ authors’ sake, GPL requires modified versions marked changed, problems attributed erroneously authors previous versions. devices designed deny users access install run modified versions software inside , although manufacturer can . fundamentally incompatible aim protecting users’ freedom change software. systematic pattern abuse occurs area products individuals use, precisely unacceptable. Therefore, designed version GPL prohibit practice products. problems arise substantially domains, stand ready extend provision domains future versions GPL, needed protect freedom users. Finally, every program threatened constantly software patents. States allow patents restrict development use software general-purpose computers, , wish avoid special danger patents applied free program make effectively proprietary. prevent , GPL assures patents used render program non-free. precise terms conditions copying, distribution modification follow.","code":""},{"path":[]},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_0-definitions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"0. Definitions","title":"GNU General Public License","text":"“License” refers version 3 GNU General Public License. “Copyright” also means copyright-like laws apply kinds works, semiconductor masks. “Program” refers copyrightable work licensed License. licensee addressed “”. “Licensees” “recipients” may individuals organizations. “modify” work means copy adapt part work fashion requiring copyright permission, making exact copy. resulting work called “modified version” earlier work work “based ” earlier work. “covered work” means either unmodified Program work based Program. “propagate” work means anything , without permission, make directly secondarily liable infringement applicable copyright law, except executing computer modifying private copy. Propagation includes copying, distribution (without modification), making available public, countries activities well. “convey” work means kind propagation enables parties make receive copies. Mere interaction user computer network, transfer copy, conveying. interactive user interface displays “Appropriate Legal Notices” extent includes convenient prominently visible feature (1) displays appropriate copyright notice, (2) tells user warranty work (except extent warranties provided), licensees may convey work License, view copy License. interface presents list user commands options, menu, prominent item list meets criterion.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_1-source-code","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"1. Source Code","title":"GNU General Public License","text":"“source code” work means preferred form work making modifications . “Object code” means non-source form work. “Standard Interface” means interface either official standard defined recognized standards body, , case interfaces specified particular programming language, one widely used among developers working language. “System Libraries” executable work include anything, work whole, () included normal form packaging Major Component, part Major Component, (b) serves enable use work Major Component, implement Standard Interface implementation available public source code form. “Major Component”, context, means major essential component (kernel, window system, ) specific operating system () executable work runs, compiler used produce work, object code interpreter used run . “Corresponding Source” work object code form means source code needed generate, install, (executable work) run object code modify work, including scripts control activities. However, include work’s System Libraries, general-purpose tools generally available free programs used unmodified performing activities part work. example, Corresponding Source includes interface definition files associated source files work, source code shared libraries dynamically linked subprograms work specifically designed require, intimate data communication control flow subprograms parts work. Corresponding Source need include anything users can regenerate automatically parts Corresponding Source. Corresponding Source work source code form work.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_2-basic-permissions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"2. Basic Permissions","title":"GNU General Public License","text":"rights granted License granted term copyright Program, irrevocable provided stated conditions met. License explicitly affirms unlimited permission run unmodified Program. output running covered work covered License output, given content, constitutes covered work. License acknowledges rights fair use equivalent, provided copyright law. may make, run propagate covered works convey, without conditions long license otherwise remains force. may convey covered works others sole purpose make modifications exclusively , provide facilities running works, provided comply terms License conveying material control copyright. thus making running covered works must exclusively behalf, direction control, terms prohibit making copies copyrighted material outside relationship . Conveying circumstances permitted solely conditions stated . Sublicensing allowed; section 10 makes unnecessary.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_3-protecting-users-legal-rights-from-anti-circumvention-law","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"3. Protecting Users’ Legal Rights From Anti-Circumvention Law","title":"GNU General Public License","text":"covered work shall deemed part effective technological measure applicable law fulfilling obligations article 11 WIPO copyright treaty adopted 20 December 1996, similar laws prohibiting restricting circumvention measures. convey covered work, waive legal power forbid circumvention technological measures extent circumvention effected exercising rights License respect covered work, disclaim intention limit operation modification work means enforcing, work’s users, third parties’ legal rights forbid circumvention technological measures.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_4-conveying-verbatim-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"4. Conveying Verbatim Copies","title":"GNU General Public License","text":"may convey verbatim copies Program’s source code receive , medium, provided conspicuously appropriately publish copy appropriate copyright notice; keep intact notices stating License non-permissive terms added accord section 7 apply code; keep intact notices absence warranty; give recipients copy License along Program. may charge price price copy convey, may offer support warranty protection fee.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_5-conveying-modified-source-versions","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"5. Conveying Modified Source Versions","title":"GNU General Public License","text":"may convey work based Program, modifications produce Program, form source code terms section 4, provided also meet conditions: ) work must carry prominent notices stating modified , giving relevant date. b) work must carry prominent notices stating released License conditions added section 7. requirement modifies requirement section 4 “keep intact notices”. c) must license entire work, whole, License anyone comes possession copy. License therefore apply, along applicable section 7 additional terms, whole work, parts, regardless packaged. License gives permission license work way, invalidate permission separately received . d) work interactive user interfaces, must display Appropriate Legal Notices; however, Program interactive interfaces display Appropriate Legal Notices, work need make . compilation covered work separate independent works, nature extensions covered work, combined form larger program, volume storage distribution medium, called “aggregate” compilation resulting copyright used limit access legal rights compilation’s users beyond individual works permit. Inclusion covered work aggregate cause License apply parts aggregate.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_6-conveying-non-source-forms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"6. Conveying Non-Source Forms","title":"GNU General Public License","text":"may convey covered work object code form terms sections 4 5, provided also convey machine-readable Corresponding Source terms License, one ways: ) Convey object code , embodied , physical product (including physical distribution medium), accompanied Corresponding Source fixed durable physical medium customarily used software interchange. b) Convey object code , embodied , physical product (including physical distribution medium), accompanied written offer, valid least three years valid long offer spare parts customer support product model, give anyone possesses object code either (1) copy Corresponding Source software product covered License, durable physical medium customarily used software interchange, price reasonable cost physically performing conveying source, (2) access copy Corresponding Source network server charge. c) Convey individual copies object code copy written offer provide Corresponding Source. alternative allowed occasionally noncommercially, received object code offer, accord subsection 6b. d) Convey object code offering access designated place (gratis charge), offer equivalent access Corresponding Source way place charge. need require recipients copy Corresponding Source along object code. place copy object code network server, Corresponding Source may different server (operated third party) supports equivalent copying facilities, provided maintain clear directions next object code saying find Corresponding Source. Regardless server hosts Corresponding Source, remain obligated ensure available long needed satisfy requirements. e) Convey object code using peer--peer transmission, provided inform peers object code Corresponding Source work offered general public charge subsection 6d. separable portion object code, whose source code excluded Corresponding Source System Library, need included conveying object code work. “User Product” either (1) “consumer product”, means tangible personal property normally used personal, family, household purposes, (2) anything designed sold incorporation dwelling. determining whether product consumer product, doubtful cases shall resolved favor coverage. particular product received particular user, “normally used” refers typical common use class product, regardless status particular user way particular user actually uses, expects expected use, product. product consumer product regardless whether product substantial commercial, industrial non-consumer uses, unless uses represent significant mode use product. “Installation Information” User Product means methods, procedures, authorization keys, information required install execute modified versions covered work User Product modified version Corresponding Source. information must suffice ensure continued functioning modified object code case prevented interfered solely modification made. convey object code work section , , specifically use , User Product, conveying occurs part transaction right possession use User Product transferred recipient perpetuity fixed term (regardless transaction characterized), Corresponding Source conveyed section must accompanied Installation Information. requirement apply neither third party retains ability install modified object code User Product (example, work installed ROM). requirement provide Installation Information include requirement continue provide support service, warranty, updates work modified installed recipient, User Product modified installed. Access network may denied modification materially adversely affects operation network violates rules protocols communication across network. Corresponding Source conveyed, Installation Information provided, accord section must format publicly documented (implementation available public source code form), must require special password key unpacking, reading copying.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_7-additional-terms","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"7. Additional Terms","title":"GNU General Public License","text":"“Additional permissions” terms supplement terms License making exceptions one conditions. Additional permissions applicable entire Program shall treated though included License, extent valid applicable law. additional permissions apply part Program, part may used separately permissions, entire Program remains governed License without regard additional permissions. convey copy covered work, may option remove additional permissions copy, part . (Additional permissions may written require removal certain cases modify work.) may place additional permissions material, added covered work, can give appropriate copyright permission. Notwithstanding provision License, material add covered work, may (authorized copyright holders material) supplement terms License terms: ) Disclaiming warranty limiting liability differently terms sections 15 16 License; b) Requiring preservation specified reasonable legal notices author attributions material Appropriate Legal Notices displayed works containing ; c) Prohibiting misrepresentation origin material, requiring modified versions material marked reasonable ways different original version; d) Limiting use publicity purposes names licensors authors material; e) Declining grant rights trademark law use trade names, trademarks, service marks; f) Requiring indemnification licensors authors material anyone conveys material (modified versions ) contractual assumptions liability recipient, liability contractual assumptions directly impose licensors authors. non-permissive additional terms considered “restrictions” within meaning section 10. Program received , part , contains notice stating governed License along term restriction, may remove term. license document contains restriction permits relicensing conveying License, may add covered work material governed terms license document, provided restriction survive relicensing conveying. add terms covered work accord section, must place, relevant source files, statement additional terms apply files, notice indicating find applicable terms. Additional terms, permissive non-permissive, may stated form separately written license, stated exceptions; requirements apply either way.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_8-termination","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"8. Termination","title":"GNU General Public License","text":"may propagate modify covered work except expressly provided License. attempt otherwise propagate modify void, automatically terminate rights License (including patent licenses granted third paragraph section 11). However, cease violation License, license particular copyright holder reinstated () provisionally, unless copyright holder explicitly finally terminates license, (b) permanently, copyright holder fails notify violation reasonable means prior 60 days cessation. Moreover, license particular copyright holder reinstated permanently copyright holder notifies violation reasonable means, first time received notice violation License (work) copyright holder, cure violation prior 30 days receipt notice. Termination rights section terminate licenses parties received copies rights License. rights terminated permanently reinstated, qualify receive new licenses material section 10.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_9-acceptance-not-required-for-having-copies","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"9. Acceptance Not Required for Having Copies","title":"GNU General Public License","text":"required accept License order receive run copy Program. Ancillary propagation covered work occurring solely consequence using peer--peer transmission receive copy likewise require acceptance. However, nothing License grants permission propagate modify covered work. actions infringe copyright accept License. Therefore, modifying propagating covered work, indicate acceptance License .","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_10-automatic-licensing-of-downstream-recipients","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"10. Automatic Licensing of Downstream Recipients","title":"GNU General Public License","text":"time convey covered work, recipient automatically receives license original licensors, run, modify propagate work, subject License. responsible enforcing compliance third parties License. “entity transaction” transaction transferring control organization, substantially assets one, subdividing organization, merging organizations. propagation covered work results entity transaction, party transaction receives copy work also receives whatever licenses work party’s predecessor interest give previous paragraph, plus right possession Corresponding Source work predecessor interest, predecessor can get reasonable efforts. may impose restrictions exercise rights granted affirmed License. example, may impose license fee, royalty, charge exercise rights granted License, may initiate litigation (including cross-claim counterclaim lawsuit) alleging patent claim infringed making, using, selling, offering sale, importing Program portion .","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_11-patents","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"11. Patents","title":"GNU General Public License","text":"“contributor” copyright holder authorizes use License Program work Program based. work thus licensed called contributor’s “contributor version”. contributor’s “essential patent claims” patent claims owned controlled contributor, whether already acquired hereafter acquired, infringed manner, permitted License, making, using, selling contributor version, include claims infringed consequence modification contributor version. purposes definition, “control” includes right grant patent sublicenses manner consistent requirements License. contributor grants non-exclusive, worldwide, royalty-free patent license contributor’s essential patent claims, make, use, sell, offer sale, import otherwise run, modify propagate contents contributor version. following three paragraphs, “patent license” express agreement commitment, however denominated, enforce patent (express permission practice patent covenant sue patent infringement). “grant” patent license party means make agreement commitment enforce patent party. convey covered work, knowingly relying patent license, Corresponding Source work available anyone copy, free charge terms License, publicly available network server readily accessible means, must either (1) cause Corresponding Source available, (2) arrange deprive benefit patent license particular work, (3) arrange, manner consistent requirements License, extend patent license downstream recipients. “Knowingly relying” means actual knowledge , patent license, conveying covered work country, recipient’s use covered work country, infringe one identifiable patents country reason believe valid. , pursuant connection single transaction arrangement, convey, propagate procuring conveyance , covered work, grant patent license parties receiving covered work authorizing use, propagate, modify convey specific copy covered work, patent license grant automatically extended recipients covered work works based . patent license “discriminatory” include within scope coverage, prohibits exercise , conditioned non-exercise one rights specifically granted License. may convey covered work party arrangement third party business distributing software, make payment third party based extent activity conveying work, third party grants, parties receive covered work , discriminatory patent license () connection copies covered work conveyed (copies made copies), (b) primarily connection specific products compilations contain covered work, unless entered arrangement, patent license granted, prior 28 March 2007. Nothing License shall construed excluding limiting implied license defenses infringement may otherwise available applicable patent law.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_12-no-surrender-of-others-freedom","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"12. No Surrender of Others’ Freedom","title":"GNU General Public License","text":"conditions imposed (whether court order, agreement otherwise) contradict conditions License, excuse conditions License. convey covered work satisfy simultaneously obligations License pertinent obligations, consequence may convey . example, agree terms obligate collect royalty conveying convey Program, way satisfy terms License refrain entirely conveying Program.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_13-use-with-the-gnu-affero-general-public-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"13. Use with the GNU Affero General Public License","title":"GNU General Public License","text":"Notwithstanding provision License, permission link combine covered work work licensed version 3 GNU Affero General Public License single combined work, convey resulting work. terms License continue apply part covered work, special requirements GNU Affero General Public License, section 13, concerning interaction network apply combination .","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_14-revised-versions-of-this-license","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"14. Revised Versions of this License","title":"GNU General Public License","text":"Free Software Foundation may publish revised /new versions GNU General Public License time time. new versions similar spirit present version, may differ detail address new problems concerns. version given distinguishing version number. Program specifies certain numbered version GNU General Public License “later version” applies , option following terms conditions either numbered version later version published Free Software Foundation. Program specify version number GNU General Public License, may choose version ever published Free Software Foundation. Program specifies proxy can decide future versions GNU General Public License can used, proxy’s public statement acceptance version permanently authorizes choose version Program. Later license versions may give additional different permissions. However, additional obligations imposed author copyright holder result choosing follow later version.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_15-disclaimer-of-warranty","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"15. Disclaimer of Warranty","title":"GNU General Public License","text":"WARRANTY PROGRAM, EXTENT PERMITTED APPLICABLE LAW. EXCEPT OTHERWISE STATED WRITING COPYRIGHT HOLDERS /PARTIES PROVIDE PROGRAM “” WITHOUT WARRANTY KIND, EITHER EXPRESSED IMPLIED, INCLUDING, LIMITED , IMPLIED WARRANTIES MERCHANTABILITY FITNESS PARTICULAR PURPOSE. ENTIRE RISK QUALITY PERFORMANCE PROGRAM . PROGRAM PROVE DEFECTIVE, ASSUME COST NECESSARY SERVICING, REPAIR CORRECTION.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_16-limitation-of-liability","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"16. Limitation of Liability","title":"GNU General Public License","text":"EVENT UNLESS REQUIRED APPLICABLE LAW AGREED WRITING COPYRIGHT HOLDER, PARTY MODIFIES /CONVEYS PROGRAM PERMITTED , LIABLE DAMAGES, INCLUDING GENERAL, SPECIAL, INCIDENTAL CONSEQUENTIAL DAMAGES ARISING USE INABILITY USE PROGRAM (INCLUDING LIMITED LOSS DATA DATA RENDERED INACCURATE LOSSES SUSTAINED THIRD PARTIES FAILURE PROGRAM OPERATE PROGRAMS), EVEN HOLDER PARTY ADVISED POSSIBILITY DAMAGES.","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"id_17-interpretation-of-sections-15-and-16","dir":"","previous_headings":"TERMS AND CONDITIONS","what":"17. Interpretation of Sections 15 and 16","title":"GNU General Public License","text":"disclaimer warranty limitation liability provided given local legal effect according terms, reviewing courts shall apply local law closely approximates absolute waiver civil liability connection Program, unless warranty assumption liability accompanies copy Program return fee. END TERMS CONDITIONS","code":""},{"path":"https://ithim.github.io/ITHIM-R/LICENSE.html","id":"how-to-apply-these-terms-to-your-new-programs","dir":"","previous_headings":"","what":"How to Apply These Terms to Your New Programs","title":"GNU General Public License","text":"develop new program, want greatest possible use public, best way achieve make free software everyone can redistribute change terms. , attach following notices program. safest attach start source file effectively state exclusion warranty; file least “copyright” line pointer full notice found. Also add information contact electronic paper mail. program terminal interaction, make output short notice like starts interactive mode: hypothetical commands show w show c show appropriate parts General Public License. course, program’s commands might different; GUI interface, use “box”. also get employer (work programmer) school, , sign “copyright disclaimer” program, necessary. information , apply follow GNU GPL, see . GNU General Public License permit incorporating program proprietary programs. program subroutine library, may consider useful permit linking proprietary applications library. want , use GNU Lesser General Public License instead License. first, please read .","code":" Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type 'show w'. This is free software, and you are welcome to redistribute it under certain conditions; type 'show c' for details."},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":null,"dir":"Reference","previous_headings":"","what":"Add strike and casualty distances to injury tables — add_distance_columns","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"function adds strike casualty distance information individual age sex categories aggregated mode -hit-(whw) --vehicle (nov) injury fatality matrices.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"","code":"add_distance_columns( injury_table, mode_names, true_distances_0, dist, scenarios = SCEN )"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"injury_table (list ) data frame(s) edited, contains aggregated fatality counts split whw nov matrices mode_names modes take distances , taken aggregated modes trip data true_distances_0 population distances add injury table dist table used access bus distance - currently used scenarios scenarios process","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"injury tables strike casualty distance information whw nov matrices","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_distance_columns.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add strike and casualty distances to injury tables — add_distance_columns","text":"function performs following steps: set dataframe containing age sex categories found injury table input data add age sex index mode distances define list two elements whw nov indices used true_distances dataframe age sex categories define list (two elements whw nov) matching indices mode_names casualty modes injury table whw matrix create strike mode indices vector matching strike modes injury table strike_modes vector find strike casualty distances modes injury tables sum across age sex categories individual age sex category. modes exist injury tables known distances, mean mode distances known modes used add strike casualty modes whw nov matrices injuries_list output list","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":null,"dir":"Reference","previous_headings":"","what":"Addition of ghost trips — add_ghost_trips","title":"Addition of ghost trips — add_ghost_trips","text":"Add trips get assigned physical activity component, can used proxy vehicle distances.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Addition of ghost trips — add_ghost_trips","text":"","code":"add_ghost_trips( raw_trip_set, trip_mode = \"bus_driver\", distance_ratio = BUS_TO_PASSENGER_RATIO * DISTANCE_SCALAR_PT, reference_mode = \"bus\", prop_male = 1, agerange_male = \"18, 65\", agerange_female = \"18, 65\", scenario = NA )"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Addition of ghost trips — add_ghost_trips","text":"raw_trip_set data frame trips trip_mode mode add distance_ratio fraction reference distance use calculate new mode distance reference_mode name reference mode prop_male proportion newly added mode assigned males agerange_male age range males associated newly added mode agerange_female age range female drivers associated newly added mode scenario name scenario mode added","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Addition of ghost trips — add_ghost_trips","text":"data frame trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_ghost_trips.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Addition of ghost trips — add_ghost_trips","text":"function creates trips based distance relative another (reference) mode, without altering synthetic population. .e. adds trips get assigned physical activity component. function can used add e.g. car_driver bus_driver trips used proxy vehicle distances needed injury CO2 pathways. can also used add truck commercial motorcycle trips included travel surveys. needed injury pathway, newly added trips assigned trips made males females based proportion males given input parameter. age ranges males females taking newly added trips can also defined. new mode distance equally split number people times number trips per people added. used distance new male trips. proportion female trips tends low, distance calculated male trips split 10 using 10th distance male trips, 10 times many female trips added compared low number female trips added distance used male trips. E.g. number people added 100 1 trip per person 98 trips made males, add 98 male trips 10 * 2 = 20 female trips 10th distance male trips. ensure better representation demographics female trips whilst keeping number newly added trips small possible reduce run time model. function performs following steps: set number people (regards males) trips per per person added find total distance reference mode find age ranges male female trips find number male female participants calculate total distance new mode added based reference distance find speed new mode male trips: define distance range male trip added, assume trip equal length add new male trips sampling given age range (add_trips.R) add age distance categories plus scenario name repeat female trips (assuming female trips 10th distance male trips adding proportionally 10 times many female trips)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":null,"dir":"Reference","previous_headings":"","what":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"Function create personal motorcycle trips Chilean cities","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"","code":"add_motorcycle_trips_Chile(raw_trip_set, PROPORTION_MOTORCYCLE_TRIPS)"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"raw_trip_set data frame trips travel survey PROPORTION_MOTORCYCLE_TRIPS proportion trips travel survey added personal motorcycle trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"original trip data additional personal motorcycle trips added","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_motorcycle_trips_Chile.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Personal motorcycle trips for Chilean cities — add_motorcycle_trips_Chile","text":"function used create personal motorcycle trips Chilean cities motorcycle trips travel surveys. uses input existing travel survey data city proportion travel survey trips added additional new motorcycle trips. Based analysis motorcycle trips travel surveys Santiago, San Antonio, Valparaiso Puerto Montt makes assumptions split male female motorcyclists, number trips per person truncated normal distributions distances ages drivers personal motorcycle trips added. creates new trips assuming trip one stage, .e. trip duration distance equals stage duration distance. function contains following steps: characteristics motorcycle trips added defined set parameters truncated normal distributions male female trip duration set parameters truncated normal distributions male female age ranges find number male female motorcycle trips added divide number new male female trips 2 (= number trips per person) calculate number new participant ids added. number male female trips odd, add additional trip get trip number divisible 2 sample truncated normal distributions find duration new trips (assuming trip consists one stage) sample known age ranges find ages new male female motorcycle trips create new motorcycle trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":null,"dir":"Reference","previous_headings":"","what":"Additional trips for trip data set — add_trips","title":"Additional trips for trip data set — add_trips","text":"Creates data frame given characteristics added existing trip data set.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Additional trips for trip data set — add_trips","text":"","code":"add_trips( trip_ids = 0, new_mode = \"pedestrian\", distance = 1, participant_id = 0, age = 20, sex = \"male\", nTrips = 3, speed = 4.8 )"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Additional trips for trip data set — add_trips","text":"trip_ids ids new trips new_mode mode new trips distance distances sample participant_id participant id new trips age age participant sex sex participant nTrips number trips participant speed speed new trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Additional trips for trip data set — add_trips","text":"data frame trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_trips.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Additional trips for trip data set — add_trips","text":"function used create new trips certain characteristics can added existing trip data set. input distance given upper limit trip distances added function takes number trips per person (nTrips) random samples 1 input distance given. Age sex participant also sampled range input age sex values. function performs following steps: create nTrips new trips sampling distances, ages sexes","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":null,"dir":"Reference","previous_headings":"","what":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"Add walk 'public transport stages' public transport trips walking stage","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"","code":"add_walk_trips(pt_trips)"},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"pt_trips data frame PT trips without walking component","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"list data frames PT trips walk--PT trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/add_walk_trips.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Addition of 'walk to public transport' stages to trip set — add_walk_trips","text":"Function add additional walking stages public transport trips walking stage longer trip duration MINIMUM_PT_TIME plus BUS_WALK_TIME / RAIL_WALK_TIME parameters. MINIMUM_PT_TIME global input parameter determines minimum amount time (minutes) person travelling public transport spends public transport stage. BUS_WALK_TIME / RAIL_WALK_TIME parameter city specific input parameter determines duration walk public transport walking stage. function performs following steps: filter PT stages PT trips keep stage longest duration add one 'walk public transport' stage per trip find trip stages need changing add new 'walk pt' stages. duration public transport stage shorter BUS_WALK_TIME / RAIL_WALK_TIME + MINIMUM_PT_TIME, set new stage duration 3. Otherwise, set new stage duration either BUS_WALK_TIME RAIL_WALK_TIME depending trip mode update original public transport stage duration calculate 'walk pt' stage distance using walking speed update original public transport stage distance using respective public transport speed updated duration keep record number newly added 'walk pt' stages update total trip distances update trip distance categories remove 'walk pt' stages zero duration length","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate relative risk given PM exposure level — AP_dose_response","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"Calculate relative risk (RR) person synthetic population disease related air pollution scenario based individual PM exposure levels","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"","code":"AP_dose_response(cause, dose, quantile, confidence_intervals = F)"},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"cause name disease dose vector PM exposure levels individuals given age range scenario quantile quantile dose response functions used output value confidence_intervals logic: whether return confidence intervals","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"data frame relative risks person synthetic population AP related disease scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/AP_dose_response.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate relative risk given PM exposure level — AP_dose_response","text":"function performs following steps: various checks ensure correct PM exposure levels (doses) disease read get lookup table required dose response functions contains dose median RR upper lower confidence interval RR values PM exposure doses synthetic population find needed RR extrapolating dose responses given lookup table confidence interval required, repeat interpolation using upper lower confidence RR values required quantile 0.5, .e. median, find required RR value defining normal function mean median RR value dose standard deviations defined upper lower confidence RR values. Use correct quantile normal function RR value.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ap_dose_response_curve.html","id":null,"dir":"Reference","previous_headings":"","what":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","title":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","text":"Computes RR DR relationship given four parameters PM2.5 exposure","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ap_dose_response_curve.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","text":"","code":"ap_dose_response_curve(pm, alpha, beta, gamma, tmrel)"},{"path":"https://ithim.github.io/ITHIM-R/reference/ap_dose_response_curve.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","text":"pm PM2.5 exposure alpha DR parameter beta DR parameter gamma DR parameter tmrel DR parameter","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ap_dose_response_curve.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Computes RR as a DR relationship - CURRENTLY NOT USED — ap_dose_response_curve","text":"RR","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":null,"dir":"Reference","previous_headings":"","what":"Assign age groups to individuals — assign_age_groups","title":"Assign age groups to individuals — assign_age_groups","text":"Prunes dataset given max min ages, .e. removes entries people ages outside scope model assigns age group labels given age","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Assign age groups to individuals — assign_age_groups","text":"","code":"assign_age_groups( dataset, age_category = AGE_CATEGORY, age_lower_bounds = AGE_LOWER_BOUNDS, max_age = MAX_AGE, min_age = AGE_LOWER_BOUNDS[1], age_label = \"age\" )"},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Assign age groups to individuals — assign_age_groups","text":"dataset data frame age categories added ages outside model scope removed age_category vector strings giving age categories age_lower_bounds lower boundaries age categories max_age maximum age model min_age minimum age model age_label string label age column","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Assign age groups to individuals — assign_age_groups","text":"edited data frame","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/assign_age_groups.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Assign age groups to individuals — assign_age_groups","text":"function contains following steps: remove dataset entries ages max min ages missing age information add age categories","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/beta_pointiness.html","id":null,"dir":"Reference","previous_headings":"","what":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","title":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","text":"Takes confidence value 0 1 returns parameter beta distribution","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/beta_pointiness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","text":"","code":"beta_pointiness(confidence)"},{"path":"https://ithim.github.io/ITHIM-R/reference/beta_pointiness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","text":"confidence value 0 1 representing confident PA dataset","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/beta_pointiness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Parameterise confidence in PA data - CURRENTLY NOT IN USE — beta_pointiness","text":"value parametrise beta distribution","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"Combine relative risks (RR) air pollution (AP) physical activity (PA) multiplication diseases affected AP PA","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"","code":"combined_rr_ap_pa(ind_pa, ind_ap, conf_int = FALSE)"},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"ind_pa data frame individual RRs diseases affected PA ind_ap data frame individual RRs diseases affected AP conf_int logic: whether include confidence interval dose response relationships ","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"dataframe giving RR risk AP, PA combined AP PA exposure levels every person synthetic population scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combined_rr_ap_pa.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine relative risks from air pollution and physical activity — combined_rr_ap_pa","text":"function performs following steps: join ap pa relative risk datasets loop disease outcomes affected PA AP: scenario multiply relative risks PA AP store new column confidence intervals required, multiply upper lower RR AP PA respectively wherever possible, otherwise use given median RR values instead","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":null,"dir":"Reference","previous_headings":"","what":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"Applies PIF calculated relative risks (RRs) current observed health burden Global Burden Disease data generate scenario health burdens","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"","code":"combine_health_and_pif(pif_values, hc = DISEASE_BURDEN)"},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"pif_values vector values PIFs age sex categories hc data frame current burden disease","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"estimated scenario burden disease age sex categories","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/combine_health_and_pif.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Combine health and potential impact fraction (PIF) — combine_health_and_pif","text":"function performs following steps: current observed health burden particular disease multiplied PIF, .e change fraction disease expected current scenario compared reference scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/complete_trip_distance_duration.html","id":null,"dir":"Reference","previous_headings":"","what":"Add missing trip information — complete_trip_distance_duration","title":"Add missing trip information — complete_trip_distance_duration","text":"Adds missing trip information stage duration stage distance.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/complete_trip_distance_duration.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add missing trip information — complete_trip_distance_duration","text":"","code":"complete_trip_distance_duration()"},{"path":"https://ithim.github.io/ITHIM-R/reference/complete_trip_distance_duration.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add missing trip information — complete_trip_distance_duration","text":"function performs following steps calculate stage duration stage distance. Note need least trip duration stage distance stage stage duration: add speed column stage duration: calculate stage duration stage distance given using mode speeds stage duration sum 'NA' (.e. stage distances exist stage distances ): trip duration exists sum NA, find trip ids 'NA' stage duration replace stage duration trip duration divided number stages particular trip remove remaining trips 'NA' stage distance update stage speed column stage distance: calculate stage distance using stage duration mode speeds trip distance: calculate trip distance summing stage distances","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":null,"dir":"Reference","previous_headings":"","what":"Create scenarios for Bogota — create_bogota_scenarios","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"Creates three scenarios one, mode share given mode elevated set percentage total trips. scenario modes cycle, car, bus.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"","code":"create_bogota_scenarios(trip_set)"},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"trip_set data frame, baseline scenario trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"list baseline scenario three scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_bogota_scenarios.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create scenarios for Bogota — create_bogota_scenarios","text":"function creates three scenarios increasing mode shares cycling, car bus pre-defined percentage total mode shares. assume : total number trips remains trips modes (apart truck, bus driver, car driver commercial motorcycle trips remain unchanged - least initially) converted mode question; truck commercial motorcycle trips remain constant across scenarios whilst bus driver car driver trips updated based new total distance car bus trips increase mode share conducted scenario percentage share across three distance bands mode increased preserved, .e. 10 band 0-2km increasing cycling mode share x still 10 scenario always convert question, independently original overall mode share mode. .e. e.g. 1 5 car scenario 55 total trips. preserve proportion trips distance band. E.g. 20 trips distance band 0-2km, scenario 20 trips still distance band 0-2km. Example: Assume two distance bands B 80 cycling trips lie distance band remaining 20 band B. Assume 60 band B. Assume want increase cycling mode share 5 , need convert 5 cycling trips 5 cycling trips. Overall, leads increase (5 cycling trips, whilst preserving cycling mode shares 80 band 20 distance band 40 preserved. function performs following steps: overall mode shares cycle, car bus modes across three distance categories extracted trip data set trip data extract trip information, calculate total number trips find proportion trips distance category find proportion trips converted mode, scenario distance category define modes changeable (least initially) scenarios divide trip data set modes can changed another set trips whose modes changed split changeable trips also trips distance band create scenarios loop scenarios: loop distance band: find changeable trips mode increased count number trips made mode increased bus scenario aim increase public transport trips, .e. find changeable trips made bus rail count number trips made bus rail find number total trips like convert number trips changeable equals number trips converted, changeable trips converted mode question trips changeable want change, sample number trips change changeable trip ids trips converted changeable trips, convert many trips possible create warning message convert required trips new mode question add trips across distance bands add non-changeable trips update bus_driver car_driver trips create list containing trips scenario elements","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":null,"dir":"Reference","previous_headings":"","what":"Create global scenarios — create_global_scenarios","title":"Create global scenarios — create_global_scenarios","text":"Creates four scenarios one, mode share given mode elevated set percentage total trips. scenario modes cycle, car, bus motorcycle.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Create global scenarios — create_global_scenarios","text":"","code":"create_global_scenarios(trip_set)"},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Create global scenarios — create_global_scenarios","text":"trip_set data frame, baseline scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Create global scenarios — create_global_scenarios","text":"list baseline scenario four mode scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_global_scenarios.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Create global scenarios — create_global_scenarios","text":"function creates four scenarios increasing mode shares cycling, car, bus motorcycle pre-defined percentage total mode shares. assume : total number trips remains trips modes (apart truck, bus driver, car driver commercial motorcycle trips remain unchanged - least initially) converted mode question; truck commercial motorcycle trips remain constant across scenarios whilst bus driver car driver trips updated based new total distance car bus trips increase mode share conducted scenario percentage share across three distance bands mode increased preserved, .e. 10 band 0-2km increasing cycling mode share x still 10 mean mode split across 28 cities (Antofagasta, Arica, Belo Horizonte, Bogota, Buenos Aires, Cali, Copiapo, Coquimbo / La Serena, Gran Valparaiso, Iquique / Alto Hospicio, Medellin, Mexico City, Montevideo, Osorno, Puerto Montt, San Antonio, Santiago, Sao Paulo, Temuco / Padre las Casas, Valdivia, Accra, Bangalore, Cape Town, Delhi, Vizag, Kisumu, Nairobi Port Louis) baseline mode split mode. scenario always convert question, independently original overall mode share mode. .e. e.g. 1 5 car scenario 55 total trips. preserve proportion trips distance band. E.g. 20 trips distance band 0-2km, scenario 20 trips still distance band 0-2km. proportions calculated city individually. Example: Assume two distance bands B 80 cycling trips lie distance band remaining 20 band B. Assume 60 band B. Assume want increase cycling mode share 5 , need convert 5 cycling trips 5 cycling trips. Overall, leads increase (5 cycling trips, whilst preserving cycling mode shares 80 band 20 distance band 40 preserved. function performs following steps: overall mode shares cycle, car, bus motorcycle modes across three distance categories defined trip data extract trip information, calculate total number trips find proportion trips distance category find proportion trips converted mode, scenario distance category define modes changeable (least initially) scenarios divide trip data set modes can changed another set trips whose modes changed split changeable trips also trips distance band create scenarios loop scenarios, .e. 4 different modes: loop distance band: find changeable trips mode increased count number trips made mode increased bus scenario aim increase public transport trips, .e. find changeable trips made bus rail count number trips made bus rail find number total trips like convert number trips changeable equals number trips converted, changeable trips converted mode question trips changeable want change, sample number trips change changeable trip ids trips converted changeable trips, convert many trips possible create warning message convert required trips new mode question add trips across distance bands add non-changeable trips update bus_driver car_driver trips create list containing trips scenario elements","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":null,"dir":"Reference","previous_headings":"","what":"Creates synthetic population — create_synth_pop","title":"Creates synthetic population — create_synth_pop","text":"Creates synthetic population matching individuals trip set individuals physical activity (PA) dataset","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Creates synthetic population — create_synth_pop","text":"","code":"create_synth_pop(raw_trip_set)"},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Creates synthetic population — create_synth_pop","text":"raw_trip_set data frame raw trips taken, bus_driver, new motorcycle truck trips already added","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Creates synthetic population — create_synth_pop","text":"synthetic population trip set pruned","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/create_synth_pop.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Creates synthetic population — create_synth_pop","text":"function performs following steps: adds age category trip physical activity datasets calling assign_age_groups.R match people trip data people physical activity dataset: create synthetic population taking unique participant ids together age gender information trip data (including bus driver, truck, car driver commercial motorcycle trips) assign non-occupational physical activity MMET values synthetic population, following steps performed: sex age category, find proportion people zero non-occupational MMET values also find list people non-zero MMET values BACKGROUND_PA_CONFIDENCE < 1 calling value information script, .e. input values sampled distributions, beta distribution built proportion people zero work leisure MMET values sampled using known proportion mean distribution sample replacement vector 0 MMET values vector non-zero MMET values ( people non-zero work leisure MMET values) using proportion people zero work leisure MMET values assign sampled MMET values synthetic population remove participants trip stage modes Vehicle inventory","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":null,"dir":"Reference","previous_headings":"","what":"Function for Dirichlet parameters — dirichlet_pointiness","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"Function map confidence value parameterisation Dirichlet distribution.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"","code":"dirichlet_pointiness(confidence)"},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"confidence value 0 1","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"parameterisation","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dirichlet_pointiness.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Function for Dirichlet parameters — dirichlet_pointiness","text":"Note parameterisation somewhat arbitrary seems work visual inspection.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":null,"dir":"Reference","previous_headings":"","what":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"Computes exposures (distances) mode parameterise injury regression model, computed Poisson model used ITHIM-Global model predict injury fatalities later stage","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"","code":"distances_for_injury_function(journeys, dist)"},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"journeys data frame total distance (total population) age sex category scenario dist table (total population) distances per mode","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"true_distances (mode distances age sex walking modes car modes combined bus drivers added relevant), injuries_list (list strike, casualty, age, sex mode distance combinations baseline scenarios), reg_model (parameterised Poisson regression model), injuries_for_model (baseline data containing injury counts casualty strike mode combinations associated distance data)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/distances_for_injury_function.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get distances and parameterise Poisson regression model for injuries — distances_for_injury_function","text":"function uses distance data individual injury fatality data perform following steps parameterise Poisson injury regression model: stage modes aggregated walk related stages (walk walk pt) mode (walk), similarly car related journeys bus drivers added bus journeys (relevant) accurately represent people bus Takes Baseline injury tables, split -hit (whw) --vehicle (nov) parts, adds total population distances strike casualty mode (add_distance_columns.R). Distances added age gender category exists information injury counts (injuries_for_model dataframe). exists fatality casualty strike mode age sex category mode distance age sex category, fatalities distances aggregated strike casualty mode. , aggregation still exist fatalities either casualty strike mode distance missing, fatalities removed predict injury counts zero distances. However, happen total distances modes (possibly inferred modes) appear injury data. - data used parameterise Poisson injury model. new list (injuries_list) created containing strike casualty mode age sex combinations together strike casualty mode distances (add_distance_columns()) baseline scenarios. whw model, strike mode casualty pairs strike mode equals casualty mode removed fatalities combinations already added nov matrix. Combinations non-zero strike casualty mode distance also removed. list later used injuries_function_2() function predict fatality counts using Poisson injury regression model. casualty strike mode exponents used account safety number effect added injuries_for_model injuries_list. best possible regression model built using Baseline injury counts distances (injuries_for_model) standard errors small wherever possible. Strike casualty mode pairs cas mode = strike mode removed still exist removed ithim_load_data.R function. Two different forms whw nov matrices defined, taking account age sex information exists. standard errors newly built regression models checked large data aggregated age sex yet, data aggregated new Poisson regression model build. standard errors still large aggregation, message printed screen warning standard errors large.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":null,"dir":"Reference","previous_headings":"","what":"Get distances and duration summaries by mode — dist_dur_tbls","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"Summaries total distances durations spent travelling per mode per scenario, synthetic population","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"","code":"dist_dur_tbls(trip_scen_sets)"},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"trip_scen_sets list synthetic trip sets scenario including baseline","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"list table (total) distances durations per mode per scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/dist_dur_tbls.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get distances and duration summaries by mode — dist_dur_tbls","text":"function performs following steps: loop scenarios (incl Baseline): using trip data, sum across distances stage mode get total distance mode scenario synthetic population sum across duration stage mode get total duration mode scenario 'walk_to_pt' stages exist, add pedestrian stages duration distance create one dataframe containing total distances mode scenario create one dataframe containing total duration mode scenario remove 'walk_to_pt' stages added pedestrian stages update bus car driver distances duration scenarios using ratio bus/car bus_driver/car_driver baseline scenario ( redundant GLOBAL, BOGOTA, AFRICA_INDIA LATAM scenario definitions bus car driver distances already updated scenario creation)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":null,"dir":"Reference","previous_headings":"","what":"Get relative risk for diseases given PM exposure — gen_ap_rr","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"Computes relative risk (RR) individuals synthetic population disease given PM exposure","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"","code":"gen_ap_rr(pm_conc_pp)"},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"pm_conc_pp individual PM exposures person synthetic population","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"data frame relative risks per person disease scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_ap_rr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get relative risk for diseases given PM exposure — gen_ap_rr","text":"function performs following steps: minimum ages age group corresponding disease risks assigned individuals synthetic population (added PM exposure levels) loop diseases related PM pollution: depending disease (disease different relative risks depending age individual) loop disease specific age groups (just one age group disease) set quantile value dose response curves extracted. running constant mode, quantile usually set 0.5, .e. median dose response curves. running sample mode, quantile can set sampled distribution input parameters. loop scenarios: assign relative risk given disease, age group, quantile scenario relevant people synthetic population calling AP_dose_response() function","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":null,"dir":"Reference","previous_headings":"","what":"Get relative risk for diseases given mMETs — gen_pa_rr","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"Computes relative risks (RR) individuals synthetic population disease given mMETs (PA exposure)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"","code":"gen_pa_rr(mmets_pp, conf_int = F)"},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"mmets_pp individual mMETs","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"data frame relative risks per person per disease","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/gen_pa_rr.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get relative risk for diseases given mMETs — gen_pa_rr","text":"function performs following steps: loop diseases related physical activity levels: set quantile value dose response curves extracted. running constant mode, quantile usually set 0.5, .e. median dose response curves. running sample mode, quantile can set sampled distribution input parameters. create one vector containing mMET values scenarios assign relative risk given disease quantile given mMET values people synthetic population scenarios calling drpa::dose_response function extract RR scenario vector containing RR scenarios confidence intervals required, also extract RR upper lower confidence values scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":null,"dir":"Reference","previous_headings":"","what":"Find population distances by mode for entire population — get_all_distances","title":"Find population distances by mode for entire population — get_all_distances","text":"Function find distances travelled age, sex, scenario mode entire population rather just synthetic population.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Find population distances by mode for entire population — get_all_distances","text":"","code":"get_all_distances(ithim_object)"},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Find population distances by mode for entire population — get_all_distances","text":"ithim_object list containing city specific information including synthetic trip set","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Find population distances by mode for entire population — get_all_distances","text":"ithim_object , additional total population distance mode scenario, distances injury pathway plus parameterised Poisson injury regression model","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_all_distances.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Find population distances by mode for entire population — get_all_distances","text":"function performs following steps: generate distance duration matrices age, sex, mode scenario ithim_object$trip_scen_sets synthetic population calling dist_dur_tbls() function find total mode distances scenario scale distance travelled entire population using demographic information city order scale distances age, sex, mode scenario entire population, proportion distances travelled age, sex, mode scenario combination synthetic population total distances mode scenario synthetic population found. total population distances mode multiplied proportions find total population distances travelled mode age sex category. distances_for_injury_function() function called creates list inj_distances added ithim_object containing following matrices: true_distances (population mode distances age sex walking modes car modes combined bus drivers added relevant) injuries_list (list strike, casualty, age, sex mode distance combinations baseline scenarios, used predict fatalities later model run) reg_model (parameterised Poisson injury regression model) injuries_for_model (baseline data containing injury counts casualty strike mode combinations associated distance data)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":null,"dir":"Reference","previous_headings":"","what":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"Computes mode shares different distance categories maximum mode share specified mode types specified distance categories across specified (stored) cities. Used max mode share scenario generation.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"","code":"get_scenario_settings( cities = c(\"accra\", \"bangalore\", \"belo_horizonte\", \"bogota\", \"buenos_aires\", \"cape_town\", \"delhi\", \"mexico_city\", \"santiago\", \"sao_paulo\", \"vizag\"), modes = c(\"pedestrian\", \"cycle\", \"car\", \"motorcycle\", \"bus\"), distances = c(\"0-2 km\", \"2-6 km\", \"6+ km\"), speeds = list(bus = 8.1, bus_driver = 8.1, minibus = 8.1, minibus_driver = 8.1, car = 13.8, car_driver = 13.8, taxi = 13.8, pedestrian = 2.5, walk_to_pt = 2.5, cycle = 7.2, motorcycle = 15.2, truck = 8.1, van = 13.8, subway = 18.1, rail = 21.9, auto_rickshaw = 4, shared_auto = 13.8, shared_taxi = 13.8, cycle_rickshaw = 4, other = 9.1) )"},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"cities cities use modes modes use distances distance categories use speeds named list mode speeds (applied cities)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"data frame maximum proportions mode distance category","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_scenario_settings.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Get values for mode share across distance categories and for max mode share scenario\r\n - CURRENTLY only used when calling summary_tables.Rmd — get_scenario_settings","text":"function performs following steps: define minimum distances distance category loop pre-defined cities: read trip data get data correct format assign distance categories distance category pre-defined mode find proportional modal share (distance category, proportion modes adds 100 rail trips exist, added proportion bus trips get one value public transport find maximum mode shares mode distance category city print one table showing mode shares distance category","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_synthetic_from_trips.html","id":null,"dir":"Reference","previous_headings":"","what":"Generate synthetic population from trip data — get_synthetic_from_trips","title":"Generate synthetic population from trip data — get_synthetic_from_trips","text":"Sequence functions set synthetic population, synthetic trips, scenarios.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_synthetic_from_trips.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Generate synthetic population from trip data — get_synthetic_from_trips","text":"","code":"get_synthetic_from_trips()"},{"path":"https://ithim.github.io/ITHIM-R/reference/get_synthetic_from_trips.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Generate synthetic population from trip data — get_synthetic_from_trips","text":"data frame synthetic trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/get_synthetic_from_trips.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Generate synthetic population from trip data — get_synthetic_from_trips","text":"function performs following steps: columns TRIP_SET put correct order multiply trip distances, stage distances, durations day_to_week scalar divide 7 get distances durations 'average' day week add bus_driver truck trips required (add_ghost_trips()) add personal motorcycle trips needed (call appropriate function) add commercial motorcycle trips required (add_ghost_trips()) build synthetic population creating data set contains (non-zero) participant ids demographic information trip data set adds work leisure MMET values calling create_synth_pop() (non travel entries trip data set also removed) adds car driver trips required (add_ghost_trips()) call ithim_setup_baseline_scenario() function get baseline data correct format creation different scenarios create required scenarios calling appropriate function add walk pt trips combine scenarios one dataframe calling walk_to_pt_and_combine_scen() function","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":null,"dir":"Reference","previous_headings":"","what":"Compute health burden — health_burden","title":"Compute health burden — health_burden","text":"Compute health burden population scenarios given relative risks diseases","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Compute health burden — health_burden","text":"","code":"health_burden(ind_ap_pa, conf_int = F, combined_AP_PA = T)"},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Compute health burden — health_burden","text":"ind_ap_pa dataframe individuals' relative risks diseases conf_int=F logic: whether include confidence interval dose response relationships combined_AP_PA=T logic: whether combine two exposure pathways (AP PA) compute independently","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Compute health burden — health_burden","text":"list dataframes: one deaths per disease per demographic group scenario, likewise YLLs","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/health_burden.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Compute health burden — health_burden","text":"function performs following steps: get demographic disease burden (subset Global Burden Disease dataset) data correct formats join two datasets scale burden data CHRONIC_DISEASE_SCALAR account bias data split dataframe two dataframes, one deaths one years life lost (YLLs) add demographic index (age sex category) dataframe containing individual relative risk different diseases set reference scenarios iterate disease outcomes: define column names loop either 1 2 pathways depending whether PA AP affecting disease whether AP PA pathways combined : extract relevant burden disease specific scenario YLLs deaths find sum relative risks (RR) specific disease age sex category reference scenario loop non-reference scenarios: define column names find sum relative risks (RR) specific disease age sex category non-reference scenario calculate PIF (potential impact fraction), .e proportional change sum relative risks reference non-reference scenario age sex category calculate health burden (deaths ylls) non-reference scenario compared reference scenario multiplying current burden disease PIF (combine_health_and_pif.R) confidence intervals required, loop upper lower confidence interval limits calculate health burden deaths YLLs using upper lower confidence relative risks. upper lower relative risk values exist, use median value instead","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":null,"dir":"Reference","previous_headings":"","what":"Predict injuries — injuries_function_2","title":"Predict injuries — injuries_function_2","text":"Predict injuries baseline scenarios based Poisson regression model fitted baseline fatality counts distances","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Predict injuries — injuries_function_2","text":"","code":"injuries_function_2( true_distances, injuries_list, reg_model, constant_mode = F )"},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Predict injuries — injuries_function_2","text":"true_distances data frame containing population distances scenario injuries_list list dataframes set scenario specific information supply regression model prediction reg_model Poisson injury regression model constant_mode whether constant (vs sampling) mode","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Predict injuries — injuries_function_2","text":"injuries2 - dataframe containing predicted fatality counts casualty mode age sex scenario, plus confidence interval limits constant mode whw_temp - list containing fatality predictions casualty strike mode pair split whw nov matrices scenario. Upper lower confidence interval predictions also included constant mode","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injuries_function_2.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Predict injuries — injuries_function_2","text":"function uses Poisson regression model built distances_for_injury_function() predict fatality counts Baseline scenarios. performs following steps: create injuries data frame containing distances travelled mode, age, sex scenario predict fatalities strike casualty mode combination, age sex category scenario (incl Baseline). sample mode set 'constant' ('sample'), also predict upper lower confidence interval boundaries create whw_temp list containing total predicted fatality counts casualty strike mode pair scenario split whw nov matrices , constant mode also give upper lower confidence interval limit predictions create injuries2 data frame containing total predicted fatality counts casualty mode age sex scenario. dataframe also contains total death per age sex category , constant mode upper lower total death predictions confidence interval.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":null,"dir":"Reference","previous_headings":"","what":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"Calculate YLL burden death burden injury based ratio GBD data.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"","code":"injury_death_to_yll(injuries)"},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"injuries data frame injury deaths age sex category scenario incl. baseline","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"list injury deaths YLLs (given differences reference scenario) plus values reference scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/injury_death_to_yll.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Map injury death burden to YLL (years of life lost) burden — injury_death_to_yll","text":"function performs following steps: join estimated injury deaths global burden disease (GBD) injury data age sex multiply estimated injury deaths yll injury death ratio GBD data predict YLL estimated injury deaths extract create matrices deaths ylls one column scenario create dataframe ylls deaths reference scenario create dataframe B showing differences deaths yll non-reference scenario reference scenario confidence intervals required: create dataframe ylls deaths reference scenario using lower upper relative risk boundary values create dataframe showing differences deaths yll non-reference scenario reference scenario using lower upper relative risk boundary values add confidence upper lower interval boundary values two output dataframes B","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":null,"dir":"Reference","previous_headings":"","what":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"Ordered set computations part ITHIM-Global calculates required output parameters","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"","code":"ithim_calculation_sequence(ithim_object, seed = 1)"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"ithim_object name disease seed","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"ithim_object - list items making ithim result","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_calculation_sequence.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Cascade of computations that form ITHIM-Global — ithim_calculation_sequence","text":"function performs following steps: extract lists variables ithim_object list air pollution pathway: calculate PM2.5 exposure person synthetic population PM2.5 emissions mode scenario (scenario_pm_calculations()) calculate CO2 emissions mode scenario (scenario_co2_calculations()) assign relative risk person synthetic population disease related PM pollution scenario based individual PM exposure levels (gen_ap_rr()) physical activity pathway: calculate total mMETs person synthetic population (total_mmet()) assign relative risk person synthetic population disease related physical activity levels scenario based individual mMET values (gen_pa_rr()) physical activity air pollution combined: combine PA AP datasets joining two datasets. disease affected PA AP calculate joined relative risk multiplying PA AP relative risks (combined_rr_ap_pa()) calculate health burden (Yll deaths) disease age sex category (health_burden()): calculate health burden (Yll deaths) disease age sex category. Combine AP PA pathways diseases affected AP PA running constant mode also calculate health burden AP PA pathways separately injury pathway: estimate injury deaths baseline scenario age sex category, also estimate total injury deaths counts -hit---vehicle matrices casualty (strike) mode baseline scenario (injuries_function2()) running constant mode include upper lower confidence intervals calculate years life lost injury deaths (injury_death_to_yll()) combine pathways using outputs 3. 4.: combine AP, PA injury health burden data ylls deaths (join_hb_and_injury()) diseases, injuries scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_load_data.html","id":null,"dir":"Reference","previous_headings":"","what":"Load data for model and prepare input data for model — ithim_load_data","title":"Load data for model and prepare input data for model — ithim_load_data","text":"Loads processes data files using city specific local data global data. Processes input data ready ITHIM-Global model run. Writes objects global environment.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_load_data.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Load data for model and prepare input data for model — ithim_load_data","text":"","code":"ithim_load_data( speeds = list(bus = 8.1, bus_driver = 8.1, minibus = 8.1, minibus_driver = 8.1, car = 13.8, car_driver = 13.8, taxi = 13.8, pedestrian = 2.5, walk_to_pt = 2.5, cycle = 7.2, motorcycle = 15.2, truck = 8.1, van = 13.8, subway = 18.1, rail = 21.9, auto_rickshaw = 4, shared_auto = 13.8, shared_taxi = 13.8, cycle_rickshaw = 4, other = 9.1) )"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_load_data.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Load data for model and prepare input data for model — ithim_load_data","text":"speeds named list mode speeds","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_load_data.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Load data for model and prepare input data for model — ithim_load_data","text":"function performs following steps load process input data: find path ithimr package global local data can found check whether drpa package installed read Global Burden Disease data country read city specific trip data: set missing stage trip information known stage trip information, e.g. stage duration missing trip duration known set stage duration trip duration ensure stage modes trip modes consist set keywords, replace mode names key words, e.g. replace 'train' 'rail' remove trips age sex 'NA' Rename pedestrian stage modes non-pedestrian trips 'pedestrian' 'walk_to_pt' (call get_scenario_settings() using max_mode_share_scenario) read local Global Burden Disease (GBD) data: combine various head neck cancers, combine myeloid leukemia diseases, combine respiratory diseases level 2 adjust rectum cancer combined colon rectum cancer burden read local demographic data: find / re-define max min ages based max min ages trip data, demographic data max min ages considered model remove population data outside max min ages find proportion total population considered model total population get age-category details population data, ages max min ages removed extract diseases plus road injures GBD data, update format max min ages entry compute proportion injuries age range considered model GBD data, proportion applied injury datasets without age sex information remove ages outside age ranges considered model GBD_data create burden_of_disease dataframe GBD_data changing layout GBD_data: add city specific population data add country specific disease rate GBD data, ie. proportion number people country disease population country age sex category using country disease rate calculate city population affected disease using burden_of_disease data (now called DISEASE_BURDEN), calculate ratio YLL death age sex category road_injuries data read city specific road injury data: Set 'weight' column unique number years injury data exists (column already exist) strike mode equals casualty mode, set strike mode 'nov' (vehicle) call set_injury_contingency.R function set tables WHW (hit ) NOV (vehicle) fatalities","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":null,"dir":"Reference","previous_headings":"","what":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"Set baseline scenario ready scenario development","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"","code":"ithim_setup_baseline_scenario(trip_set)"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"trip_set data frame trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"trip_set baseline scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_baseline_scenario.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set up baseline scenario data frame — ithim_setup_baseline_scenario","text":"function performs following steps trip set data: add distance categories add scenario='baseline' column","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":null,"dir":"Reference","previous_headings":"","what":"Set parameters for ITHIM-Global run — ithim_setup_parameters","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"Function set parameters either using constant value sampling pre-defined function","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"","code":"ithim_setup_parameters( NSAMPLES = 1, BUS_WALK_TIME = 16, RAIL_WALK_TIME = 12.5, CYCLING_MET = 6.8, WALKING_MET = 3.5, PASSENGER_MET = 1.3, CAR_DRIVER_MET = 2.5, MOTORCYCLIST_MET = 2.8, SEDENTARY_ACTIVITY_MET = 1.3, LIGHT_ACTIVITY_MET = 1.3, MODERATE_PA_MET = 4, VIGOROUS_PA_MET = 8, PM_CONC_BASE = 12.69, PM_TRANS_SHARE = 0.42, PA_DOSE_RESPONSE_QUANTILE = F, AP_DOSE_RESPONSE_QUANTILE = F, BACKGROUND_PA_SCALAR = 1, BACKGROUND_PA_CONFIDENCE = 1, INJURY_REPORTING_RATE = 1, CHRONIC_DISEASE_SCALAR = 1, DAY_TO_WEEK_TRAVEL_SCALAR = 7, SIN_EXPONENT_SUM = 2, CASUALTY_EXPONENT_FRACTION = 0.5, SIN_EXPONENT_SUM_NOV = 1, SIN_EXPONENT_SUM_CYCLE = 2, CASUALTY_EXPONENT_FRACTION_CYCLE = 0.5, SIN_EXPONENT_SUM_PED = 2, CASUALTY_EXPONENT_FRACTION_PED = 0.5, SIN_EXPONENT_SUM_VEH = 2, CASUALTY_EXPONENT_FRACTION_VEH = 0.5, BUS_TO_PASSENGER_RATIO = 0.0389, CAR_OCCUPANCY_RATIO = 0.625, TRUCK_TO_CAR_RATIO = 0.3, FLEET_TO_MOTORCYCLE_RATIO = 0.441, PROPORTION_MOTORCYCLE_TRIPS = 0, PM_EMISSION_INVENTORY_CONFIDENCE = 1, CO2_EMISSION_INVENTORY_CONFIDENCE = 1, DISTANCE_SCALAR_CAR_TAXI = 1, DISTANCE_SCALAR_WALKING = 1, DISTANCE_SCALAR_PT = 1, DISTANCE_SCALAR_CYCLING = 1, DISTANCE_SCALAR_MOTORCYCLE = 1, BUS_DRIVER_PROP_MALE = 0.98, BUS_DRIVER_MALE_AGERANGE = \"19, 65\", BUS_DRIVER_FEMALE_AGERANGE = \"19, 65\", TRUCK_DRIVER_PROP_MALE = 0.98, TRUCK_DRIVER_MALE_AGERANGE = \"18, 65\", TRUCK_DRIVER_FEMALE_AGERANGE = \"18, 65\", COMMERCIAL_MBIKE_PROP_MALE = 0.99, COMMERCIAL_MBIKE_MALE_AGERANGE = \"18, 65\", COMMERCIAL_MBIKE_FEMALE_AGERANGE = \"18, 65\", MINIMUM_PT_TIME = 3, MODERATE_PA_CONTRIBUTION = 0.5, CALL_INDIVIDUAL_SIN = F, SCENARIO_NAME = \"GLOBAL\", SCENARIO_INCREASE = 0.05 )"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"NSAMPLES constant integer: number samples take BUS_WALK_TIME lognormal parameter: duration walk bus stage RAIL_WALK_TIME lognormal parameter: duration walk rail stage CYCLING_MET lognormal parameter: METs cycling WALKING_MET lognormal parameter: METs walking PASSENGER_MET lognormal parameter: MET value associated passenger public transport CAR_DRIVER_MET lognormal parameter: MET value associated car driver MOTORCYCLIST_MET lognormal parameter: MET value associated motorcyclist SEDENTARY_ACTIVITY_MET lognormal parameter: MET value associated sedentary activity LIGHT_ACTIVITY_MET lognormal parameter: MET value associated light activity MODERATE_PA_MET lognormal parameter: MET value associated moderate activity VIGOROUS_PA_MET lognormal parameter: MET value associated vigorous activity PM_CONC_BASE lognormal parameter: background PM2.5 concentration PM_TRANS_SHARE beta parameter: fraction background PM2.5 attributable transport PA_DOSE_RESPONSE_QUANTILE logic: whether sample physical activity relative risk dose response functions AP_DOSE_RESPONSE_QUANTILE logic: whether sample air pollution relative risk dose response functions BACKGROUND_PA_SCALAR lognormal parameter: reporting scalar physical activity correct bias data BACKGROUND_PA_CONFIDENCE beta parameter: confidence accuracy zero non-travel physical activity levels INJURY_REPORTING_RATE lognormal parameter: rate injury fatality reporting CHRONIC_DISEASE_SCALAR lognormal parameter: scalar background disease rates adjust bias GBD data DAY_TO_WEEK_TRAVEL_SCALAR beta parameter: rate scaling travel one day one week - CURRENTLY used constant (using beta parameter need considerations) SIN_EXPONENT_SUM lognormal parameter: linearity injuries respect two modes. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION beta parameter: casualty exponent contribution SIN_EXPONENT_SUM SIN_EXPONENT_SUM_NOV lognormal parameter: linearity injuries respect two modes strike mode = NOV. SIN_EXPONENT_SUM=2 means safety numbers SIN_EXPONENT_SUM_CYCLE lognormal parameter: linearity injuries respect two modes victim mode = cycle. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_CYCLE beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_CYCLE victim mode = cycle SIN_EXPONENT_SUM_PED lognormal parameter: linearity injuries respect two modes victim mode = pedestrian. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_PED beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_PED victim mode = pedestrian SIN_EXPONENT_SUM_VEH lognormal parameter: linearity injuries respect two modes victim mode = vehicle. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_VEH beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_VEH victim mode = vehicle BUS_TO_PASSENGER_RATIO beta parameter: number buses per passenger CAR_OCCUPANCY_RATIO beta parameter: number people per car (including driver) TRUCK_TO_CAR_RATIO beta parameter: proportion truck car vehicle km travelled FLEET_TO_MOTORCYCLE_RATIO beta parameter: amount motorcycle trips added commercial trips PROPORTION_MOTORCYCLE_TRIPS beta parameter: proportion trips added personal motorcycle trips PM_EMISSION_INVENTORY_CONFIDENCE beta parameter: confidence accuracy PM emission inventory CO2_EMISSION_INVENTORY_CONFIDENCE beta parameter: confidence accuracy CO2 emission inventory DISTANCE_SCALAR_CAR_TAXI lognormal parameter: scalar adjust bias car distance travelled DISTANCE_SCALAR_WALKING lognormal parameter: scalar adjust bias walking distance travelled DISTANCE_SCALAR_PT lognormal parameter: scalar adjust bias PT distance travelled DISTANCE_SCALAR_CYCLING lognormal parameter: scalar adjust bias cycling distance travelled DISTANCE_SCALAR_MOTORCYCLE lognormal parameter: scalar adjust biase motorcycle distance travelled BUS_DRIVER_PROP_MALE scalar: proportion bus drivers male BUS_DRIVER_MALE_AGERANGE character: age range male bus drivers BUS_DRIVER_FEMALE_AGERANGE character: age range female bus drivers TRUCK_DRIVER_PROP_MALE scalar: proportion truck drivers male TRUCK_DRIVER_MALE_AGERANGE character: age range male truck drivers TRUCK_DRIVER_FEMALE_AGERANGE character: age range female truck drivers COMMERCIAL_MBIKE_PROP_MALE scalar: proportion commercial motorcycle drivers male COMMERCIAL_MBIKE_MALE_AGERANGE character: age range male commercial motorcycle drivers COMMERCIAL_MBIKE_FEMALE_AGERANGE character: age range female commercial motorcycle drivers MINIMUM_PT_TIME scalar: minimum time person spends public transport MODERATE_PA_CONTRIBUTION scalar: proportion contribution moderate PA Leisure MVPA CALL_INDIVIDUAL_SIN logic: whether call safety number coefficients individual vehicles use coefficients modes","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"list samples uncertain parameters","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_setup_parameters.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Set parameters for ITHIM-Global run — ithim_setup_parameters","text":"input parameters two options: set constant, sampled specified distribution. parameter given argument length 1 2. length 1, constant, set global environment. length 2, distribution defined sampled NSAMPLE times. exceptions, listed . function performs following steps: set input parameters global environment (sampling function called, overwritten) loop potential variables lognormal distribution sample distribution required loop potential variables beta distribution sample distribution required BACKGROUND_PA_CONFIDENCE<1 add BACKGROUND_PA_ZEROS parameters PM_EMISSION_INVENTORY_CONFIDENCE<1, sample PM inventory values using Dirichlet distribution parameterised gamma random variables CO2_EMISSION_INVENTORY_CONFIDENCE<1, sample CO2 inventory values using Dirichlet distribution parameterised gamma random variables PA_DOSE_RESPONSE_QUANTILE == T, find diseases related physical activity levels assign quantile sampling uniform distribution 0 1 AP_DOSE_RESPONSE_QUANTILE == T, find diseases related air pollution levels assign quantile sampling uniform distribution 0 1 bottom function, dirichlet_pointiness() function defined parameterises Dirichlet distributions PM CO2 emission inventories.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":null,"dir":"Reference","previous_headings":"","what":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"Sets sampled parameters global environment calls ITHIM routine","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"","code":"ithim_uncertainty(ithim_object, seed = 1)"},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"ithim_object list necessary inputs, including parameters seed sample take","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"list ITHIM outcomes","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/ithim_uncertainty.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Sampling routine for running ITHIM with uncertainty — ithim_uncertainty","text":"function works performing following steps: extract ithim_object list entries extract sampled parameters stored ithim_object call set_vehicle_inventory() update emissions emission parameters sampled distribution call get_synthetic_from_trips() update synthetic trips synthetic population relevant input parameters sampled distribution call get_all_distances() recalculate distances relevant input parameters sampled distribution run ITHIM-Global model calling ithim_calculation_sequence()","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":null,"dir":"Reference","previous_headings":"","what":"Join disease health burden and injury data — join_hb_and_injury","title":"Join disease health burden and injury data — join_hb_and_injury","text":"Join two data frames health burden: disease, road-traffic injury","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Join disease health burden and injury data — join_hb_and_injury","text":"","code":"join_hb_and_injury(ind_ap_pa, inj)"},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Join disease health burden and injury data — join_hb_and_injury","text":"ind_ap_pa list (deaths, YLLs) data frames demographic groups' burdens diseases inj list (deaths, YLLs) data frames demographic groups' burdens road-traffic injury","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Join disease health burden and injury data — join_hb_and_injury","text":"list dataframes: one deaths per cause per demographic group, likewise YLLs","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/join_hb_and_injury.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Join disease health burden and injury data — join_hb_and_injury","text":"function performs following steps: extract yll deaths data AP PA pathways extract yll deaths data injury data create one dataframe yll one deaths containing AP, PA injury data","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":null,"dir":"Reference","previous_headings":"","what":"Wrapper for running ITHIM — run_ithim","title":"Wrapper for running ITHIM — run_ithim","text":"Switch either calculate health burden using constant input parameter values sample distributions first","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Wrapper for running ITHIM — run_ithim","text":"","code":"run_ithim(ithim_object, seed = 1)"},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Wrapper for running ITHIM — run_ithim","text":"ithim_object list input data needed calculate health burden seed","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Wrapper for running ITHIM — run_ithim","text":"ithim_object list items giving input data output results","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Wrapper for running ITHIM — run_ithim","text":"function works creating switch run computation calling ithim_calculation_sequence() directly, divert sampling case ithim_uncertainty() first extracts sampled parameters calls ithim_calculation_sequence().","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":null,"dir":"Reference","previous_headings":"","what":"Run the set up scripts for ITHIM — run_ithim_setup","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"Sets basic ITHIM object onward calculation. Data loading, processing harmonisation. Setting global values.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"","code":"run_ithim_setup( seed = 1, CITY = \"bogota\", speeds = NULL, PM_emission_inventory = NULL, CO2_emission_inventory = NULL, DIST_CAT = c(\"0-2 km\", \"2-6 km\", \"6+ km\"), AGE_RANGE = c(15, 69), ADD_WALK_TO_PT_TRIPS = T, ADD_BUS_DRIVERS = T, ADD_CAR_DRIVERS = T, ADD_TRUCK_DRIVERS = T, ADD_MOTORCYCLE_FLEET = T, ADD_PERSONAL_MOTORCYCLE_TRIPS = \"no\", REFERENCE_SCENARIO = \"baseline\", PATH_TO_LOCAL_DATA = NULL, NSAMPLES = 1, BUS_WALK_TIME = 16, RAIL_WALK_TIME = 12.5, CYCLING_MET = 6.8, WALKING_MET = 3.5, PASSENGER_MET = 1.3, CAR_DRIVER_MET = 2.5, MOTORCYCLIST_MET = 2.8, SEDENTARY_ACTIVITY_MET = 1.3, LIGHT_ACTIVITY_MET = 1.3, MODERATE_PA_MET = 4, VIGOROUS_PA_MET = 8, PM_CONC_BASE = 12.69, PM_TRANS_SHARE = 0.42, PA_DOSE_RESPONSE_QUANTILE = F, AP_DOSE_RESPONSE_QUANTILE = F, BACKGROUND_PA_SCALAR = 1, BACKGROUND_PA_CONFIDENCE = 1, INJURY_REPORTING_RATE = 1, CHRONIC_DISEASE_SCALAR = 1, DAY_TO_WEEK_TRAVEL_SCALAR = 7, SIN_EXPONENT_SUM = 2, CASUALTY_EXPONENT_FRACTION = 0.5, SIN_EXPONENT_SUM_NOV = 1, SIN_EXPONENT_SUM_CYCLE = 2, CASUALTY_EXPONENT_FRACTION_CYCLE = 0.5, SIN_EXPONENT_SUM_PED = 2, CASUALTY_EXPONENT_FRACTION_PED = 0.5, SIN_EXPONENT_SUM_VEH = 2, CASUALTY_EXPONENT_FRACTION_VEH = 0.5, BUS_TO_PASSENGER_RATIO = 0.0389, CAR_OCCUPANCY_RATIO = 0.625, TRUCK_TO_CAR_RATIO = 0.3, FLEET_TO_MOTORCYCLE_RATIO = 0.441, PROPORTION_MOTORCYCLE_TRIPS = 0, PM_EMISSION_INVENTORY_CONFIDENCE = 1, CO2_EMISSION_INVENTORY_CONFIDENCE = 1, DISTANCE_SCALAR_CAR_TAXI = 1, DISTANCE_SCALAR_WALKING = 1, DISTANCE_SCALAR_PT = 1, DISTANCE_SCALAR_CYCLING = 1, DISTANCE_SCALAR_MOTORCYCLE = 1, BUS_DRIVER_PROP_MALE = 0.98, BUS_DRIVER_MALE_AGERANGE = \"19, 65\", BUS_DRIVER_FEMALE_AGERANGE = \"19, 65\", TRUCK_DRIVER_PROP_MALE = 0.98, TRUCK_DRIVER_MALE_AGERANGE = \"18, 65\", TRUCK_DRIVER_FEMALE_AGERANGE = \"18, 65\", COMMERCIAL_MBIKE_PROP_MALE = 0.99, COMMERCIAL_MBIKE_MALE_AGERANGE = \"18, 65\", COMMERCIAL_MBIKE_FEMALE_AGERANGE = \"18, 65\", MINIMUM_PT_TIME = 3, MODERATE_PA_CONTRIBUTION = 0.5, CALL_INDIVIDUAL_SIN = F, SCENARIO_NAME = \"GLOBAL\", SCENARIO_INCREASE = 0.05 )"},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"seed set seed get results sampling distribution CITY name city, name directory containing city data files speeds named list mode speeds PM_emission_inventory named list mode PM emissions CO2_emission_inventory named list CO2 mode emissions DIST_CAT vector string distance categories form '0-6'. (unit assumed trip set related speed values, usually km) AGE_RANGE vector minimum maximum ages include ADD_WALK_TO_PT_TRIPS logic: whether add short walks PT trips ADD_BUS_DRIVERS logic: whether add bus drivers ADD_CAR_DRIVERS logic: whether find add distance travelled individual cars, denoted car drivers ADD_TRUCK_DRIVERS logic: whether add truck drivers ADD_MOTORCYCLE_FLEET logic: whether add additional commercial motorcycle fleet ghost trips ADD_PERSONAL_MOTORCYCLE_TRIPS character: '' add personal motorcycle trips otherwise set geographic region defines set-motorcycle trips added REFERENCE_SCENARIO scenario forms reference health comparison PATH_TO_LOCAL_DATA path CITY directory, using package NSAMPLES constant integer: number samples take BUS_WALK_TIME lognormal parameter: duration walk bus stage RAIL_WALK_TIME lognormal parameter: duration walk rail stage CYCLING_MET lognormal parameter: METs cycling WALKING_MET lognormal parameter: METs walking PASSENGER_MET lognormal parameter: MET value associated passenger public transport CAR_DRIVER_MET lognormal parameter: MET value associated car driver MOTORCYCLIST_MET lognormal parameter: MET value associated motorcyclist SEDENTARY_ACTIVITY_MET lognormal parameter: MET value associated sedentary activity LIGHT_ACTIVITY_MET lognormal parameter: MET value associated light activity MODERATE_PA_MET lognormal parameter: MET value associated moderate activity VIGOROUS_PA_MET lognormal parameter: MET value associated vigorous activity PM_CONC_BASE lognormal parameter: background PM2.5 concentration PM_TRANS_SHARE beta parameter: fraction background PM2.5 attributable transport PA_DOSE_RESPONSE_QUANTILE logic: whether sample physical activity relative risk dose response functions AP_DOSE_RESPONSE_QUANTILE logic: whether sample air pollution relative risk dose response functions BACKGROUND_PA_SCALAR lognormal parameter: reporting scalar physical activity correct bias data BACKGROUND_PA_CONFIDENCE beta parameter: confidence accuracy zero non-travel physical activity levels INJURY_REPORTING_RATE lognormal parameter: rate injury fatality reporting CHRONIC_DISEASE_SCALAR lognormal parameter: scalar background disease rates adjust bias GBD data DAY_TO_WEEK_TRAVEL_SCALAR beta parameter: rate scaling travel one day one week - CURRENTLY used constant (using beta parameter need considerations) SIN_EXPONENT_SUM lognormal parameter: linearity injuries respect two modes. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION beta parameter: casualty exponent contribution SIN_EXPONENT_SUM SIN_EXPONENT_SUM_NOV lognormal parameter: linearity injuries respect two modes strike mode = NOV. SIN_EXPONENT_SUM=2 means safety numbers SIN_EXPONENT_SUM_CYCLE lognormal parameter: linearity injuries respect two modes victim mode = cycle. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_CYCLE beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_CYCLE victim mode = cycle SIN_EXPONENT_SUM_PED lognormal parameter: linearity injuries respect two modes victim mode = pedestrian. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_PED beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_PED victim mode = pedestrian SIN_EXPONENT_SUM_VEH lognormal parameter: linearity injuries respect two modes victim mode = vehicle. SIN_EXPONENT_SUM=2 means safety numbers CASUALTY_EXPONENT_FRACTION_VEH beta parameter: casualty exponent contribution SIN_EXPONENT_SUM_VEH victim mode = vehicle BUS_TO_PASSENGER_RATIO beta parameter: number buses per passenger CAR_OCCUPANCY_RATIO beta parameter: number people per car (including driver) TRUCK_TO_CAR_RATIO beta parameter: proportion truck car vehicle km travelled FLEET_TO_MOTORCYCLE_RATIO beta parameter: amount motorcycle trips added commercial trips PROPORTION_MOTORCYCLE_TRIPS beta parameter: proportion trips added personal motorcycle trips PM_EMISSION_INVENTORY_CONFIDENCE beta parameter: confidence accuracy PM emission inventory CO2_EMISSION_INVENTORY_CONFIDENCE beta parameter: confidence accuracy CO2 emission inventory DISTANCE_SCALAR_CAR_TAXI lognormal parameter: scalar adjust bias car distance travelled DISTANCE_SCALAR_WALKING lognormal parameter: scalar adjust bias walking distance travelled DISTANCE_SCALAR_PT lognormal parameter: scalar adjust bias PT distance travelled DISTANCE_SCALAR_CYCLING lognormal parameter: scalar adjust bias cycling distance travelled DISTANCE_SCALAR_MOTORCYCLE lognormal parameter: scalar adjust biase motorcycle distance travelled BUS_DRIVER_PROP_MALE scalar: proportion bus drivers male BUS_DRIVER_MALE_AGERANGE character: age range male bus drivers BUS_DRIVER_FEMALE_AGERANGE character: age range female bus drivers TRUCK_DRIVER_PROP_MALE scalar: proportion truck drivers male TRUCK_DRIVER_MALE_AGERANGE character: age range male truck drivers TRUCK_DRIVER_FEMALE_AGERANGE character: age range female truck drivers COMMERCIAL_MBIKE_PROP_MALE scalar: proportion commercial motorcycle drivers male COMMERCIAL_MBIKE_MALE_AGERANGE character: age range male commercial motorcycle drivers COMMERCIAL_MBIKE_FEMALE_AGERANGE character: age range female commercial motorcycle drivers MINIMUM_PT_TIME scalar: minimum time person spends public transport MODERATE_PA_CONTRIBUTION scalar: proportion contribution moderate PA Leisure MVPA CALL_INDIVIDUAL_SIN logic: whether call safety number coefficients individual vehicles use coefficients modes SCENARIO_NAME name scenarios (currently supports: TEST_WALK_SCENARIO, TEST_CYCLE_SCENARIO, MAX_MODE_SHARE_SCENARIO, LATAM, GLOBAL, AFRICA_INDIA, BOGOTA) SCENARIO_INCREASE increase given mode scenario (currently used GLOBAL, BOGOTA, LATAM AFRICA_INDIA scenarios)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"ithim_object list objects onward use.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/run_ithim_setup.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Run the set up scripts for ITHIM — run_ithim_setup","text":"function used read various input files parameters process harmonise data ready health impact assessment. Input Parameters two options: set constant sampled pre-specified distribution. parameters given argument length 1 2. length 1, parameter usually used constant. parameter length 2, distribution defined sampled NSAMPLE times. function performs following steps: check whether valid scenario name called, get error message set various input parameters global parameters find path local data define fixed parameters air pollution inhalation define mode speeds: set default speeds various modes update default speeds city specific mode speeds given input parameters ensure similar modes speed assigned set-dataframe modes speeds define PM emissions inventory define default emission values update default values city specific values given input parameters define CO2 emissions inventory set default emission values update default values city specific values given input parameters load process data files calling ithim_load_data() call ithim_setup_parameters() set given input parameters global environment running constant mode obtain NSAMPLE samples given distributions input parameters running sample mode set flags cause certain parts model called later stage (ithim_uncertainty()) certain input parameters sampled distribution call complete_trip_distance_duration() add missing stage distance information trip data none corresponding input parameters sampled distribution, call set_vehicle_inventory() create dataframe mode specific speed, distance emission information none corresponding input parameters sampled distribution, call get_synthetic_from_trips() set synthetic trips synthetic population none corresponding input parameters sampled distribution, call get_all_distances() calculate trip distances","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":null,"dir":"Reference","previous_headings":"","what":"Scale trip distances — scale_trip_distances","title":"Scale trip distances — scale_trip_distances","text":"Applies mode-specific distance scalars trips","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Scale trip distances — scale_trip_distances","text":"","code":"scale_trip_distances(trips)"},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Scale trip distances — scale_trip_distances","text":"trips data frame, trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Scale trip distances — scale_trip_distances","text":"data frame, trips scenarios scaled distances","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scale_trip_distances.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Scale trip distances — scale_trip_distances","text":"function used multiply trip stages belonging certain mode city specific scalar. Note walk pt stages counted public transport stages multiplied DISTANCE_SCALAR_PT function performs following steps: define car public transport modes multiply stage distances stage durations corresponding distance scalars","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"Calculate total CO2 exposure mode scenario based CO2 emissions inventory","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"","code":"scenario_co2_calculations(dist)"},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"dist data frame population travel scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"total CO2 exposure per mode","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_co2_calculations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate total CO2 exposure per mode and scenario — scenario_co2_calculations","text":"function performs following steps: calculate emission factors mode dividing total emissions distances travelled calculate CO2 emissions mode scenario multiplying scenario distance times emission factors modes without assigned distance, use CO2 emissions VEHICLE_INVENTORY instead","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate total AP exposure per person — scenario_pm_calculations","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"Calculate total AP exposure per person based population personal travel","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"","code":"scenario_pm_calculations(dist, trip_scen_sets)"},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"dist total distance travelled mode population scenarios trip_scen_sets trips data frame trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"background PM concentration baseline scenarios total AP exposure per person synthetic population (baseline scenarios)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/scenario_pm_calculations.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate total AP exposure per person — scenario_pm_calculations","text":"function performs following steps: exposure factor rates activity defined - parameters fixed calculate pm concentration related transport calculate PM emission factors mode dividing total emissions distances travelled calculate PM emissions mode scenario multiplying scenario distance emission factors modes without assigned distance, use PM emissions VEHICLE_INVENTORY instead calculate total PM concentrations scenario add exposure factors trip set stage mode add total scenario PM concentrations trip set calculate ventilation rate stage taking account demographic characteristics exposure factors calculate inhaled air total PM (micro grams) trip set calculate amount time per day spent sleep, moderate vigorous activities add total time spent travelling participant trip set calculate ventilation rate sleep, moderate vigorous activities participant synthetic population (travel component), calculate total air inhaled, total PM inhaled total PM concentration inhaled scenario assign participants synthetic population without travel component, baseline scenario PM concentrations join people without travel synthetic population","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_injury_contingency.html","id":null,"dir":"Reference","previous_headings":"","what":"Injury summary statistics — set_injury_contingency","title":"Injury summary statistics — set_injury_contingency","text":"Creates summarised injury tables 'hit ' 'vehicle' fatality counts casualty strike mode combination (age sex combination information exists)","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_injury_contingency.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Injury summary statistics — set_injury_contingency","text":"","code":"set_injury_contingency(injuries)"},{"path":"https://ithim.github.io/ITHIM-R/reference/set_injury_contingency.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Injury summary statistics — set_injury_contingency","text":"injuries data frame individual injury events","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_injury_contingency.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Injury summary statistics — set_injury_contingency","text":"function performs following steps using individual fatality injury input file: data split WHW (hit ) matrix casualty strike mode given NOV (vehicle) matrix strike mode set NOV ithim_load_data() vehicle involved accident. age gender information given, counts multiplied proportion injuries relevant proportion population considered model (e.g. 15 - 65 year olds) based GBD data Data aggregated casualty strike mode, age sex information exists Complete whw nov matrices containing casualty strike (age sex) combinations created zero counts combinations fatalities list aggregated whw nov matrices set Global environment","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_scenario_specific_variables.html","id":null,"dir":"Reference","previous_headings":"","what":"Set scenario specific variables - CURRENTLY NOT CALLED — set_scenario_specific_variables","title":"Set scenario specific variables - CURRENTLY NOT CALLED — set_scenario_specific_variables","text":"Set NSCEN, SCEN SCEN_SHORT_NAME","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_scenario_specific_variables.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Set scenario specific variables - CURRENTLY NOT CALLED — set_scenario_specific_variables","text":"","code":"set_scenario_specific_variables()"},{"path":"https://ithim.github.io/ITHIM-R/reference/set_vehicle_inventory.html","id":null,"dir":"Reference","previous_headings":"","what":"Collate all vehicle information — set_vehicle_inventory","title":"Collate all vehicle information — set_vehicle_inventory","text":"Puts vehicle information one place including speeds emission factors. Writes global environment.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/set_vehicle_inventory.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Collate all vehicle information — set_vehicle_inventory","text":"","code":"set_vehicle_inventory()"},{"path":"https://ithim.github.io/ITHIM-R/reference/set_vehicle_inventory.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Collate all vehicle information — set_vehicle_inventory","text":"function performs following operations: Based city specific (default) mode speeds, vehicle inventory initialised PM emissions added city specific (default) PM inventory big_truck mode added distance mode used air pollution modules mode added already exist travel survey (hence mode speeds) CO2 emissions added city specific (default) CO2 inventory car_driver exists, car_driver emissions set PM CO2 car emissions VEHICLE_INVENTORY set global variable","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":null,"dir":"Reference","previous_headings":"","what":"Calculate total mMETs per person — total_mmet","title":"Calculate total mMETs per person — total_mmet","text":"Calculate total mMETs per person synthetic population based non-travel PA active travel scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Calculate total mMETs per person — total_mmet","text":"","code":"total_mmet(trip_scen_sets)"},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Calculate total mMETs per person — total_mmet","text":"trip_scen_sets data frame trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Calculate total mMETs per person — total_mmet","text":"mmets - total mMETs per week per person scenario","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/total_mmet.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Calculate total mMETs per person — total_mmet","text":"function performs following steps: extract people trip set active travel (walk cycle) stage mode (non-ghost trips ) calculate weekly time spent active travel scenario: scale non-travel mMET value people synthetic population BACKGROUND_PA_SCALAR adjust biases PA data calculate total cycling walking mMET values relevant person trip set scale week add active travel mMET non-travel mMET values person synthetic population create one dataframe total MMET people synthetic population scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":null,"dir":"Reference","previous_headings":"","what":"Add walk to public transport stages — walk_to_pt_and_combine_scen","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"Adds short walk stage public transport (PT) trip required.","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":"ref-usage","dir":"Reference","previous_headings":"","what":"Usage","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"","code":"walk_to_pt_and_combine_scen(SYNTHETIC_TRIPS)"},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":"arguments","dir":"Reference","previous_headings":"","what":"Arguments","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"trip_set list data frames, trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":"value","dir":"Reference","previous_headings":"","what":"Value","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"data frame, trips scenarios","code":""},{"path":"https://ithim.github.io/ITHIM-R/reference/walk_to_pt_and_combine_scen.html","id":"details","dir":"Reference","previous_headings":"","what":"Details","title":"Add walk to public transport stages — walk_to_pt_and_combine_scen","text":"function performs following steps: create list containing dataframes synthetic trips scenario ADD_WALK_TO_PT_TRIPS == T, .e additional 'walk pt' stages added: filter trips public transport stage mode divide public transport trips without 'walk pt' stage add 'walk pt' stage public transport trips without walking stage (add_walk_trips()) combine trips scenarios one dataframe scale stage distances durations calling scale_trip_distances.R function","code":""}]