diff --git a/DESCRIPTION b/DESCRIPTION index fcbca86..b5be16b 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: tobalcepi Type: Package Title: Risk Functions and Attributable Fractions for Tobacco and Alcohol -Version: 1.2.2 +Version: 1.3.0 Authors@R: c( person(given = "Duncan", @@ -42,9 +42,10 @@ Imports: testthat, dplyr, data.table, - Rdpack -RdMacros: Rdpack + Rdpack, + lifecycle +RdMacros: Rdpack, lifecycle VignetteBuilder: knitr -RoxygenNote: 7.1.0 +RoxygenNote: 7.1.1 Depends: R (>= 2.10) diff --git a/NAMESPACE b/NAMESPACE index 46224f4..8e2a3fb 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -1,18 +1,10 @@ # Generated by roxygen2: do not edit by hand -export(AlcBinge) -export(AlcBinge_stapm) -export(AlcLags) -export(ExpandCodes) -export(PArisk) +export("\\lifecycle{experimental}") +export("\\lifecycle{maturing}") +export("\\lifecycle{stable}") export(RRFunc) -export(RRTobDR) -export(RRalc) -export(RRtob) export(TobAlcInt) -export(TobLags) -export(WArisk_acute) -export(subgroupRisk) import(data.table) importFrom(Rdpack,reprompt) importFrom(data.table,":=") diff --git a/R/AlcBinge.R b/R/AlcBinge.R index c30d038..e415174 100644 --- a/R/AlcBinge.R +++ b/R/AlcBinge.R @@ -18,6 +18,8 @@ #' @return Returns data plus the estimated variables. #' @importFrom data.table := setDT setnames #' @export +#' +#' \lifecycle{stable} #' #' @examples #' diff --git a/R/AlcBinge_stapm.R b/R/AlcBinge_stapm.R index bbb5bf9..80f4fc8 100644 --- a/R/AlcBinge_stapm.R +++ b/R/AlcBinge_stapm.R @@ -27,6 +27,8 @@ #' @return Returns data plus the estimated variables. #' @importFrom data.table := setDT setnames #' @export +#' +#' \lifecycle{maturing} #' #' @examples #' diff --git a/R/AlcLags.R b/R/AlcLags.R index 9626b2d..93eb0f7 100644 --- a/R/AlcLags.R +++ b/R/AlcLags.R @@ -17,6 +17,8 @@ #' on an individual's relative risk of disease has so far emerged. #' @importFrom data.table := setDT setnames #' @export +#' +#' \lifecycle{stable} #' #' @examples #' \dontrun{ diff --git a/R/ExpandCodes.R b/R/ExpandCodes.R index bd6f3f6..30b470e 100644 --- a/R/ExpandCodes.R +++ b/R/ExpandCodes.R @@ -14,6 +14,8 @@ #' @importFrom data.table := setDT setnames #' @export #' +#' \lifecycle{stable} +#' #' @examples #' #' \dontrun{ diff --git a/R/PArisk.R b/R/PArisk.R index c25ff1f..68155d3 100644 --- a/R/PArisk.R +++ b/R/PArisk.R @@ -37,6 +37,8 @@ #' @importFrom data.table := setDT setnames #' @export #' +#' \lifecycle{stable} +#' #' @examples #' #' \dontrun{ diff --git a/R/RRAlc.R b/R/RRAlc.R index f8e4df5..cc8be51 100644 --- a/R/RRAlc.R +++ b/R/RRAlc.R @@ -37,6 +37,8 @@ #' @return Returns a numeric vector of each individual's relative risks for the alcohol related disease specified by "disease". #' @importFrom data.table := setDT setnames #' @export +#' +#' \lifecycle{stable} #' #' @examples #' diff --git a/R/RRFunc.R b/R/RRFunc.R index 0beecad..32bab12 100644 --- a/R/RRFunc.R +++ b/R/RRFunc.R @@ -111,6 +111,7 @@ #' @seealso \code{\link{RRalc}} for alcohol-specific risks, \code{\link{RRtob}} for tobacco-specific risks, #' \code{\link{AlcLags}} for alcohol-specific lag times, and \code{\link{TobLags}} for tobacco-specific lag times. #' +#' \lifecycle{maturing} #' #' @examples #' \dontrun{ diff --git a/R/RRTobDR.R b/R/RRTobDR.R index eb257fe..4d8d061 100644 --- a/R/RRTobDR.R +++ b/R/RRTobDR.R @@ -17,6 +17,9 @@ #' @importFrom data.table := setDT setnames #' @export #' +#' \lifecycle{experimental} +#' +#' #' @examples #' #' \dontrun{ diff --git a/R/RRtob.R b/R/RRtob.R index ba8a297..fffa65f 100644 --- a/R/RRtob.R +++ b/R/RRtob.R @@ -37,6 +37,8 @@ #' specified by "disease". #' @importFrom data.table := setDT setnames #' @export +#' +#' \lifecycle{maturing} #' #' @examples #'\dontrun{ diff --git a/R/TobAlcInt.R b/R/TobAlcInt.R index b35a9b1..9a8ac5d 100644 --- a/R/TobAlcInt.R +++ b/R/TobAlcInt.R @@ -33,6 +33,8 @@ #' #' \insertRef{Prabhu2014}{tobalcepi} #' +#' \lifecycle{maturing} +#' #' @examples #' #' \dontrun{ diff --git a/R/TobLags.R b/R/TobLags.R index 8aed620..df837d7 100644 --- a/R/TobLags.R +++ b/R/TobLags.R @@ -38,6 +38,8 @@ #' @importFrom data.table := setDT setnames #' @export #' +#' \lifecycle{stable} +#' #' @examples #' #' TobLags("Pharynx") diff --git a/R/WArisk_acute.R b/R/WArisk_acute.R index c4e9cea..a5bb4ec 100644 --- a/R/WArisk_acute.R +++ b/R/WArisk_acute.R @@ -41,6 +41,8 @@ #' @return Returns a numeric vector of each individual's relative risk of the acute consequences of drinking. #' @importFrom data.table := setDT setnames #' @export +#' +#' \lifecycle{stable} #' #' @examples #' diff --git a/R/alc_icd10_lookups.R b/R/alc_icd10_lookups.R new file mode 100755 index 0000000..cccff44 --- /dev/null +++ b/R/alc_icd10_lookups.R @@ -0,0 +1,18 @@ + +#' Diseases related to alcohol and their ICD-10 defintions +#' +#' Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +#' but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +#' To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06. +#' +#' @docType data +#' +#' @format A data table +#' +#' @source Our alcohol disease list in the folder PR_Disease_Risk_TA +#' +#' +#' +#' +#' +"alc_icd10_lookups" diff --git a/R/subgroupRisk.R b/R/subgroupRisk.R index 9970cdc..ea36794 100644 --- a/R/subgroupRisk.R +++ b/R/subgroupRisk.R @@ -21,6 +21,8 @@ #' @return Returns a data table containing the subgroup specific summaries for each disease. #' @importFrom data.table := setDT setnames #' @export +#' +#' \lifecycle{stable} #' #' @examples #' \dontrun{ diff --git a/R/tob_icd10_lookups.R b/R/tob_icd10_lookups.R new file mode 100755 index 0000000..7455cb2 --- /dev/null +++ b/R/tob_icd10_lookups.R @@ -0,0 +1,18 @@ + +#' Diseases related to tobacco and their ICD-10 defintions +#' +#' Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +#' but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +#' To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06. +#' +#' @docType data +#' +#' @format A data table +#' +#' @source Our tobacco disease list in the folder PR_Disease_Risk_TA +#' +#' +#' +#' +#' +"tob_icd10_lookups" diff --git a/R/tobalc_icd10_lookups.R b/R/tobalc_icd10_lookups.R new file mode 100755 index 0000000..5063f9b --- /dev/null +++ b/R/tobalc_icd10_lookups.R @@ -0,0 +1,18 @@ + +#' Diseases related to both tobacco and alcohol and their ICD-10 defintions +#' +#' Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +#' but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +#' To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06. +#' +#' @docType data +#' +#' @format A data table +#' +#' @source Our joint tobacco and alcohol disease list in the folder PR_Disease_Risk_TA +#' +#' +#' +#' +#' +"tobalc_icd10_lookups" diff --git a/README.Rmd b/README.Rmd index bf2baeb..bf17d28 100644 --- a/README.Rmd +++ b/README.Rmd @@ -19,9 +19,11 @@ knitr::opts_chunk$set( ``` # tobalcepi + +[![Lifecycle: maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![Project Status: Active – The project has reached a stable, usable state and is being actively developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) + -**DRAFT WORKING VERSION** - Some code and documentation is still incomplete or in need of being refined. The code and documentation are still undergoing internal review by the analyst team. ## Motivation The motivation for `tobalcepi` was to organise how we store, process and use the information on the risks of disease that stem from tobacco and/or alcohol consumption, including to provide functions to easily use these risk estimates in modelling. diff --git a/README.md b/README.md index be8992d..426b7f0 100644 --- a/README.md +++ b/README.md @@ -3,13 +3,14 @@ # tobalcepi + + +[![Lifecycle: +maturing](https://img.shields.io/badge/lifecycle-maturing-blue.svg)](https://www.tidyverse.org/lifecycle/#maturing) [![Project Status: Active – The project has reached a stable, usable state and is being actively -developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) - -**DRAFT WORKING VERSION** - Some code and documentation is still -incomplete or in need of being refined. The code and documentation are -still undergoing internal review by the analyst team. +developed.](https://www.repostatus.org/badges/latest/active.svg)](https://www.repostatus.org/#active) + ## Motivation @@ -217,8 +218,8 @@ Tobacco and Alcohol. R package version x.x.x. Angus, Colin, M Henney, L Webster, and Duncan Gillespie. 2018. “Alcohol-Attributable Diseases and Dose-Response Curves for the -Sheffield Alcohol Policy Model Version 4.0.” -. +Sheffield Alcohol Policy Model Version 4.0.” The University of +Sheffield. . diff --git a/_pkgdown.yml b/_pkgdown.yml index ee1deda..6af9052 100644 --- a/_pkgdown.yml +++ b/_pkgdown.yml @@ -29,6 +29,7 @@ reference: - subtitle: Disease definitions and relative risks contents: - tob_disease_names + - tob_icd10_lookups - tobacco_relative_risks - RRtob - RRTobDR @@ -41,6 +42,7 @@ reference: - subtitle: Disease definitions and relative risks contents: - alc_disease_names + - alc_icd10_lookups - RRalc - subtitle: Disease risk linked to intoxication contents: @@ -58,6 +60,7 @@ reference: contents: - TobAlcInt - tob_alc_risk_int + - tobalc_icd10_lookups - title: Misc contents: diff --git a/data-raw/alcohol_disease_names.R b/data-raw/alcohol_disease_names.R new file mode 100644 index 0000000..ffe127f --- /dev/null +++ b/data-raw/alcohol_disease_names.R @@ -0,0 +1,58 @@ + +# This code stores the list of the names of diseases that are attributable to tobacco and alcohol + +# doing this helps to keep the formatting of disease names consistent + +library(data.table) +library(readxl) + +# Set the file path to point to the University of Sheffield X drive +root_dir <- "/Volumes/" + + +########################################## + +# Load the data + + +AlcList <- readxl::read_excel(paste0(root_dir, + "ScHARR/PR_Disease_Risk_TA/Code/tables/16102018tobaccoandalcoholDiseaseListandRiskFunctions.xlsx"), + sheet = "Alcohol") + +# Set it as a data table +data.table::setDT(AlcList) + +# Columns names to consistent lower case +setnames(AlcList, colnames(AlcList), tolower(colnames(AlcList))) + +########################################## + +# Save disease names + +alc_disease_names <- as.character(c(unique(AlcList$condition))) + + +usethis::use_data(alc_disease_names, overwrite = T) + +########################################## + +# Save ICD-10 lookups + +# The aim of this code is to prepare lists of tobacco and alcohol related diseases +# with their corresponding ICD-10 codes + +# These data are used to search for the relevant conditions +# in the process of preparing the mortality and hospitalisation rates +# for use in the modelling + + +alc_icd10_lookups <- AlcList[ , c("condition", "icd10_lookups")] + +alc_icd10_lookups[stringr::str_detect(condition, "Oesoph"), condition := "Oesophageal"] + +alc_icd10_lookups <- unique(alc_icd10_lookups, by = "icd10_lookups") + +usethis::use_data(alc_icd10_lookups, overwrite = T) + + + diff --git a/data-raw/disease_names.R b/data-raw/disease_names.R deleted file mode 100644 index 8be0db6..0000000 --- a/data-raw/disease_names.R +++ /dev/null @@ -1,21 +0,0 @@ - -# This code stores the list of the names of diseases that are attributable to tobacco and alcohol - -# doing this helps to keep the formatting of disease names consistent - -library(data.table) -library(readxl) - -# Set the file path to point to the University of Sheffield X drive -root_dir <- "/Volumes/" - - - - - -AlcList <- readxl::read_excel(paste0(root_dir, "ScHARR/PR_Disease_Risk_TA/Code/tables/16102018tobaccoandalcoholDiseaseListandRiskFunctions.xlsx"), sheet = "Alcohol") - -alc_disease_names <- as.character(c(unique(AlcList$condition))) - - -usethis::use_data(alc_disease_names, overwrite = T) diff --git a/data-raw/tobacco_alcohol_risk_interaction.R b/data-raw/tobacco_alcohol_risk_interaction.R index 8a2c16b..137d898 100644 --- a/data-raw/tobacco_alcohol_risk_interaction.R +++ b/data-raw/tobacco_alcohol_risk_interaction.R @@ -6,16 +6,57 @@ # This code reads that file and cleans it to prepare the data to be used in the model + +library(readxl) library(data.table) # Set the file path to point to the University of Sheffield X drive root_dir <- "/Volumes/" # Load the spreadsheet containing disease risks -tob_alc_risk_int <- data.table::fread(paste0(root_dir, "ScHARR/PR_Disease_Risk_TA/Code/tables/tob_alc_interactions_180119.csv")) +tob_alc_risk_int <- data.table::fread(paste0(root_dir, + "ScHARR/PR_Disease_Risk_TA/Code/tables/tob_alc_interactions_180119.csv")) # Select the versions marked as current tob_alc_risk_int <- tob_alc_risk_int[Version == "Current"] # Save the result to the package data folder usethis::use_data(tob_alc_risk_int, overwrite = T) + + + + +########################################## +# Tobacco and alcohol related diseases + +# Alcohol lookups +AlcList <- readxl::read_excel(paste0(root_dir, + "ScHARR/PR_Disease_Risk_TA/Code/tables/16102018tobaccoandalcoholDiseaseListandRiskFunctions.xlsx"), + sheet = "Alcohol") +data.table::setDT(AlcList) +setnames(AlcList, colnames(AlcList), tolower(colnames(AlcList))) +alc_icd10_lookups <- AlcList[ , c("condition", "icd10_lookups")] +alc_icd10_lookups[stringr::str_detect(condition, "Oesoph"), condition := "Oesophageal"] +alc_icd10_lookups <- unique(alc_icd10_lookups, by = "icd10_lookups") + + +# Tobacco lookups +tob_rr_data <- readxl::read_excel(paste0(root_dir, + "ScHARR/PR_Disease_Risk_TA/Code/tables/16102018tobaccoandalcoholDiseaseListandRiskFunctions.xlsx"), + sheet = "Tobacco") +data.table::setDT(tob_rr_data) +setnames(tob_rr_data, colnames(tob_rr_data), tolower(colnames(tob_rr_data))) +tob_icd10_lookups <- tob_rr_data[version == "Current", c("condition", "icd10_lookups")] +tob_icd10_lookups[stringr::str_detect(condition, "Oesoph"), condition := "Oesophageal"] +tob_icd10_lookups <- unique(tob_icd10_lookups, by = "icd10_lookups") + +# Merge the lookups +tobalc_icd10_lookups <- rbindlist(list(tob_icd10_lookups, alc_icd10_lookups)) +tobalc_icd10_lookups <- unique(tobalc_icd10_lookups, by = "icd10_lookups") + + +usethis::use_data(tobalc_icd10_lookups, overwrite = T) + + + + diff --git a/data-raw/tobacco_relative_risks.R b/data-raw/tobacco_relative_risks.R index 1b42154..0a693a7 100644 --- a/data-raw/tobacco_relative_risks.R +++ b/data-raw/tobacco_relative_risks.R @@ -1,37 +1,80 @@ -# This code reads and processes the relative risks for tobacco -# for current vs. never smokers +# This code reads and processes the relative risks and disease definitions for tobacco # They are stored in a master spreadsheet in X:/ScHARR/PR_Disease_Risk_TA/Code/tables # `16102018 tobacco and alcohol Disease List and Risk Functions.xlsx` -# This code reads that file and cleans it to prepare the data to be used in the model library(readxl) +library(data.table) + +########################################## + +# Load the data + # Set the file path to point to the University of Sheffield X drive root_dir <- "/Volumes/" # Load the master spreadsheet containing disease risks -tobacco_relative_risks <- readxl::read_excel(paste0(root_dir, +tob_rr_data <- readxl::read_excel(paste0(root_dir, "ScHARR/PR_Disease_Risk_TA/Code/tables/16102018tobaccoandalcoholDiseaseListandRiskFunctions.xlsx"), sheet = "Tobacco") # Set it as a data table -data.table::setDT(tobacco_relative_risks) +data.table::setDT(tob_rr_data) + +# Columns names to consistent lower case +setnames(tob_rr_data, colnames(tob_rr_data), tolower(colnames(tob_rr_data))) + + +########################################## + +# Save relative risks # Select the versions marked as current # and select the required columns -tobacco_relative_risks <- tobacco_relative_risks[Version == "Current", c("condition", "age", "sex", "Current")] +tobacco_relative_risks <- tob_rr_data[version == "Current", c("condition", "age", "sex", "current")] # Change the names -data.table::setnames(tobacco_relative_risks, "Current", "relative_risk") +data.table::setnames(tobacco_relative_risks, "current", "relative_risk") # Save the result to the package data folder usethis::use_data(tobacco_relative_risks, overwrite = T) + +########################################## + +# Save disease names + # Save a separate list of the disease names tob_disease_names <- as.character(c(unique(tobacco_relative_risks$condition))) usethis::use_data(tob_disease_names, overwrite = T) + +########################################## + +# Save ICD-10 lookups + +# The aim of this code is to prepare lists of tobacco and alcohol related diseases +# with their corresponding ICD-10 codes + +# These data are used to search for the relevant conditions +# in the process of preparing the mortality and hospitalisation rates +# for use in the modelling + +tob_icd10_lookups <- tob_rr_data[version == "Current", c("condition", "icd10_lookups")] + +tob_icd10_lookups[stringr::str_detect(condition, "Oesoph"), condition := "Oesophageal"] + +tob_icd10_lookups <- unique(tob_icd10_lookups, by = "icd10_lookups") + +usethis::use_data(tob_icd10_lookups, overwrite = T) + + + + + + + diff --git a/data/alc_disease_names.rda b/data/alc_disease_names.rda index 16ce9b2..e408719 100644 Binary files a/data/alc_disease_names.rda and b/data/alc_disease_names.rda differ diff --git a/data/alc_icd10_lookups.rda b/data/alc_icd10_lookups.rda new file mode 100644 index 0000000..4104d47 Binary files /dev/null and b/data/alc_icd10_lookups.rda differ diff --git a/data/tob_alc_risk_int.rda b/data/tob_alc_risk_int.rda index 3e922ca..2b82acd 100644 Binary files a/data/tob_alc_risk_int.rda and b/data/tob_alc_risk_int.rda differ diff --git a/data/tob_icd10_lookups.rda b/data/tob_icd10_lookups.rda new file mode 100644 index 0000000..f45db8b Binary files /dev/null and b/data/tob_icd10_lookups.rda differ diff --git a/data/tobalc_icd10_lookups.rda b/data/tobalc_icd10_lookups.rda new file mode 100644 index 0000000..199be60 Binary files /dev/null and b/data/tobalc_icd10_lookups.rda differ diff --git a/man/RRFunc.Rd b/man/RRFunc.Rd index ea3d266..9924160 100644 --- a/man/RRFunc.Rd +++ b/man/RRFunc.Rd @@ -284,4 +284,6 @@ RRFunc( \seealso{ \code{\link{RRalc}} for alcohol-specific risks, \code{\link{RRtob}} for tobacco-specific risks, \code{\link{AlcLags}} for alcohol-specific lag times, and \code{\link{TobLags}} for tobacco-specific lag times. + +\lifecycle{maturing} } diff --git a/man/TobAlcInt.Rd b/man/TobAlcInt.Rd index ac33173..fd92492 100644 --- a/man/TobAlcInt.Rd +++ b/man/TobAlcInt.Rd @@ -60,5 +60,7 @@ TobAlcInt() \insertRef{Hashibe2009}{tobalcepi} -\insertRef{Prabhu2014}{tobalcepi} +\insertRef{Prabhu2014}{tobalcepi} + +\lifecycle{maturing} } diff --git a/man/alc_icd10_lookups.Rd b/man/alc_icd10_lookups.Rd new file mode 100644 index 0000000..ddb91de --- /dev/null +++ b/man/alc_icd10_lookups.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/alc_icd10_lookups.R +\docType{data} +\name{alc_icd10_lookups} +\alias{alc_icd10_lookups} +\title{Diseases related to alcohol and their ICD-10 defintions} +\format{ +A data table +} +\source{ +Our alcohol disease list in the folder PR_Disease_Risk_TA +} +\usage{ +alc_icd10_lookups +} +\description{ +Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06. +} +\keyword{datasets} diff --git a/man/figures/lifecycle-archived.svg b/man/figures/lifecycle-archived.svg new file mode 100644 index 0000000..48f72a6 --- /dev/null +++ b/man/figures/lifecycle-archived.svg @@ -0,0 +1 @@ + lifecyclelifecyclearchivedarchived \ No newline at end of file diff --git a/man/figures/lifecycle-defunct.svg b/man/figures/lifecycle-defunct.svg new file mode 100644 index 0000000..01452e5 --- /dev/null +++ b/man/figures/lifecycle-defunct.svg @@ -0,0 +1 @@ +lifecyclelifecycledefunctdefunct \ No newline at end of file diff --git a/man/figures/lifecycle-deprecated.svg b/man/figures/lifecycle-deprecated.svg new file mode 100644 index 0000000..4baaee0 --- /dev/null +++ b/man/figures/lifecycle-deprecated.svg @@ -0,0 +1 @@ +lifecyclelifecycledeprecateddeprecated \ No newline at end of file diff --git a/man/figures/lifecycle-experimental.svg b/man/figures/lifecycle-experimental.svg new file mode 100644 index 0000000..d1d060e --- /dev/null +++ b/man/figures/lifecycle-experimental.svg @@ -0,0 +1 @@ +lifecyclelifecycleexperimentalexperimental \ No newline at end of file diff --git a/man/figures/lifecycle-maturing.svg b/man/figures/lifecycle-maturing.svg new file mode 100644 index 0000000..df71310 --- /dev/null +++ b/man/figures/lifecycle-maturing.svg @@ -0,0 +1 @@ +lifecyclelifecyclematuringmaturing \ No newline at end of file diff --git a/man/figures/lifecycle-questioning.svg b/man/figures/lifecycle-questioning.svg new file mode 100644 index 0000000..08ee0c9 --- /dev/null +++ b/man/figures/lifecycle-questioning.svg @@ -0,0 +1 @@ +lifecyclelifecyclequestioningquestioning \ No newline at end of file diff --git a/man/figures/lifecycle-soft-deprecated.svg b/man/figures/lifecycle-soft-deprecated.svg new file mode 100644 index 0000000..9f014fd --- /dev/null +++ b/man/figures/lifecycle-soft-deprecated.svg @@ -0,0 +1 @@ +lifecyclelifecyclesoft-deprecatedsoft-deprecated \ No newline at end of file diff --git a/man/figures/lifecycle-stable.svg b/man/figures/lifecycle-stable.svg new file mode 100644 index 0000000..e015dc8 --- /dev/null +++ b/man/figures/lifecycle-stable.svg @@ -0,0 +1 @@ +lifecyclelifecyclestablestable \ No newline at end of file diff --git a/man/figures/lifecycle-superseded.svg b/man/figures/lifecycle-superseded.svg new file mode 100644 index 0000000..75f24f5 --- /dev/null +++ b/man/figures/lifecycle-superseded.svg @@ -0,0 +1 @@ + lifecyclelifecyclesupersededsuperseded \ No newline at end of file diff --git a/man/tob_icd10_lookups.Rd b/man/tob_icd10_lookups.Rd new file mode 100644 index 0000000..64a8036 --- /dev/null +++ b/man/tob_icd10_lookups.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/tob_icd10_lookups.R +\docType{data} +\name{tob_icd10_lookups} +\alias{tob_icd10_lookups} +\title{Diseases related to tobacco and their ICD-10 defintions} +\format{ +A data table +} +\source{ +Our tobacco disease list in the folder PR_Disease_Risk_TA +} +\usage{ +tob_icd10_lookups +} +\description{ +Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06. +} +\keyword{datasets} diff --git a/man/tobalc_icd10_lookups.Rd b/man/tobalc_icd10_lookups.Rd new file mode 100644 index 0000000..9b8639a --- /dev/null +++ b/man/tobalc_icd10_lookups.Rd @@ -0,0 +1,21 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/tobalc_icd10_lookups.R +\docType{data} +\name{tobalc_icd10_lookups} +\alias{tobalc_icd10_lookups} +\title{Diseases related to both tobacco and alcohol and their ICD-10 defintions} +\format{ +A data table +} +\source{ +Our joint tobacco and alcohol disease list in the folder PR_Disease_Risk_TA +} +\usage{ +tobalc_icd10_lookups +} +\description{ +Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06. +} +\keyword{datasets} diff --git a/public/404.html b/public/404.html index 131cc78..9d82e00 100644 --- a/public/404.html +++ b/public/404.html @@ -71,7 +71,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -146,7 +146,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/LICENSE.html b/public/LICENSE.html index 2de0067..c864ce7 100644 --- a/public/LICENSE.html +++ b/public/LICENSE.html @@ -71,7 +71,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -368,7 +368,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/articles/alc_partially_attrib_acute.html b/public/articles/alc_partially_attrib_acute.html index c71417b..1914876 100644 --- a/public/articles/alc_partially_attrib_acute.html +++ b/public/articles/alc_partially_attrib_acute.html @@ -31,7 +31,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -78,7 +78,8 @@ -
+ +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/articles/alc_partially_attrib_acute_files/accessible-code-block-0.0.1/empty-anchor.js b/public/articles/alc_partially_attrib_acute_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 0000000..ca349fd --- /dev/null +++ b/public/articles/alc_partially_attrib_acute_files/accessible-code-block-0.0.1/empty-anchor.js @@ -0,0 +1,15 @@ +// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> +// v0.0.1 +// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. + +document.addEventListener('DOMContentLoaded', function() { + const codeList = document.getElementsByClassName("sourceCode"); + for (var i = 0; i < codeList.length; i++) { + var linkList = codeList[i].getElementsByTagName('a'); + for (var j = 0; j < linkList.length; j++) { + if (linkList[j].innerHTML === "") { + linkList[j].setAttribute('aria-hidden', 'true'); + } + } + } +}); diff --git a/public/articles/alc_partially_attrib_acute_files/anchor-sections-1.0/anchor-sections.css b/public/articles/alc_partially_attrib_acute_files/anchor-sections-1.0/anchor-sections.css new file mode 100644 index 0000000..07aee5f --- /dev/null +++ b/public/articles/alc_partially_attrib_acute_files/anchor-sections-1.0/anchor-sections.css @@ -0,0 +1,4 @@ +/* Styles for section anchors */ +a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;} +a.anchor-section::before {content: '#';} +.hasAnchor:hover a.anchor-section {visibility: visible;} diff --git a/public/articles/alc_partially_attrib_acute_files/anchor-sections-1.0/anchor-sections.js b/public/articles/alc_partially_attrib_acute_files/anchor-sections-1.0/anchor-sections.js new file mode 100644 index 0000000..570f99a --- /dev/null +++ b/public/articles/alc_partially_attrib_acute_files/anchor-sections-1.0/anchor-sections.js @@ -0,0 +1,33 @@ +// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020. +document.addEventListener('DOMContentLoaded', function() { + // Do nothing if AnchorJS is used + if (typeof window.anchors === 'object' && anchors.hasOwnProperty('hasAnchorJSLink')) { + return; + } + + const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); + + // Do nothing if sections are already anchored + if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) { + return null; + } + + // Use section id when pandoc runs with --section-divs + const section_id = function(x) { + return ((x.classList.contains('section') || (x.tagName === 'SECTION')) + ? x.id : ''); + }; + + // Add anchors + h.forEach(function(x) { + const id = x.id || section_id(x.parentElement); + if (id === '') { + return null; + } + let anchor = document.createElement('a'); + anchor.href = '#' + id; + anchor.classList = ['anchor-section']; + x.classList.add('hasAnchor'); + x.appendChild(anchor); + }); +}); diff --git a/public/articles/alc_partially_attrib_acute_files/header-attrs-2.5/header-attrs.js b/public/articles/alc_partially_attrib_acute_files/header-attrs-2.5/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/public/articles/alc_partially_attrib_acute_files/header-attrs-2.5/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/public/articles/alc_wholly_attrib_acute.html b/public/articles/alc_wholly_attrib_acute.html index 5e8c66b..da28f9c 100644 --- a/public/articles/alc_wholly_attrib_acute.html +++ b/public/articles/alc_wholly_attrib_acute.html @@ -31,7 +31,7 @@ tobalcepi - 1.2.2 + 1.3.0
@@ -78,7 +78,8 @@ -
+ +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/articles/alc_wholly_attrib_acute_files/accessible-code-block-0.0.1/empty-anchor.js b/public/articles/alc_wholly_attrib_acute_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 0000000..ca349fd --- /dev/null +++ b/public/articles/alc_wholly_attrib_acute_files/accessible-code-block-0.0.1/empty-anchor.js @@ -0,0 +1,15 @@ +// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> +// v0.0.1 +// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. + +document.addEventListener('DOMContentLoaded', function() { + const codeList = document.getElementsByClassName("sourceCode"); + for (var i = 0; i < codeList.length; i++) { + var linkList = codeList[i].getElementsByTagName('a'); + for (var j = 0; j < linkList.length; j++) { + if (linkList[j].innerHTML === "") { + linkList[j].setAttribute('aria-hidden', 'true'); + } + } + } +}); diff --git a/public/articles/alc_wholly_attrib_acute_files/anchor-sections-1.0/anchor-sections.css b/public/articles/alc_wholly_attrib_acute_files/anchor-sections-1.0/anchor-sections.css new file mode 100644 index 0000000..07aee5f --- /dev/null +++ b/public/articles/alc_wholly_attrib_acute_files/anchor-sections-1.0/anchor-sections.css @@ -0,0 +1,4 @@ +/* Styles for section anchors */ +a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;} +a.anchor-section::before {content: '#';} +.hasAnchor:hover a.anchor-section {visibility: visible;} diff --git a/public/articles/alc_wholly_attrib_acute_files/anchor-sections-1.0/anchor-sections.js b/public/articles/alc_wholly_attrib_acute_files/anchor-sections-1.0/anchor-sections.js new file mode 100644 index 0000000..570f99a --- /dev/null +++ b/public/articles/alc_wholly_attrib_acute_files/anchor-sections-1.0/anchor-sections.js @@ -0,0 +1,33 @@ +// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020. +document.addEventListener('DOMContentLoaded', function() { + // Do nothing if AnchorJS is used + if (typeof window.anchors === 'object' && anchors.hasOwnProperty('hasAnchorJSLink')) { + return; + } + + const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); + + // Do nothing if sections are already anchored + if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) { + return null; + } + + // Use section id when pandoc runs with --section-divs + const section_id = function(x) { + return ((x.classList.contains('section') || (x.tagName === 'SECTION')) + ? x.id : ''); + }; + + // Add anchors + h.forEach(function(x) { + const id = x.id || section_id(x.parentElement); + if (id === '') { + return null; + } + let anchor = document.createElement('a'); + anchor.href = '#' + id; + anchor.classList = ['anchor-section']; + x.classList.add('hasAnchor'); + x.appendChild(anchor); + }); +}); diff --git a/public/articles/alc_wholly_attrib_acute_files/figure-html/wa_acute_risk_function-1.png b/public/articles/alc_wholly_attrib_acute_files/figure-html/wa_acute_risk_function-1.png index 79c6809..633b827 100644 Binary files a/public/articles/alc_wholly_attrib_acute_files/figure-html/wa_acute_risk_function-1.png and b/public/articles/alc_wholly_attrib_acute_files/figure-html/wa_acute_risk_function-1.png differ diff --git a/public/articles/alc_wholly_attrib_acute_files/header-attrs-2.5/header-attrs.js b/public/articles/alc_wholly_attrib_acute_files/header-attrs-2.5/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/public/articles/alc_wholly_attrib_acute_files/header-attrs-2.5/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/public/articles/alc_wholly_attrib_chronic.html b/public/articles/alc_wholly_attrib_chronic.html index 1a05557..0866873 100644 --- a/public/articles/alc_wholly_attrib_chronic.html +++ b/public/articles/alc_wholly_attrib_chronic.html @@ -31,7 +31,7 @@ tobalcepi - 1.2.2 + 1.3.0
@@ -78,7 +78,8 @@ -
+ +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/articles/alc_wholly_attrib_chronic_files/accessible-code-block-0.0.1/empty-anchor.js b/public/articles/alc_wholly_attrib_chronic_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 0000000..ca349fd --- /dev/null +++ b/public/articles/alc_wholly_attrib_chronic_files/accessible-code-block-0.0.1/empty-anchor.js @@ -0,0 +1,15 @@ +// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> +// v0.0.1 +// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. + +document.addEventListener('DOMContentLoaded', function() { + const codeList = document.getElementsByClassName("sourceCode"); + for (var i = 0; i < codeList.length; i++) { + var linkList = codeList[i].getElementsByTagName('a'); + for (var j = 0; j < linkList.length; j++) { + if (linkList[j].innerHTML === "") { + linkList[j].setAttribute('aria-hidden', 'true'); + } + } + } +}); diff --git a/public/articles/alc_wholly_attrib_chronic_files/anchor-sections-1.0/anchor-sections.css b/public/articles/alc_wholly_attrib_chronic_files/anchor-sections-1.0/anchor-sections.css new file mode 100644 index 0000000..07aee5f --- /dev/null +++ b/public/articles/alc_wholly_attrib_chronic_files/anchor-sections-1.0/anchor-sections.css @@ -0,0 +1,4 @@ +/* Styles for section anchors */ +a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;} +a.anchor-section::before {content: '#';} +.hasAnchor:hover a.anchor-section {visibility: visible;} diff --git a/public/articles/alc_wholly_attrib_chronic_files/anchor-sections-1.0/anchor-sections.js b/public/articles/alc_wholly_attrib_chronic_files/anchor-sections-1.0/anchor-sections.js new file mode 100644 index 0000000..570f99a --- /dev/null +++ b/public/articles/alc_wholly_attrib_chronic_files/anchor-sections-1.0/anchor-sections.js @@ -0,0 +1,33 @@ +// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020. +document.addEventListener('DOMContentLoaded', function() { + // Do nothing if AnchorJS is used + if (typeof window.anchors === 'object' && anchors.hasOwnProperty('hasAnchorJSLink')) { + return; + } + + const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); + + // Do nothing if sections are already anchored + if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) { + return null; + } + + // Use section id when pandoc runs with --section-divs + const section_id = function(x) { + return ((x.classList.contains('section') || (x.tagName === 'SECTION')) + ? x.id : ''); + }; + + // Add anchors + h.forEach(function(x) { + const id = x.id || section_id(x.parentElement); + if (id === '') { + return null; + } + let anchor = document.createElement('a'); + anchor.href = '#' + id; + anchor.classList = ['anchor-section']; + x.classList.add('hasAnchor'); + x.appendChild(anchor); + }); +}); diff --git a/public/articles/alc_wholly_attrib_chronic_files/figure-html/wa_chronic_risk_function-1.png b/public/articles/alc_wholly_attrib_chronic_files/figure-html/wa_chronic_risk_function-1.png index 4323eee..ab1b819 100644 Binary files a/public/articles/alc_wholly_attrib_chronic_files/figure-html/wa_chronic_risk_function-1.png and b/public/articles/alc_wholly_attrib_chronic_files/figure-html/wa_chronic_risk_function-1.png differ diff --git a/public/articles/alc_wholly_attrib_chronic_files/header-attrs-2.5/header-attrs.js b/public/articles/alc_wholly_attrib_chronic_files/header-attrs-2.5/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/public/articles/alc_wholly_attrib_chronic_files/header-attrs-2.5/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/public/articles/index.html b/public/articles/index.html index cb8538d..5244d17 100644 --- a/public/articles/index.html +++ b/public/articles/index.html @@ -71,7 +71,7 @@ tobalcepi - 1.2.2 + 1.3.0
@@ -151,7 +151,7 @@

All vignettes

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/articles/smoking-disease-risks.html b/public/articles/smoking-disease-risks.html index f771f3a..04bdf58 100644 --- a/public/articles/smoking-disease-risks.html +++ b/public/articles/smoking-disease-risks.html @@ -31,7 +31,7 @@ tobalcepi - 1.2.2 + 1.3.0
@@ -78,7 +78,8 @@ -
+ +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/articles/smoking-disease-risks_files/accessible-code-block-0.0.1/empty-anchor.js b/public/articles/smoking-disease-risks_files/accessible-code-block-0.0.1/empty-anchor.js new file mode 100644 index 0000000..ca349fd --- /dev/null +++ b/public/articles/smoking-disease-risks_files/accessible-code-block-0.0.1/empty-anchor.js @@ -0,0 +1,15 @@ +// Hide empty tag within highlighted CodeBlock for screen reader accessibility (see https://github.com/jgm/pandoc/issues/6352#issuecomment-626106786) --> +// v0.0.1 +// Written by JooYoung Seo (jooyoung@psu.edu) and Atsushi Yasumoto on June 1st, 2020. + +document.addEventListener('DOMContentLoaded', function() { + const codeList = document.getElementsByClassName("sourceCode"); + for (var i = 0; i < codeList.length; i++) { + var linkList = codeList[i].getElementsByTagName('a'); + for (var j = 0; j < linkList.length; j++) { + if (linkList[j].innerHTML === "") { + linkList[j].setAttribute('aria-hidden', 'true'); + } + } + } +}); diff --git a/public/articles/smoking-disease-risks_files/anchor-sections-1.0/anchor-sections.css b/public/articles/smoking-disease-risks_files/anchor-sections-1.0/anchor-sections.css new file mode 100644 index 0000000..07aee5f --- /dev/null +++ b/public/articles/smoking-disease-risks_files/anchor-sections-1.0/anchor-sections.css @@ -0,0 +1,4 @@ +/* Styles for section anchors */ +a.anchor-section {margin-left: 10px; visibility: hidden; color: inherit;} +a.anchor-section::before {content: '#';} +.hasAnchor:hover a.anchor-section {visibility: visible;} diff --git a/public/articles/smoking-disease-risks_files/anchor-sections-1.0/anchor-sections.js b/public/articles/smoking-disease-risks_files/anchor-sections-1.0/anchor-sections.js new file mode 100644 index 0000000..570f99a --- /dev/null +++ b/public/articles/smoking-disease-risks_files/anchor-sections-1.0/anchor-sections.js @@ -0,0 +1,33 @@ +// Anchor sections v1.0 written by Atsushi Yasumoto on Oct 3rd, 2020. +document.addEventListener('DOMContentLoaded', function() { + // Do nothing if AnchorJS is used + if (typeof window.anchors === 'object' && anchors.hasOwnProperty('hasAnchorJSLink')) { + return; + } + + const h = document.querySelectorAll('h1, h2, h3, h4, h5, h6'); + + // Do nothing if sections are already anchored + if (Array.from(h).some(x => x.classList.contains('hasAnchor'))) { + return null; + } + + // Use section id when pandoc runs with --section-divs + const section_id = function(x) { + return ((x.classList.contains('section') || (x.tagName === 'SECTION')) + ? x.id : ''); + }; + + // Add anchors + h.forEach(function(x) { + const id = x.id || section_id(x.parentElement); + if (id === '') { + return null; + } + let anchor = document.createElement('a'); + anchor.href = '#' + id; + anchor.classList = ['anchor-section']; + x.classList.add('hasAnchor'); + x.appendChild(anchor); + }); +}); diff --git a/public/articles/smoking-disease-risks_files/header-attrs-2.5/header-attrs.js b/public/articles/smoking-disease-risks_files/header-attrs-2.5/header-attrs.js new file mode 100644 index 0000000..dd57d92 --- /dev/null +++ b/public/articles/smoking-disease-risks_files/header-attrs-2.5/header-attrs.js @@ -0,0 +1,12 @@ +// Pandoc 2.9 adds attributes on both header and div. We remove the former (to +// be compatible with the behavior of Pandoc < 2.8). +document.addEventListener('DOMContentLoaded', function(e) { + var hs = document.querySelectorAll("div.section[class*='level'] > :first-child"); + var i, h, a; + for (i = 0; i < hs.length; i++) { + h = hs[i]; + if (!/^h[1-6]$/i.test(h.tagName)) continue; // it should be a header h1-h6 + a = h.attributes; + while (a.length > 0) h.removeAttribute(a[0].name); + } +}); diff --git a/public/authors.html b/public/authors.html index adb8951..c782f25 100644 --- a/public/authors.html +++ b/public/authors.html @@ -71,7 +71,7 @@ tobalcepi - 1.2.2 + 1.3.0
@@ -161,7 +161,7 @@

Authors

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/index.html b/public/index.html index 45127a3..e97900b 100644 --- a/public/index.html +++ b/public/index.html @@ -31,7 +31,7 @@ tobalcepi - 1.2.2 + 1.3.0
@@ -84,8 +84,8 @@ + -

DRAFT WORKING VERSION - Some code and documentation is still incomplete or in need of being refined. The code and documentation are still undergoing internal review by the analyst team.

Motivation

@@ -189,27 +189,29 @@

Installation

tobalcepi is currently available only to members of the project team (but please contact Duncan Gillespie to discuss). To access you need to sign-up for a GitLab account. You will then need to be added to the STAPM project team to gain access.

Once that is sorted, you can install the development version from GitLab with:

-
#install.packages("devtools")
+
+#install.packages("devtools")
 #install.packages("getPass")
 
-devtools::install_git(
-  "https://gitlab.com/stapm/r-packages/tobalcepi.git",
-  credentials = git2r::cred_user_pass("uname", getPass::getPass()),
-  ref = "x.x.x",
-  build_vignettes = TRUE
-)
+devtools::install_git(
+  "https://gitlab.com/stapm/r-packages/tobalcepi.git", 
+  credentials = git2r::cred_user_pass("uname", getPass::getPass()),
+  ref = "x.x.x",
+  build_vignettes = TRUE
+)
 
 # Where uname is your Gitlab user name.
 # ref = "x.x.x" is the version to install - remove this to install the latest version
-# this should make a box pop up where you enter your GitLab password
+# this should make a box pop up where you enter your GitLab password

Then load the package, and some other packages that are useful. Note that the code within tobalcepi uses the data.table::data.table() syntax.

-
# Load the package
-library(tobalcepi)
+
+# Load the package
+library(tobalcepi)
 
 # Other useful packages
-library(dplyr) # for data manipulation and summary
-library(magrittr) # for pipes
-library(ggplot2) # for plotting
+library(dplyr) # for data manipulation and summary +library(magrittr) # for pipes +library(ggplot2) # for plotting

@@ -222,7 +224,7 @@

References

-

Angus, Colin, M Henney, L Webster, and Duncan Gillespie. 2018. “Alcohol-Attributable Diseases and Dose-Response Curves for the Sheffield Alcohol Policy Model Version 4.0.” https://doi.org/10.15131/shef.data.6819689.v1.

+

Angus, Colin, M Henney, L Webster, and Duncan Gillespie. 2018. “Alcohol-Attributable Diseases and Dose-Response Curves for the Sheffield Alcohol Policy Model Version 4.0.” The University of Sheffield. https://doi.org/10.15131/shef.data.6819689.v2.

Webster, Laura, Colin Angus, Alan Brennan, and Duncan Gillespie. 2018. “Smoking and the Risks of Adult Diseases.” The University of Sheffield. https://doi.org/10.15131/shef.data.7411451.v1.

@@ -265,6 +267,7 @@

Developers

Dev status

    +
  • Lifecycle: maturing
  • Project Status: Active – The project has reached a stable, usable state and is being actively developed.
@@ -277,7 +280,7 @@

Dev status

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/pkgdown.css b/public/pkgdown.css index c01e592..1273238 100644 --- a/public/pkgdown.css +++ b/public/pkgdown.css @@ -244,14 +244,14 @@ nav[data-toggle='toc'] .nav .nav > .active:focus > a { .ref-index th {font-weight: normal;} -.ref-index td {vertical-align: top;} +.ref-index td {vertical-align: top; min-width: 100px} .ref-index .icon {width: 40px;} .ref-index .alias {width: 40%;} .ref-index-icons .alias {width: calc(40% - 40px);} .ref-index .title {width: 60%;} .ref-arguments th {text-align: right; padding-right: 10px;} -.ref-arguments th, .ref-arguments td {vertical-align: top;} +.ref-arguments th, .ref-arguments td {vertical-align: top; min-width: 100px} .ref-arguments .name {width: 20%;} .ref-arguments .desc {width: 80%;} diff --git a/public/pkgdown.yml b/public/pkgdown.yml index 7b0af5b..858add2 100644 --- a/public/pkgdown.yml +++ b/public/pkgdown.yml @@ -1,12 +1,12 @@ pandoc: 2.9.2.1 -pkgdown: 1.5.1 +pkgdown: 1.6.1 pkgdown_sha: ~ articles: alc_partially_attrib_acute: alc_partially_attrib_acute.html alc_wholly_attrib_acute: alc_wholly_attrib_acute.html alc_wholly_attrib_chronic: alc_wholly_attrib_chronic.html smoking-disease-risks: smoking-disease-risks.html -last_built: 2020-11-26T11:39Z +last_built: 2020-11-28T16:23Z urls: reference: https://stapm.gitlab.io/tobalcepi/reference article: https://stapm.gitlab.io/tobalcepi/articles diff --git a/public/reference/AlcBinge.html b/public/reference/AlcBinge.html index c471da4..3a7c522 100644 --- a/public/reference/AlcBinge.html +++ b/public/reference/AlcBinge.html @@ -74,7 +74,7 @@ tobalcepi - 1.2.2 + 1.3.0
@@ -137,7 +137,7 @@

Calculate variables to inform alcohol binge model

the patterns of single occasion drinking.

-
AlcBinge(data, params = tobalcepi::binge_params)
+
AlcBinge(data, params = tobalcepi::binge_params)

Arguments

@@ -166,32 +166,34 @@

Details

Examples

-if (FALSE) { +if (FALSE) { # Simulate individual data # Using the parameters for the Gamma distribution from Kehoe et al. 2012 -n <- 1e3 -grams_ethanol_day <- rgamma(n, shape = 0.69, scale = 19.03) - -data <- data.table( - weekmean = grams_ethanol_day * 7 / 8, - peakday = grams_ethanol_day / 8, - age = rpois(n, 30), - sex = sample(x = c("Male", "Female"), size = n, replace = T), - income5cat = "1_lowest income", - imd_quintile = "5_most_deprived", - kids = "0", - social_grade = "C2DE", - eduend4cat = "16-18", # age finished education - ethnicity_2cat = "white", # white / non-white - employ2cat = "yes", # employed / not - weight = rnorm(n, mean = 60, sd = 5), # weight in kg - height = rnorm(n, mean = 1.7, sd = .1) # height in m -) - -test_data <- AlcBinge(data) -}
+n<-1e3 +grams_ethanol_day<-rgamma(n, shape =0.69, scale =19.03) + +data<-data.table( + weekmean =grams_ethanol_day*7/8, + peakday =grams_ethanol_day/8, + age =rpois(n, 30), + sex =sample(x =c("Male", "Female"), size =n, replace =T), + income5cat ="1_lowest income", + imd_quintile ="5_most_deprived", + kids ="0", + social_grade ="C2DE", + eduend4cat ="16-18", # age finished education + ethnicity_2cat ="white", # white / non-white + employ2cat ="yes", # employed / not + weight =rnorm(n, mean =60, sd =5), # weight in kg + height =rnorm(n, mean =1.7, sd =.1)# height in m +) + +test_data<-AlcBinge(data) +} + +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/AlcBinge_stapm.html b/public/reference/AlcBinge_stapm.html index 54ff506..9556a41 100644 --- a/public/reference/AlcBinge_stapm.html +++ b/public/reference/AlcBinge_stapm.html @@ -75,7 +75,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -139,7 +139,7 @@

Calculate variables to inform alcohol binge model - STAPM version

at each time step in the simulation.

-
AlcBinge_stapm(data, params = tobalcepi::binge_params_stapm)
+
AlcBinge_stapm(data, params = tobalcepi::binge_params_stapm)

Arguments

@@ -174,23 +174,25 @@

Details

Examples

-if (FALSE) { +if (FALSE) { # Simulate individual data # Using the parameters for the Gamma distribution from Kehoe et al. 2012 -n <- 1e3 -grams_ethanol_day <- rgamma(n, shape = 0.69, scale = 19.03) - -data <- data.table( - weekmean = grams_ethanol_day * 7 / 8, - age = rpois(n, 30), - sex = sample(x = c("Male", "Female"), size = n, replace = T), - imd_quintile = "5_most_deprived" -) - -test_data <- AlcBinge_stapm(data) -}
+n<-1e3 +grams_ethanol_day<-rgamma(n, shape =0.69, scale =19.03) + +data<-data.table( + weekmean =grams_ethanol_day*7/8, + age =rpois(n, 30), + sex =sample(x =c("Male", "Female"), size =n, replace =T), + imd_quintile ="5_most_deprived" +) + +test_data<-AlcBinge_stapm(data) +} + +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/AlcLags.html b/public/reference/AlcLags.html index 71f0eb8..2f74ca6 100644 --- a/public/reference/AlcLags.html +++ b/public/reference/AlcLags.html @@ -74,7 +74,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -137,7 +137,7 @@

Alcohol lag times

since alcohol consumption changed.

-
AlcLags(disease_name = c("Pharynx", "Oral_cavity"), n_years = 20)
+
AlcLags(disease_name = c("Pharynx", "Oral_cavity"), n_years = 20)

Arguments

@@ -164,9 +164,10 @@

Details and are the numbers used in the current version of SAPM.

Examples

-
if (FALSE) { -AlcLags("Pharynx") -}
+
if (FALSE) { +AlcLags("Pharynx") +} +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/ExpandCodes.html b/public/reference/ExpandCodes.html index 5737f1b..d040d21 100644 --- a/public/reference/ExpandCodes.html +++ b/public/reference/ExpandCodes.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Convert groups of ICD-10 codes to single codes

Creates the lookup files for search for single ICD-10 codes related to tobacco and/or alcohol.

-
ExpandCodes(lkup)
+
ExpandCodes(lkup)

Arguments

@@ -155,11 +155,13 @@

Details

Examples

-if (FALSE) { +if (FALSE) { -ExpandCodes(lkup) +ExpandCodes(lkup) -}
+} + +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/PArisk.html b/public/reference/PArisk.html index 3b6fc93..268ee13 100644 --- a/public/reference/PArisk.html +++ b/public/reference/PArisk.html @@ -73,7 +73,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -135,19 +135,19 @@

Relative risks for alcohol-related injuries

for each individual for experiencing each cause during one year.

-
PArisk(
-  SODMean = NULL,
-  SODSDV = NULL,
-  SODFreq = NULL,
-  Weight = NULL,
-  Widmark_r = NULL,
-  cause = "Transport",
-  grams_ethanol = 1:100,
-  grams_ethanol_per_unit = 8,
-  grams_ethanol_per_std_drink = 12.8,
-  liver_clearance_rate_h = 0.017,
-  getcurve = FALSE
-)
+
PArisk(
+  SODMean = NULL,
+  SODSDV = NULL,
+  SODFreq = NULL,
+  Weight = NULL,
+  Widmark_r = NULL,
+  cause = "Transport",
+  grams_ethanol = 1:100,
+  grams_ethanol_per_unit = 8,
+  grams_ethanol_per_std_drink = 12.8,
+  liver_clearance_rate_h = 0.017,
+  getcurve = FALSE
+)

Arguments

@@ -221,28 +221,28 @@

Details

Examples

-if (FALSE) { +if (FALSE) { ## Further explanation - + # For a male with the following characteristics: -Weight <- 70 # weight in kg -Height <- 2 # height in m -Age <- 25 # age in years +Weight <- 70 # weight in kg +Height <- 2 # height in m +Age <- 25 # age in years # We can estimate their r value from the Widmark equation # using parameter values from Posey and Mozayani (2007) -Widmark_r <- 0.39834 + ((12.725 * Height - 0.11275 * Age + 2.8993) / Weight) +Widmark_r <- 0.39834 + ((12.725 * Height - 0.11275 * Age + 2.8993) / Weight) # They might drink from 1 to 100 grams of ethanol on one occassion -grams_ethanol <- 1:100 +grams_ethanol <- 1:100 # In minutes, We would expect them to remain intoxicated # (with blood alcohol content > 0 percent) for -Duration_m <- 100 * grams_ethanol / (Widmark_r * Weight * 1000 * (liver_clearance_rate_h / 60)) +Duration_m <- 100 * grams_ethanol / (Widmark_r * Weight * 1000 * (liver_clearance_rate_h / 60)) # and hours -Duration_h <- Duration_m / 60 +Duration_h <- Duration_m / 60 # Duration is the length of time taken to clear all alcohol from the blood # so we don't apply any thresholds of intoxication, @@ -253,69 +253,71 @@

Examp # and that the standard deviation of amount drunk on an occasion is 14 units. # The cumulative probability distribution of each amount of alcohol being drunk on an occassion is -x <- pnorm(grams_ethanol, 2 * 8, 14 * 8) +x <- pnorm(grams_ethanol, 2 * 8, 14 * 8) # Convert from the cumulative distribution to the # probability that each level of alcohol is consumed on a drinking occasion -interval_prob <- x - c(0, x[1:(length(x) - 1)]) +interval_prob <- x - c(0, x[1:(length(x) - 1)]) # The probability-weighted distribution of time spent intoxicated during a year (52 weeks) is -Time_intox <- 5 * 52 * interval_prob * Duration_h +Time_intox <- 5 * 52 * interval_prob * Duration_h # And the expected total time spent intoxicated is -Time_intox_sum <- sum(Time_intox) +Time_intox_sum <- sum(Time_intox) # The relative risk of a transport injury corresponding to each amount drunk on a single occasion # corresponds to the number of standard drinks consumed # We convert to standard drinking and apply the risk parameters from Cherpitel -v <- grams_ethanol / 12.8 -v1 <- (v + 1) / 100 +v <- grams_ethanol / 12.8 +v1 <- (v + 1) / 100 # Parameters from Cherpitel -b1 <- 3.973538882 -b2 <- 6.65184e-6 -b3 <- 0.837637 -b4 <- 1.018824 +b1 <- 3.973538882 +b2 <- 6.65184e-6 +b3 <- 0.837637 +b4 <- 1.018824 # Apply formula for the risk curve from Cherpital -lvold_1 <- log(v1) + b1 -lvold_2 <- (v1^3) - b2 -logitp <- lvold_1 * b3 + lvold_2 * b4 -p <- boot::inv.logit(logitp) +lvold_1 <- log(v1) + b1 +lvold_2 <- (v1^3) - b2 +logitp <- lvold_1 * b3 + lvold_2 * b4 +p <- boot::inv.logit(logitp) # The relative risk associated with each amount drunk on an occasion -rr <- p / p[1] +rr <- p / p[1] # The relative risk multiplied by the time exposed to that level of risk -Current_risk <- rr * Time_intox +Current_risk <- rr * Time_intox # The sum of the relative risk associated with the time spent intoxicated during one year -Risk_sum <- sum(Current_risk) +Risk_sum <- sum(Current_risk) # The average annual relative risk, considering that time in the year spent with a # blood alcohol content of zero has a relative risk of 1. -Annual_risk <- min( - (Risk_sum + 1 * (365 * 24 - Time_intox_sum)) / (365 * 24), - 365 * 24, na.rm = T) +Annual_risk <- min( + (Risk_sum + 1 * (365 * 24 - Time_intox_sum)) / (365 * 24), + 365 * 24, na.rm = T) # THE FOLLOWING ARE NOT CONSIDERED IN THIS CALCULATION # Elapsed time in minutes since consuming alcohol -t <- 30 +t <- 30 # Alcohol absorbtion rate constant -k_empty_stomach <- 6.5 / 60 # grams of ethanol per minute +k_empty_stomach <- 6.5 / 60 # grams of ethanol per minute # Alcohol absorbtion -alcohol_absorbed <- grams_ethanol * (1 - exp(-k_empty_stomach * t)) +alcohol_absorbed <- grams_ethanol * (1 - exp(-k_empty_stomach * t)) # Calculate blood alcohol content using the Widemark eqn -bac <- (100 * alcohol_absorbed / (Widmark_r * Weight * 1000)) - ((liver_clearance_rate_h / 60) * t) -}

+bac<-(100*alcohol_absorbed/(Widmark_r*Weight*1000))-((liver_clearance_rate_h/60)*t) +} + +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/RRFunc.html b/public/reference/RRFunc.html index 5707891..e9bed86 100644 --- a/public/reference/RRFunc.html +++ b/public/reference/RRFunc.html @@ -75,7 +75,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -139,24 +139,24 @@

Individual relative risks of disease

to the alcohol only, tobacco only, or joint tobacco and alcohol contexts.

-
RRFunc(
-  data,
-  substance = c("tob", "alc", "tobalc"),
-  k_year = NULL,
-  alc_diseases = tobalcepi::alc_disease_names,
-  alc_mort_and_morb = c("Ischaemic_heart_disease", "LiverCirrhosis"),
-  alc_risk_lags = TRUE,
-  alc_indiv_risk_trajectories_store = NULL,
-  alc_protective = TRUE,
-  alc_wholly_chronic_thresholds = c(2, 2),
-  alc_wholly_acute_thresholds = c(3, 4),
-  grams_ethanol_per_unit = 8,
-  tob_diseases = tobalcepi::tob_disease_names,
-  tob_include_risk_in_former_smokers = TRUE,
-  tobalc_include_int = FALSE,
-  tobalc_int_data = NULL,
-  show_progress = FALSE
-)
+
RRFunc(
+  data,
+  substance = c("tob", "alc", "tobalc"),
+  k_year = NULL,
+  alc_diseases = tobalcepi::alc_disease_names,
+  alc_mort_and_morb = c("Ischaemic_heart_disease", "LiverCirrhosis"),
+  alc_risk_lags = TRUE,
+  alc_indiv_risk_trajectories_store = NULL,
+  alc_protective = TRUE,
+  alc_wholly_chronic_thresholds = c(2, 2),
+  alc_wholly_acute_thresholds = c(3, 4),
+  grams_ethanol_per_unit = 8,
+  tob_diseases = tobalcepi::tob_disease_names,
+  tob_include_risk_in_former_smokers = TRUE,
+  tobalc_include_int = FALSE,
+  tobalc_int_data = NULL,
+  show_progress = FALSE
+)

Arguments

@@ -336,87 +336,88 @@

See also

RRalc for alcohol-specific risks, RRtob for tobacco-specific risks, -AlcLags for alcohol-specific lag times, and TobLags for tobacco-specific lag times.

+AlcLags for alcohol-specific lag times, and TobLags for tobacco-specific lag times.

+

Maturing lifecycle

Examples

-
if (FALSE) { +
if (FALSE) { ############################# ## ALCOHOL # Simulate individual data # Using the parameters for the Gamma distribution from Kehoe et al. 2012 -n <- 1e4 -grams_ethanol_day <- rgamma(n, shape = 0.69, scale = 19.03) +n <- 1e4 +grams_ethanol_day <- rgamma(n, shape = 0.69, scale = 19.03) # Note: the socioeconomic and other variables are needed for the binge model -data <- data.table( - year = 2016, - weekmean = grams_ethanol_day * 7 / 8, +data <- data.table( + year = 2016, + weekmean = grams_ethanol_day * 7 / 8, #peakday = 2 * grams_ethanol_day / 8, - age = rpois(n, 30), - sex = sample(x = c("Male", "Female"), size = n, replace = T), - income5cat = "1_lowest income", - imd_quintile = "5_most_deprived", - kids = "0", - social_grade = "C2DE", - eduend4cat = "16-18", # age finished education - ethnic2cat = "white", # white / non-white - employ2cat = "yes", # employed / not - wtval = rnorm(n, mean = 60, sd = 5), # weight in kg - htval = rnorm(n, mean = 1.7, sd = .1) # height in m -) + age = rpois(n, 30), + sex = sample(x = c("Male", "Female"), size = n, replace = T), + income5cat = "1_lowest income", + imd_quintile = "5_most_deprived", + kids = "0", + social_grade = "C2DE", + eduend4cat = "16-18", # age finished education + ethnic2cat = "white", # white / non-white + employ2cat = "yes", # employed / not + wtval = rnorm(n, mean = 60, sd = 5), # weight in kg + htval = rnorm(n, mean = 1.7, sd = .1) # height in m +) # Add individual ids to the data -data <- MakeSeeds(data, n = 0) +data <- MakeSeeds(data, n = 0) # Disease names -alc_disease_names <- c( +alc_disease_names <- c( "Pharynx", "Ischaemic_heart_disease", "LiverCirrhosis", "Transport_injuries", "Alcohol_poisoning", "Alcoholic_gastritis" -) +) -test_data <- copy(data) +test_data <- copy(data) -test_data1 <- RRFunc( - data = test_data, - substance = "alc", - k_year = 2017, - alc_diseases = alc_disease_names, - alc_indiv_risk_trajectories_store = NULL, - alc_wholly_chronic_thresholds = c(2, 2), - alc_wholly_acute_thresholds = c(3, 4), - show_progress = TRUE -) +test_data1 <- RRFunc( + data = test_data, + substance = "alc", + k_year = 2017, + alc_diseases = alc_disease_names, + alc_indiv_risk_trajectories_store = NULL, + alc_wholly_chronic_thresholds = c(2, 2), + alc_wholly_acute_thresholds = c(3, 4), + show_progress = TRUE +) -test_data1 +test_data1 -test_data <- copy(data) -test_data[ , year := 2017] +test_data <- copy(data) +test_data[ , year := 2017] -test_data2 <- RRFunc( - data = test_data, - substance = "alc", - k_year = 2018, - alc_diseases = alc_disease_names, - alc_indiv_risk_trajectories_store = test_data1$new_alc_indiv_risk_trajectories_store, - alc_wholly_chronic_thresholds = c(2, 2), - alc_wholly_acute_thresholds = c(3, 4), - show_progress = TRUE -) +test_data2 <- RRFunc( + data = test_data, + substance = "alc", + k_year = 2018, + alc_diseases = alc_disease_names, + alc_indiv_risk_trajectories_store = test_data1$new_alc_indiv_risk_trajectories_store, + alc_wholly_chronic_thresholds = c(2, 2), + alc_wholly_acute_thresholds = c(3, 4), + show_progress = TRUE +) -test_data2 +test_data2 ############################# ## TOBACCO -tob_disease_names <- c( +tob_disease_names <- c( "Pharynx", "Chronic_obstructive_pulmonary_disease", "Ischaemic_heart_disease", @@ -424,32 +425,33 @@

Examp "Influenza_clinically_diagnosed", "Diabetes", "Schizophrenia" -) +) -n <- 1e4 +n <- 1e4 -data <- data.table( - smk.state = sample(x = c("current", "former", "never"), size = n, replace = T), - time_since_quit = sample(x = 0:40, size = n, replace = T), - age = rpois(n, 30), - sex = sample(x = c("Male", "Female"), size = n, replace = T) -) +data <- data.table( + smk.state = sample(x = c("current", "former", "never"), size = n, replace = T), + time_since_quit = sample(x = 0:40, size = n, replace = T), + age = rpois(n, 30), + sex = sample(x = c("Male", "Female"), size = n, replace = T) +) -data[smk.state != "former", time_since_quit := NA] +data[smk.state != "former", time_since_quit := NA] # Tobacco relative risks for Pharygeal cancer -RRFunc( - data = data, - substance = "tob", - tob_diseases = tob_disease_names, - show_progress = TRUE -) +RRFunc( + data = data, + substance = "tob", + tob_diseases = tob_disease_names, + show_progress = TRUE +) ############################# ## TOBACCO AND ALCOHOL -}

+} +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/RRTobDR.html b/public/reference/RRTobDR.html index f5a3f5d..a64fe4e 100644 --- a/public/reference/RRTobDR.html +++ b/public/reference/RRTobDR.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Dose-response relative risks for tobacco-related cancers

Computes the relative risks for each tobacco-related cancer based on the published risk curves.

-
RRTobDR(data, disease = "Pharynx", av_cigs_day = "cigs_per_day")
+
RRTobDR(data, disease = "Pharynx", av_cigs_day = "cigs_per_day")

Arguments

@@ -166,14 +166,15 @@

Details

Examples

-if (FALSE) { +if (FALSE) { -RRTobDR(data = data, - disease = "Pharynx", - av_cigs_day = "cigs_per_day" - ) +RRTobDR(data = data, + disease = "Pharynx", + av_cigs_day = "cigs_per_day" + ) -}
+} +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/RRalc.html b/public/reference/RRalc.html index 8f55894..6631019 100644 --- a/public/reference/RRalc.html +++ b/public/reference/RRalc.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,19 +133,19 @@

Relative risks for alcohol related diseases

Computes the relative risks for each alcohol related disease based on the published risk curves.

-
RRalc(
-  data,
-  disease = "Pharynx",
-  av_weekly_grams_per_day_var = "GPerDay",
-  sex_var = "sex",
-  age_var = "age",
-  mort_or_morb = c("mort", "morb"),
-  alc_protective = TRUE,
-  alc_wholly_chronic_thresholds = c(2, 2),
-  alc_wholly_acute_thresholds = c(3, 4),
-  grams_ethanol_per_unit = 8,
-  getcurve = F
-)
+
RRalc(
+  data,
+  disease = "Pharynx",
+  av_weekly_grams_per_day_var = "GPerDay",
+  sex_var = "sex",
+  age_var = "age",
+  mort_or_morb = c("mort", "morb"),
+  alc_protective = TRUE,
+  alc_wholly_chronic_thresholds = c(2, 2),
+  alc_wholly_acute_thresholds = c(3, 4),
+  grams_ethanol_per_unit = 8,
+  getcurve = F
+)

Arguments

@@ -230,46 +230,47 @@

Details

Examples

-if (FALSE) { +if (FALSE) { # Draw disease specific risk functions # Example data -data <- data.table( - GPerDay = 0:100, +data <- data.table( + GPerDay = 0:100, #peakday_grams = 0:100, - sex = "Female", - age = 30 -) + sex = "Female", + age = 30 +) # Apply the function -test1 <- RRalc( - data, - disease = "Pharynx", - mort_or_morb = "mort" -) - -test2 <- RRalc( - data, - disease = "Ischaemic_heart_disease", - mort_or_morb = "morb" -) - -test3 <- RRalc( - data, - disease = "LiverCirrhosis", - mort_or_morb = "mort" -) +test1 <- RRalc( + data, + disease = "Pharynx", + mort_or_morb = "mort" +) + +test2 <- RRalc( + data, + disease = "Ischaemic_heart_disease", + mort_or_morb = "morb" +) + +test3 <- RRalc( + data, + disease = "LiverCirrhosis", + mort_or_morb = "mort" +) # Plot the risk functions -plot(test1 ~ I(0:100), type = "l", ylim = c(0, 10), ylab = "rr", -main = "Females, age 30", xlab = "g per day") -lines(test2 ~ I(0:100), col = 2) -lines(test3 ~ I(0:100), col = 3) -legend("topleft", -c("Pharyngeal cancer", "Ischaemic heart disease morbidity", "Liver Cirrhosis mortality"), -lty = 1, col = 1:3) -}
+plot(test1~I(0:100), type ="l", ylim =c(0, 10), ylab ="rr", +main ="Females, age 30", xlab ="g per day") +lines(test2~I(0:100), col =2) +lines(test3~I(0:100), col =3) +legend("topleft", +c("Pharyngeal cancer", "Ischaemic heart disease morbidity", "Liver Cirrhosis mortality"), +lty =1, col =1:3) +} +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/RRtob.html b/public/reference/RRtob.html index 2c977df..bb930bf 100644 --- a/public/reference/RRtob.html +++ b/public/reference/RRtob.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,14 +133,14 @@

Tobacco relative risks

Relative risks for current vs. never cigarette smokers.

-
RRtob(
-  data,
-  disease = "Pharynx",
-  smoker_status_var = "smk.state",
-  sex_var = "sex",
-  age_var = "age",
-  rr_data = tobalcepi::tobacco_relative_risks
-)
+
RRtob(
+  data,
+  disease = "Pharynx",
+  smoker_status_var = "smk.state",
+  sex_var = "sex",
+  age_var = "age",
+  rr_data = tobalcepi::tobacco_relative_risks
+)

Arguments

@@ -201,23 +201,24 @@

Details

Examples

-
if (FALSE) { +
if (FALSE) { # Example data -n <- 1e2 +n <- 1e2 -data <- data.table( - smk.state = sample(x = c("current", "former", "never"), size = n, replace = T), - sex = "Female", - age = 30 -) +data <- data.table( + smk.state = sample(x = c("current", "former", "never"), size = n, replace = T), + sex = "Female", + age = 30 +) # Apply the function -test <- RRtob( - data, - disease = "Pharynx" -) -}
+test <- RRtob( + data, + disease = "Pharynx" +) +} +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/Rplot001.png b/public/reference/Rplot001.png new file mode 100644 index 0000000..17a3580 Binary files /dev/null and b/public/reference/Rplot001.png differ diff --git a/public/reference/TobAlcInt.html b/public/reference/TobAlcInt.html index 96e37c6..9b61380 100644 --- a/public/reference/TobAlcInt.html +++ b/public/reference/TobAlcInt.html @@ -73,7 +73,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -135,14 +135,14 @@

Risk interaction between tobacco and alcohol

individual's tobacco and alcohol consumption.

-
TobAlcInt(
-  data,
-  disease = "Pharynx",
-  alcohol_var = "weekmean",
-  tobacco_var = "smk.state",
-  rr.data,
-  account_for_synergy = TRUE
-)
+
TobAlcInt(
+  data,
+  disease = "Pharynx",
+  alcohol_var = "weekmean",
+  tobacco_var = "smk.state",
+  rr.data,
+  account_for_synergy = TRUE
+)

Arguments

@@ -199,22 +199,26 @@

R , https://figshare.shef.ac.uk/articles/Smoking_and_the_risks_of_adult_diseases/7411451/1.

Hashibe M, Brennan P, Chuang SC, Boccia S, Castellsague X, Chen C, Curado MP, Dal Maso L, Daudt AW, Fabianova E, Fernandez L, Wunsch-Filho V, Franceschi S, Hayes RB, Herrero R, Kelsey K, Koifman S, La Vecchia C, Lazarus P, Levi F, Lence JJ, Mates D, Matos E, Menezes A, McClean MD, Muscat J, Eluf-Neto J, Olshan AF, Purdue M, Rudnai P, Schwartz SM, Smith E, Sturgis EM, Szeszenia-Dabrowska N, Talamini R, Wei QY, Winn DM, Shangina O, Pilarska A, Zhang ZF, Ferro G, Berthiller J, Boffetta P (2009). “Interaction between Tobacco and Alcohol Use and the Risk of Head and Neck Cancer: Pooled Analysis in the International Head and Neck Cancer Epidemiology Consortium.” -Cancer Epidemiology Biomarkers \& Prevention, 18(2), 541-550. +Cancer Epidemiology Biomarkers \& Prevention, 18(2), 541--550. ISSN 1055-9965, doi: 10.1158/1055-9965.epi-08-0347 -.

+, https://doi.org/10.1158/1055-9965.epi-08-0347.

Prabhu A, Obi KO, Rubenstein JH (2014). “The Synergistic Effects of Alcohol and Tobacco Consumption on the Risk of Esophageal Squamous Cell Carcinoma: A Meta-Analysis.” -American Journal of Gastroenterology, 109(6), 821-827. +American Journal of Gastroenterology, 109(6), 821--827. ISSN 0002-9270, doi: 10.1038/ajg.2014.71 -.

+, https://doi.org/10.1038/ajg.2014.71.

+

Maturing lifecycle

Examples

-if (FALSE) { +if (FALSE) { -TobAlcInt() +TobAlcInt() -}
+} + + +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/TobLags.html b/public/reference/TobLags.html index a211d71..5dd3577 100644 --- a/public/reference/TobLags.html +++ b/public/reference/TobLags.html @@ -74,7 +74,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -137,11 +137,11 @@

Tobacco lag times

since e.g. someone quit smoking

-
TobLags(
-  disease_name = c("Pharynx", "Oral_cavity"),
-  n_years = 40,
-  lag_data = tobalcepi::tobacco_lag_times
-)
+
TobLags(
+  disease_name = c("Pharynx", "Oral_cavity"),
+  n_years = 40,
+  lag_data = tobalcepi::tobacco_lag_times
+)

Arguments

@@ -190,7 +190,8 @@

Details

Examples

-TobLags("Pharynx")
#> time_since_quit prop_risk_reduction +TobLags("Pharynx") +
#> time_since_quit prop_risk_reduction #> 1: 0 0.00000000 #> 2: 1 0.08876399 #> 3: 2 0.16923763 @@ -249,7 +250,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/WArisk_acute.html b/public/reference/WArisk_acute.html index c2e5057..6d926c9 100644 --- a/public/reference/WArisk_acute.html +++ b/public/reference/WArisk_acute.html @@ -74,7 +74,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -137,14 +137,14 @@

Risk of acute conditions wholly-attributable to alcohol

(e.g. alcohol poisoning or the effects of acute intoxication).

-
WArisk_acute(
-  SODMean,
-  SODSDV,
-  SODFreq,
-  sex,
-  grams_ethanol_per_unit = 8,
-  alc_wholly_acute_thresholds = c(6, 8)
-)
+
WArisk_acute(
+  SODMean,
+  SODSDV,
+  SODFreq,
+  sex,
+  grams_ethanol_per_unit = 8,
+  alc_wholly_acute_thresholds = c(6, 8)
+)

Arguments

@@ -205,26 +205,28 @@

Details

Examples

-if (FALSE) { +if (FALSE) { # Function called within RRAlc() -data[ , ar := sapply(1:n, function(z) { -tobalcepi::WArisk_acute( - SODMean = mean_sod[z], - SODSDV = occ_sd[z], - SODFreq = drink_freq[z], - sex = sex[z], - grams_ethanol_per_unit = grams_ethanol_per_unit, - alc_wholly_acute_thresholds = alc_wholly_acute_thresholds -) -})] +data[ , ar := sapply(1:n, function(z) { +tobalcepi::WArisk_acute( + SODMean = mean_sod[z], + SODSDV = occ_sd[z], + SODFreq = drink_freq[z], + sex = sex[z], + grams_ethanol_per_unit = grams_ethanol_per_unit, + alc_wholly_acute_thresholds = alc_wholly_acute_thresholds +) +})] -risk_indiv <- 1 + data[ , ar] # add 1 to remove 0/0 = Not a number error later +risk_indiv <- 1 + data[ , ar] # add 1 to remove 0/0 = Not a number error later -data[ , ar := NULL] +data[ , ar := NULL] -}
+} + +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/alc_disease_names.html b/public/reference/alc_disease_names.html index 448a870..277fedc 100644 --- a/public/reference/alc_disease_names.html +++ b/public/reference/alc_disease_names.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Names of alcohol-related diseases

Names of alcohol-related diseases

-
alc_disease_names
+
alc_disease_names

Format

@@ -146,7 +146,8 @@

R

Angus C, Henney M, Webster L, Gillespie D (2018). “Alcohol-attributable diseases and dose-response curves for the Sheffield Alcohol Policy Model version 4.0.” The University of Sheffield. -https://doi.org/10.15131/shef.data.6819689.v2.

+doi: 10.15131/shef.data.6819689.v2 +, https://doi.org/10.15131/shef.data.6819689.v2.

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/alc_icd10_lookups.html b/public/reference/alc_icd10_lookups.html new file mode 100644 index 0000000..016bdc3 --- /dev/null +++ b/public/reference/alc_icd10_lookups.html @@ -0,0 +1,177 @@ + + + + + + + + +Diseases related to alcohol and their ICD-10 defintions — alc_icd10_lookups • tobalcepi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +
+

Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06.

+
+ +
alc_icd10_lookups
+ + +

Format

+ +

A data table

+

Source

+ +

Our alcohol disease list in the folder PR_Disease_Risk_TA

+ +
+ +
+ + + +
+ + + + + + + + diff --git a/public/reference/binge_params.html b/public/reference/binge_params.html index 97e7bd2..123b22e 100644 --- a/public/reference/binge_params.html +++ b/public/reference/binge_params.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Parameters to estimate amount drunk on single occassions

We use parameter estimates from Hill-McManus et al 2014 -

-
binge_params
+
binge_params

Format

@@ -165,7 +165,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/binge_params_stapm.html b/public/reference/binge_params_stapm.html index c3cc2c8..afac3c1 100644 --- a/public/reference/binge_params_stapm.html +++ b/public/reference/binge_params_stapm.html @@ -77,7 +77,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -143,7 +143,7 @@

Parameters to estimate amount drunk on single occassions - STAPM version

-
binge_params_stapm
+
binge_params_stapm

Format

@@ -171,7 +171,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/disease_groups.html b/public/reference/disease_groups.html index b27456f..9c6daa9 100644 --- a/public/reference/disease_groups.html +++ b/public/reference/disease_groups.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Groupings of smoking-related diseases into disease types

Groupings of smoking-related diseases into disease types

-
disease_groups
+
disease_groups

Format

@@ -158,7 +158,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/figures/lifecycle-archived.svg b/public/reference/figures/lifecycle-archived.svg new file mode 100644 index 0000000..48f72a6 --- /dev/null +++ b/public/reference/figures/lifecycle-archived.svg @@ -0,0 +1 @@ + lifecyclelifecyclearchivedarchived \ No newline at end of file diff --git a/public/reference/figures/lifecycle-defunct.svg b/public/reference/figures/lifecycle-defunct.svg new file mode 100644 index 0000000..01452e5 --- /dev/null +++ b/public/reference/figures/lifecycle-defunct.svg @@ -0,0 +1 @@ +lifecyclelifecycledefunctdefunct \ No newline at end of file diff --git a/public/reference/figures/lifecycle-deprecated.svg b/public/reference/figures/lifecycle-deprecated.svg new file mode 100644 index 0000000..4baaee0 --- /dev/null +++ b/public/reference/figures/lifecycle-deprecated.svg @@ -0,0 +1 @@ +lifecyclelifecycledeprecateddeprecated \ No newline at end of file diff --git a/public/reference/figures/lifecycle-experimental.svg b/public/reference/figures/lifecycle-experimental.svg new file mode 100644 index 0000000..d1d060e --- /dev/null +++ b/public/reference/figures/lifecycle-experimental.svg @@ -0,0 +1 @@ +lifecyclelifecycleexperimentalexperimental \ No newline at end of file diff --git a/public/reference/figures/lifecycle-maturing.svg b/public/reference/figures/lifecycle-maturing.svg new file mode 100644 index 0000000..df71310 --- /dev/null +++ b/public/reference/figures/lifecycle-maturing.svg @@ -0,0 +1 @@ +lifecyclelifecyclematuringmaturing \ No newline at end of file diff --git a/public/reference/figures/lifecycle-questioning.svg b/public/reference/figures/lifecycle-questioning.svg new file mode 100644 index 0000000..08ee0c9 --- /dev/null +++ b/public/reference/figures/lifecycle-questioning.svg @@ -0,0 +1 @@ +lifecyclelifecyclequestioningquestioning \ No newline at end of file diff --git a/public/reference/figures/lifecycle-soft-deprecated.svg b/public/reference/figures/lifecycle-soft-deprecated.svg new file mode 100644 index 0000000..9f014fd --- /dev/null +++ b/public/reference/figures/lifecycle-soft-deprecated.svg @@ -0,0 +1 @@ +lifecyclelifecyclesoft-deprecatedsoft-deprecated \ No newline at end of file diff --git a/public/reference/figures/lifecycle-stable.svg b/public/reference/figures/lifecycle-stable.svg new file mode 100644 index 0000000..e015dc8 --- /dev/null +++ b/public/reference/figures/lifecycle-stable.svg @@ -0,0 +1 @@ +lifecyclelifecyclestablestable \ No newline at end of file diff --git a/public/reference/figures/lifecycle-superseded.svg b/public/reference/figures/lifecycle-superseded.svg new file mode 100644 index 0000000..75f24f5 --- /dev/null +++ b/public/reference/figures/lifecycle-superseded.svg @@ -0,0 +1 @@ + lifecyclelifecyclesupersededsuperseded \ No newline at end of file diff --git a/public/reference/index.html b/public/reference/index.html index 543bdd4..ba02c29 100644 --- a/public/reference/index.html +++ b/public/reference/index.html @@ -71,7 +71,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -188,6 +188,12 @@

Names of tobacco-related diseases

+ + + + @@ -259,6 +265,12 @@

Names of alcohol-related diseases

+ + + + @@ -356,6 +368,12 @@

tob_alc_risk_int

+ + + + @@ -400,7 +418,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/subgroupRisk.html b/public/reference/subgroupRisk.html index 27a552a..8bdfdb8 100644 --- a/public/reference/subgroupRisk.html +++ b/public/reference/subgroupRisk.html @@ -73,7 +73,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -135,16 +135,16 @@

Summarise relative risk

or calculate the subgroup specific attributable fraction based on the current relative risks.

-
subgroupRisk(
-  data,
-  label = NULL,
-  disease_names = c("Pharynx", "Oral_cavity"),
-  af = FALSE,
-  use_weights = FALSE,
-  year_range = "all",
-  pool = FALSE,
-  subgroups = c("sex", "age_cat")
-)
+
subgroupRisk(
+  data,
+  label = NULL,
+  disease_names = c("Pharynx", "Oral_cavity"),
+  af = FALSE,
+  use_weights = FALSE,
+  year_range = "all",
+  pool = FALSE,
+  subgroups = c("sex", "age_cat")
+)

Arguments

+

tob_icd10_lookups

+

Diseases related to tobacco and their ICD-10 defintions

tobacco_relative_risks

+

alc_icd10_lookups

+

Diseases related to alcohol and their ICD-10 defintions

RRalc()

Synergstic effects of tobacco and alcohol risks

+

tobalc_icd10_lookups

+

Diseases related to both tobacco and alcohol and their ICD-10 defintions

@@ -194,60 +194,61 @@

Details method described in the Brennan et al. 2015 SAPM mathematical description paper.

Examples

-
if (FALSE) { +
if (FALSE) { # Simulate individual data # Using the parameters for the Gamma distribution from Kehoe et al. 2012 -n <- 1e4 -grams_ethanol_day <- rgamma(n, shape = 0.69, scale = 19.03) - -data <- data.table( - year = 2016, - weekmean = grams_ethanol_day * 7 / 8, - peakday = 2 * grams_ethanol_day / 8, - age = rpois(n, 30), - sex = sample(x = c("Male", "Female"), size = n, replace = T), - income5cat = "1_lowest income", - imd_quintile = "5_most_deprived", - kids = "0", - social_grade = "C2DE", - eduend4cat = "16-18", # age finished education - ethnic2cat = "white", # white / non-white - employ2cat = "yes", # employed / not - wtval = rnorm(n, mean = 60, sd = 5), # weight in kg - htval = rnorm(n, mean = 1.7, sd = .1) # height in m -) +n <- 1e4 +grams_ethanol_day <- rgamma(n, shape = 0.69, scale = 19.03) + +data <- data.table( + year = 2016, + weekmean = grams_ethanol_day * 7 / 8, + peakday = 2 * grams_ethanol_day / 8, + age = rpois(n, 30), + sex = sample(x = c("Male", "Female"), size = n, replace = T), + income5cat = "1_lowest income", + imd_quintile = "5_most_deprived", + kids = "0", + social_grade = "C2DE", + eduend4cat = "16-18", # age finished education + ethnic2cat = "white", # white / non-white + employ2cat = "yes", # employed / not + wtval = rnorm(n, mean = 60, sd = 5), # weight in kg + htval = rnorm(n, mean = 1.7, sd = .1) # height in m +) # Disease names -alc_disease_names <- c( +alc_disease_names <- c( "Pharynx", "Ischaemic_heart_disease", "LiverCirrhosis", "Transport_injuries", "Alcohol_poisoning", "Alcoholic_gastritis" -) +) # Run basic function without alcohol lags -test_data <- RRFunc( - data = copy(data), - substance = "alc", - alc_diseases = alc_disease_names, - alc_wholly_chronic_thresholds = c(2, 2), - alc_wholly_acute_thresholds = c(3, 3), - show_progress = TRUE -) +test_data <- RRFunc( + data = copy(data), + substance = "alc", + alc_diseases = alc_disease_names, + alc_wholly_chronic_thresholds = c(2, 2), + alc_wholly_acute_thresholds = c(3, 3), + show_progress = TRUE +) # Calculate alcohol attributable fractions -test_aafs <- subgroupRisk( - data = test_data$data_plus_rr, - disease_names = alc_disease_names, - af = TRUE, - subgroups = "sex" -) - -test_aafs -}
+test_aafs <- subgroupRisk( + data = test_data$data_plus_rr, + disease_names = alc_disease_names, + af = TRUE, + subgroups = "sex" +) + +test_aafs +} +
-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/tob_alc_risk_int.html b/public/reference/tob_alc_risk_int.html index 29481e4..cfdc430 100644 --- a/public/reference/tob_alc_risk_int.html +++ b/public/reference/tob_alc_risk_int.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Synergstic effects of tobacco and alcohol risks

Synergstic effects of tobacco and alcohol risks

-
tob_alc_risk_int
+
tob_alc_risk_int

Format

@@ -155,14 +155,14 @@

R , https://figshare.shef.ac.uk/articles/Smoking_and_the_risks_of_adult_diseases/7411451/1.

Hashibe M, Brennan P, Chuang SC, Boccia S, Castellsague X, Chen C, Curado MP, Dal Maso L, Daudt AW, Fabianova E, Fernandez L, Wunsch-Filho V, Franceschi S, Hayes RB, Herrero R, Kelsey K, Koifman S, La Vecchia C, Lazarus P, Levi F, Lence JJ, Mates D, Matos E, Menezes A, McClean MD, Muscat J, Eluf-Neto J, Olshan AF, Purdue M, Rudnai P, Schwartz SM, Smith E, Sturgis EM, Szeszenia-Dabrowska N, Talamini R, Wei QY, Winn DM, Shangina O, Pilarska A, Zhang ZF, Ferro G, Berthiller J, Boffetta P (2009). “Interaction between Tobacco and Alcohol Use and the Risk of Head and Neck Cancer: Pooled Analysis in the International Head and Neck Cancer Epidemiology Consortium.” -Cancer Epidemiology Biomarkers \& Prevention, 18(2), 541-550. +Cancer Epidemiology Biomarkers \& Prevention, 18(2), 541--550. ISSN 1055-9965, doi: 10.1158/1055-9965.epi-08-0347 -.

+, https://doi.org/10.1158/1055-9965.epi-08-0347.

Prabhu A, Obi KO, Rubenstein JH (2014). “The Synergistic Effects of Alcohol and Tobacco Consumption on the Risk of Esophageal Squamous Cell Carcinoma: A Meta-Analysis.” -American Journal of Gastroenterology, 109(6), 821-827. +American Journal of Gastroenterology, 109(6), 821--827. ISSN 0002-9270, doi: 10.1038/ajg.2014.71 -.

+, https://doi.org/10.1038/ajg.2014.71.

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/tob_disease_names.html b/public/reference/tob_disease_names.html index 72e10bd..87f8110 100644 --- a/public/reference/tob_disease_names.html +++ b/public/reference/tob_disease_names.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Names of tobacco-related diseases

Names of tobacco-related diseases

-
tob_disease_names
+
tob_disease_names

Format

@@ -163,7 +163,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/tob_icd10_lookups.html b/public/reference/tob_icd10_lookups.html new file mode 100644 index 0000000..cf2358d --- /dev/null +++ b/public/reference/tob_icd10_lookups.html @@ -0,0 +1,177 @@ + + + + + + + + +Diseases related to tobacco and their ICD-10 defintions — tob_icd10_lookups • tobalcepi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +
+

Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06.

+
+ +
tob_icd10_lookups
+ + +

Format

+ +

A data table

+

Source

+ +

Our tobacco disease list in the folder PR_Disease_Risk_TA

+ +
+ +
+ + + +
+ + + + + + + + diff --git a/public/reference/tobacco_lag_times.html b/public/reference/tobacco_lag_times.html index 429e0f8..ab37886 100644 --- a/public/reference/tobacco_lag_times.html +++ b/public/reference/tobacco_lag_times.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Tobacco lag times

Tobacco lag times

-
tobacco_lag_times
+
tobacco_lag_times

Format

@@ -160,7 +160,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/tobacco_relative_risks.html b/public/reference/tobacco_relative_risks.html index e492f93..629d83e 100644 --- a/public/reference/tobacco_relative_risks.html +++ b/public/reference/tobacco_relative_risks.html @@ -72,7 +72,7 @@ tobalcepi - 1.2.2 + 1.3.0 @@ -133,7 +133,7 @@

Tobacco relative risks

Tobacco relative risks

-
tobacco_relative_risks
+
tobacco_relative_risks

Format

@@ -163,7 +163,7 @@

Contents

-

Site built with pkgdown 1.5.1.

+

Site built with pkgdown 1.6.1.

diff --git a/public/reference/tobalc_icd10_lookups.html b/public/reference/tobalc_icd10_lookups.html new file mode 100644 index 0000000..7c06e74 --- /dev/null +++ b/public/reference/tobalc_icd10_lookups.html @@ -0,0 +1,177 @@ + + + + + + + + +Diseases related to both tobacco and alcohol and their ICD-10 defintions — tobalc_icd10_lookups • tobalcepi + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + +
+ +
+
+ + +
+

Deaths in the mortality data are assigned a single ICD-10 code e.g. C00, +but for our analysis we need to group these into cause-groups according to groups e.g. C00-C06. +To do this, we define each group by its consituent ICD-10 codes e.g. C00, C01, C02, C03, C04, C05, C06.

+
+ +
tobalc_icd10_lookups
+ + +

Format

+ +

A data table

+

Source

+ +

Our joint tobacco and alcohol disease list in the folder PR_Disease_Risk_TA

+ +
+ +
+ + + +
+ + + + + + + + diff --git a/public/sitemap.xml b/public/sitemap.xml index e89a316..f3bfd0b 100644 --- a/public/sitemap.xml +++ b/public/sitemap.xml @@ -42,6 +42,9 @@ https://stapm.gitlab.io/tobalcepi/reference/alc_disease_names.html + + https://stapm.gitlab.io/tobalcepi/reference/alc_icd10_lookups.html + https://stapm.gitlab.io/tobalcepi/reference/binge_params.html @@ -60,12 +63,18 @@ https://stapm.gitlab.io/tobalcepi/reference/tob_disease_names.html + + https://stapm.gitlab.io/tobalcepi/reference/tob_icd10_lookups.html + https://stapm.gitlab.io/tobalcepi/reference/tobacco_lag_times.html https://stapm.gitlab.io/tobalcepi/reference/tobacco_relative_risks.html + + https://stapm.gitlab.io/tobalcepi/reference/tobalc_icd10_lookups.html + https://stapm.gitlab.io/tobalcepi/articles/alc_partially_attrib_acute.html