From db9e87846480016b46d993e467aeec08ba2618b8 Mon Sep 17 00:00:00 2001
From: Duncan Gillespie
Date: Sat, 28 Nov 2020 17:06:16 +0000
Subject: [PATCH] fix bug linked to dev status labels
---
DESCRIPTION | 2 +-
NAMESPACE | 15 +-
R/AlcBinge.R | 3 +-
R/AlcBinge_stapm.R | 3 +-
R/AlcLags.R | 3 +-
R/ExpandCodes.R | 3 +-
R/PArisk.R | 3 +-
R/RRAlc.R | 3 +-
R/RRFunc.R | 3 +-
R/RRTobDR.R | 3 +-
R/RRtob.R | 3 +-
R/TobAlcInt.R | 3 +-
R/TobLags.R | 3 +-
R/WArisk_acute.R | 3 +-
R/subgroupRisk.R | 3 +-
R/tobalcepi-package.R | 9 +
man/AlcBinge.Rd | 6 +-
man/AlcBinge_stapm.Rd | 8 +-
man/AlcLags.Rd | 6 +-
man/ExpandCodes.Rd | 4 +-
man/PArisk.Rd | 6 +-
man/RRFunc.Rd | 4 +-
man/RRTobDR.Rd | 4 +-
man/RRalc.Rd | 4 +-
man/RRtob.Rd | 4 +-
man/TobAlcInt.Rd | 10 +-
man/TobLags.Rd | 6 +-
man/WArisk_acute.Rd | 8 +-
man/subgroupRisk.Rd | 6 +-
man/tobalcepi-package.Rd | 23 +++
public/404.html | 2 +-
public/LICENSE.html | 2 +-
.../articles/alc_partially_attrib_acute.html | 2 +-
public/articles/alc_wholly_attrib_acute.html | 2 +-
.../articles/alc_wholly_attrib_chronic.html | 2 +-
public/articles/index.html | 2 +-
public/articles/smoking-disease-risks.html | 2 +-
public/authors.html | 2 +-
public/index.html | 2 +-
public/pkgdown.yml | 2 +-
public/reference/AlcBinge.html | 15 +-
public/reference/AlcBinge_stapm.html | 18 +-
public/reference/AlcLags.html | 15 +-
public/reference/ExpandCodes.html | 9 +-
public/reference/PArisk.html | 12 +-
public/reference/RRFunc.html | 8 +-
public/reference/RRTobDR.html | 9 +-
public/reference/RRalc.html | 9 +-
public/reference/RRtob.html | 9 +-
public/reference/TobAlcInt.html | 13 +-
public/reference/TobLags.html | 15 +-
public/reference/WArisk_acute.html | 15 +-
public/reference/alc_disease_names.html | 2 +-
public/reference/alc_icd10_lookups.html | 2 +-
public/reference/binge_params.html | 2 +-
public/reference/binge_params_stapm.html | 2 +-
public/reference/disease_groups.html | 2 +-
public/reference/index.html | 2 +-
public/reference/subgroupRisk.html | 12 +-
public/reference/tob_alc_risk_int.html | 2 +-
public/reference/tob_disease_names.html | 2 +-
public/reference/tob_icd10_lookups.html | 2 +-
public/reference/tobacco_lag_times.html | 2 +-
public/reference/tobacco_relative_risks.html | 2 +-
public/reference/tobalc_icd10_lookups.html | 2 +-
public/reference/tobalcepi-package.html | 177 ++++++++++++++++++
public/sitemap.xml | 3 +
67 files changed, 400 insertions(+), 147 deletions(-)
create mode 100644 R/tobalcepi-package.R
create mode 100644 man/tobalcepi-package.Rd
create mode 100644 public/reference/tobalcepi-package.html
diff --git a/DESCRIPTION b/DESCRIPTION
index b5be16b..b4fc643 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.3.0
+Version: 1.3.1
Authors@R:
c(
person(given = "Duncan",
diff --git a/NAMESPACE b/NAMESPACE
index 8e2a3fb..000baeb 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -1,10 +1,18 @@
# Generated by roxygen2: do not edit by hand
-export("\\lifecycle{experimental}")
-export("\\lifecycle{maturing}")
-export("\\lifecycle{stable}")
+export(AlcBinge)
+export(AlcBinge_stapm)
+export(AlcLags)
+export(ExpandCodes)
+export(PArisk)
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,":=")
@@ -12,3 +20,4 @@ importFrom(data.table,copy)
importFrom(data.table,rbindlist)
importFrom(data.table,setDT)
importFrom(data.table,setnames)
+importFrom(lifecycle,deprecate_soft)
diff --git a/R/AlcBinge.R b/R/AlcBinge.R
index e415174..4647909 100644
--- a/R/AlcBinge.R
+++ b/R/AlcBinge.R
@@ -1,5 +1,7 @@
#' Calculate variables to inform alcohol binge model
+#'
+#' \lifecycle{superseded}
#'
#' Designed to work with cross-sectional survey data with a wide range of individual-level covariates.
#' Uses survey data and previously estimated coefficients to describe
@@ -19,7 +21,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{stable}
#'
#' @examples
#'
diff --git a/R/AlcBinge_stapm.R b/R/AlcBinge_stapm.R
index 80f4fc8..db5fa1d 100644
--- a/R/AlcBinge_stapm.R
+++ b/R/AlcBinge_stapm.R
@@ -1,5 +1,7 @@
#' Calculate variables to inform alcohol binge model - STAPM version
+#'
+#' \lifecycle{maturing}
#'
#' Designed to work with simulated individual trajectories of alcohol consumption - stratified by
#' age category, sex and IMD quintile. Assigns coefficients stratified by age category, sex and IMD quintile to
@@ -28,7 +30,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{maturing}
#'
#' @examples
#'
diff --git a/R/AlcLags.R b/R/AlcLags.R
index 93eb0f7..aabb795 100644
--- a/R/AlcLags.R
+++ b/R/AlcLags.R
@@ -1,6 +1,8 @@
#' Alcohol lag times
#'
+#' \lifecycle{stable}
+#'
#' Prepare the disease specific functions that describe how a change in alcohol consumption
#' gradually has an effect on the relative risk of disease incidence over time (up to 20 years)
#' since alcohol consumption changed.
@@ -18,7 +20,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{stable}
#'
#' @examples
#' \dontrun{
diff --git a/R/ExpandCodes.R b/R/ExpandCodes.R
index 30b470e..b3ba653 100644
--- a/R/ExpandCodes.R
+++ b/R/ExpandCodes.R
@@ -1,6 +1,8 @@
#' Convert groups of ICD-10 codes to single codes
+#'
+#' \lifecycle{stable}
#'
#' Creates the lookup files for search for single ICD-10 codes related to tobacco and/or alcohol.
#'
@@ -14,7 +16,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{stable}
#'
#' @examples
#'
diff --git a/R/PArisk.R b/R/PArisk.R
index 68155d3..2c7a329 100644
--- a/R/PArisk.R
+++ b/R/PArisk.R
@@ -1,6 +1,8 @@
#' Relative risks for alcohol-related injuries
+#'
+#' \lifecycle{stable}
#'
#' Uses the 'new' binge model methods to calculate a relative risk
#' for each individual for experiencing each cause during one year.
@@ -37,7 +39,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{stable}
#'
#' @examples
#'
diff --git a/R/RRAlc.R b/R/RRAlc.R
index cc8be51..acab300 100644
--- a/R/RRAlc.R
+++ b/R/RRAlc.R
@@ -1,6 +1,8 @@
#' Relative risks for alcohol related diseases
+#'
+#' \lifecycle{stable}
#'
#' Computes the relative risks for each alcohol related disease based on the published risk curves.
#'
@@ -38,7 +40,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{stable}
#'
#' @examples
#'
diff --git a/R/RRFunc.R b/R/RRFunc.R
index 32bab12..99c81e8 100644
--- a/R/RRFunc.R
+++ b/R/RRFunc.R
@@ -1,5 +1,7 @@
#' Individual relative risks of disease
+#'
+#' \lifecycle{maturing}
#'
#' @description
#' This function takes a sample of individuals and computes each individual's relative risk
@@ -111,7 +113,6 @@
#' @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 4d8d061..b0fc23e 100644
--- a/R/RRTobDR.R
+++ b/R/RRTobDR.R
@@ -1,4 +1,6 @@
#' Dose-response relative risks for tobacco-related cancers
+#'
+#' \lifecycle{experimental}
#'
#' Computes the relative risks for each tobacco-related cancer based on the published risk curves.
#'
@@ -17,7 +19,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{experimental}
#'
#'
#' @examples
diff --git a/R/RRtob.R b/R/RRtob.R
index fffa65f..798c340 100644
--- a/R/RRtob.R
+++ b/R/RRtob.R
@@ -1,5 +1,7 @@
#' Tobacco relative risks
+#'
+#' \lifecycle{maturing}
#'
#' Relative risks for current vs. never cigarette smokers.
#'
@@ -38,7 +40,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{maturing}
#'
#' @examples
#'\dontrun{
diff --git a/R/TobAlcInt.R b/R/TobAlcInt.R
index 9a8ac5d..0ba33d0 100644
--- a/R/TobAlcInt.R
+++ b/R/TobAlcInt.R
@@ -1,6 +1,8 @@
#' Risk interaction between tobacco and alcohol
+#'
+#' \lifecycle{maturing}
#'
#' Assigns the disease-specific interaction term (synergy index) appropriate to each
#' individual's tobacco and alcohol consumption.
@@ -33,7 +35,6 @@
#'
#' \insertRef{Prabhu2014}{tobalcepi}
#'
-#' \lifecycle{maturing}
#'
#' @examples
#'
diff --git a/R/TobLags.R b/R/TobLags.R
index df837d7..9d61e63 100644
--- a/R/TobLags.R
+++ b/R/TobLags.R
@@ -1,5 +1,7 @@
#' Tobacco lag times
+#'
+#' \lifecycle{stable}
#'
#' Prepare the disease specific functions that describe how a change in tobacco consumption
#' gradually has an effect on the relative risk of disease incidence over time (up to 40 years)
@@ -38,7 +40,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{stable}
#'
#' @examples
#'
diff --git a/R/WArisk_acute.R b/R/WArisk_acute.R
index a5bb4ec..d4ca467 100644
--- a/R/WArisk_acute.R
+++ b/R/WArisk_acute.R
@@ -1,5 +1,7 @@
#' Risk of acute conditions wholly-attributable to alcohol
+#'
+#' \lifecycle{stable}
#'
#' Uses the 'new' binge model methods to calculate the risk
#' that each individual experiences each acute consequence of drinking during one year
@@ -42,7 +44,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{stable}
#'
#' @examples
#'
diff --git a/R/subgroupRisk.R b/R/subgroupRisk.R
index ea36794..9305a97 100644
--- a/R/subgroupRisk.R
+++ b/R/subgroupRisk.R
@@ -1,5 +1,7 @@
#' Summarise relative risk
+#'
+#' \lifecycle{stable}
#'
#' Calculate the sum of the relative risk for all individuals in a subgroup,
#' or calculate the subgroup specific attributable fraction based on the current relative risks.
@@ -22,7 +24,6 @@
#' @importFrom data.table := setDT setnames
#' @export
#'
-#' \lifecycle{stable}
#'
#' @examples
#' \dontrun{
diff --git a/R/tobalcepi-package.R b/R/tobalcepi-package.R
new file mode 100644
index 0000000..b8d4168
--- /dev/null
+++ b/R/tobalcepi-package.R
@@ -0,0 +1,9 @@
+#' @keywords internal
+"_PACKAGE"
+
+# The following block is used by usethis to automatically manage
+# roxygen namespace tags. Modify with care!
+## usethis namespace: start
+#' @importFrom lifecycle deprecate_soft
+## usethis namespace: end
+NULL
diff --git a/man/AlcBinge.Rd b/man/AlcBinge.Rd
index 874cf11..548923b 100644
--- a/man/AlcBinge.Rd
+++ b/man/AlcBinge.Rd
@@ -16,11 +16,13 @@ from Hill-McManus et al 2014, Tables 3, 5 and 6.}
Returns data plus the estimated variables.
}
\description{
+\lifecycle{superseded}
+}
+\details{
Designed to work with cross-sectional survey data with a wide range of individual-level covariates.
Uses survey data and previously estimated coefficients to describe
the patterns of single occasion drinking.
-}
-\details{
+
This is based on a study by Hill-McManus 2014,
who analysed drinking occasions using data from detailed diaries in the National Diet and Nutrition Survey 2000/2001.
Using the results, it possible to model each individual's expected number of drinking occasions across the year,
diff --git a/man/AlcBinge_stapm.Rd b/man/AlcBinge_stapm.Rd
index 4874129..6744b87 100644
--- a/man/AlcBinge_stapm.Rd
+++ b/man/AlcBinge_stapm.Rd
@@ -18,12 +18,14 @@ averaged by age category, sex and IMD quintile.}
Returns data plus the estimated variables.
}
\description{
+\lifecycle{maturing}
+}
+\details{
Designed to work with simulated individual trajectories of alcohol consumption - stratified by
age category, sex and IMD quintile. Assigns coefficients stratified by age category, sex and IMD quintile to
the simulated sample of individuals to estimate their characteristics of single occassion drinking
-at each time step in the simulation.
-}
-\details{
+at each time step in the simulation.
+
The coefficients used come originally from a study by Hill-McManus 2014,
who analysed drinking occasions using data from detailed diaries in the National Diet and Nutrition Survey 2000/2001.
Using the results, it possible to model each individual's expected number of drinking occasions across the year,
diff --git a/man/AlcLags.Rd b/man/AlcLags.Rd
index 614a1e7..f9f7f3e 100644
--- a/man/AlcLags.Rd
+++ b/man/AlcLags.Rd
@@ -18,11 +18,13 @@ that gives the proportion by which the effect of a change in consumption
on an individual's relative risk of disease has so far emerged.
}
\description{
+\lifecycle{stable}
+}
+\details{
Prepare the disease specific functions that describe how a change in alcohol consumption
gradually has an effect on the relative risk of disease incidence over time (up to 20 years)
since alcohol consumption changed.
-}
-\details{
+
All lag times are taken from the review by Holmes et al. 2012,
and are the numbers used in the current version of SAPM.
}
diff --git a/man/ExpandCodes.Rd b/man/ExpandCodes.Rd
index 919f53f..0c7eef4 100644
--- a/man/ExpandCodes.Rd
+++ b/man/ExpandCodes.Rd
@@ -13,9 +13,11 @@ ExpandCodes(lkup)
Returns a data frame containing a row for each single ICD-10 code to be searched for.
}
\description{
-Creates the lookup files for search for single ICD-10 codes related to tobacco and/or alcohol.
+\lifecycle{stable}
}
\details{
+Creates the lookup files for search for single ICD-10 codes related to tobacco and/or alcohol.
+
For example, if one disease category is C00-C06 (oral cancer), this includes the single codes
C00,C01,C02,C03,C04,C05,C06. The number of rows will be expanded to give each single code
its own row.
diff --git a/man/PArisk.Rd b/man/PArisk.Rd
index 0c64203..1d41942 100644
--- a/man/PArisk.Rd
+++ b/man/PArisk.Rd
@@ -53,10 +53,12 @@ the number of grams of ethanol in one standard drink.}
Returns a numeric vector of each individual's relative risk of the acute consequences of drinking.
}
\description{
-Uses the 'new' binge model methods to calculate a relative risk
-for each individual for experiencing each cause during one year.
+\lifecycle{stable}
}
\details{
+Uses the 'new' binge model methods to calculate a relative risk
+for each individual for experiencing each cause during one year.
+
This calculation treats an ocassion as a single point in time and therefore does not detail
about the rate of alcohol absorbtion (i.e. there is no alcohol absorbtion rate constant)
or the time interval between drinks within an occassion. This could introduce inaccuracies if
diff --git a/man/RRFunc.Rd b/man/RRFunc.Rd
index 9924160..b5b717b 100644
--- a/man/RRFunc.Rd
+++ b/man/RRFunc.Rd
@@ -97,6 +97,8 @@ There is an option to tailor this
to the alcohol only, tobacco only, or joint tobacco and alcohol contexts.
}
\details{
+\lifecycle{maturing}
+
See below
}
\section{Alcohol risk}{
@@ -284,6 +286,4 @@ 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/RRTobDR.Rd b/man/RRTobDR.Rd
index b89f45d..ef8724d 100644
--- a/man/RRTobDR.Rd
+++ b/man/RRTobDR.Rd
@@ -18,9 +18,11 @@ average number of daily cigarettes.}
Returns a numeric vector of each individual's relative risks for the tobacco related disease specified by "disease".
}
\description{
-Computes the relative risks for each tobacco-related cancer based on the published risk curves.
+\lifecycle{experimental}
}
\details{
+Computes the relative risks for each tobacco-related cancer based on the published risk curves.
+
Relative risks for come from published risk functions whose parameters have been
hard-coded within this function rather than being read from an external spreadsheet.
These relative risks are based on an individual's current smoking intensity. There are
diff --git a/man/RRalc.Rd b/man/RRalc.Rd
index 7b66cea..369b775 100644
--- a/man/RRalc.Rd
+++ b/man/RRalc.Rd
@@ -56,9 +56,11 @@ ethanol in one UK standard unit of alcohol.}
Returns a numeric vector of each individual's relative risks for the alcohol related disease specified by "disease".
}
\description{
-Computes the relative risks for each alcohol related disease based on the published risk curves.
+\lifecycle{stable}
}
\details{
+Computes the relative risks for each alcohol related disease based on the published risk curves.
+
Relative risks for partially attributable chronic come from published risk functions whose parameters have been
hard-coded within this function rather than being read from an external spreadsheet. For some conditions there are
separate risk functions for morbidity and mortality. For conditions that show a J-shaped risk function that
diff --git a/man/RRtob.Rd b/man/RRtob.Rd
index 057eab2..48321b4 100644
--- a/man/RRtob.Rd
+++ b/man/RRtob.Rd
@@ -33,9 +33,11 @@ Returns a numeric vector of each individual's relative risks for the tobacco-rel
specified by "disease".
}
\description{
-Relative risks for current vs. never cigarette smokers.
+\lifecycle{maturing}
}
\details{
+Relative risks for current vs. never cigarette smokers.
+
We focus on the risks of current smoking and limit ourselves to diseases that affect the consumer themselves e.g.
excluding secondary effects of smoking on children.
We assume the equivalence of relative risks and odds ratios.
diff --git a/man/TobAlcInt.Rd b/man/TobAlcInt.Rd
index fd92492..8fdf67a 100644
--- a/man/TobAlcInt.Rd
+++ b/man/TobAlcInt.Rd
@@ -31,10 +31,12 @@ Returns a numeric vector containing of each individual's relative risks for the
specified by "disease".
}
\description{
-Assigns the disease-specific interaction term (synergy index) appropriate to each
-individual's tobacco and alcohol consumption.
+\lifecycle{maturing}
}
\details{
+Assigns the disease-specific interaction term (synergy index) appropriate to each
+individual's tobacco and alcohol consumption.
+
We currently include estimates of synergistic effects for
oral, pharyngeal, laryngeal and oesophageal cancers
(we describe these data and their sources in our tobacco risk functions report
@@ -60,7 +62,5 @@ TobAlcInt()
\insertRef{Hashibe2009}{tobalcepi}
-\insertRef{Prabhu2014}{tobalcepi}
-
-\lifecycle{maturing}
+\insertRef{Prabhu2014}{tobalcepi}
}
diff --git a/man/TobLags.Rd b/man/TobLags.Rd
index 09c80a8..037c0a1 100644
--- a/man/TobLags.Rd
+++ b/man/TobLags.Rd
@@ -25,11 +25,13 @@ that gives the proportion by which the effect of a change in consumption
on an individual's relative risk of disease has so far emerged.
}
\description{
+\lifecycle{stable}
+}
+\details{
Prepare the disease specific functions that describe how a change in tobacco consumption
gradually has an effect on the relative risk of disease incidence over time (up to 40 years)
since e.g. someone quit smoking
-}
-\details{
+
All lag times are taken from a re-analysis of the Cancer prevention II study by Oza et al 2011 and Kontis et al 2014
The values were sent to us by Kontis. Lags are smoothed functions over time describing the proportion of
the excess risk due to smoking that still remains.
diff --git a/man/WArisk_acute.Rd b/man/WArisk_acute.Rd
index 2f7f6a2..90f0160 100644
--- a/man/WArisk_acute.Rd
+++ b/man/WArisk_acute.Rd
@@ -37,11 +37,13 @@ Defaults to 3 units/day for females and 4 units/day for males.}
Returns a numeric vector of each individual's relative risk of the acute consequences of drinking.
}
\description{
-Uses the 'new' binge model methods to calculate the risk
-that each individual experiences each acute consequence of drinking during one year
-(e.g. alcohol poisoning or the effects of acute intoxication).
+\lifecycle{stable}
}
\details{
+Uses the 'new' binge model methods to calculate the risk
+that each individual experiences each acute consequence of drinking during one year
+(e.g. alcohol poisoning or the effects of acute intoxication).
+
The function implements a new method for estimating risk that was developed to suit the STAPM modelling.
The calculation is based on the link between average weekly alcohol consumption and
the distribution of characteristics of single ocassion drinking described by the
diff --git a/man/subgroupRisk.Rd b/man/subgroupRisk.Rd
index e273941..5c66a54 100644
--- a/man/subgroupRisk.Rd
+++ b/man/subgroupRisk.Rd
@@ -38,10 +38,12 @@ Weight variable must be called "wt_int".}
Returns a data table containing the subgroup specific summaries for each disease.
}
\description{
-Calculate the sum of the relative risk for all individuals in a subgroup,
-or calculate the subgroup specific attributable fraction based on the current relative risks.
+\lifecycle{stable}
}
\details{
+Calculate the sum of the relative risk for all individuals in a subgroup,
+or calculate the subgroup specific attributable fraction based on the current relative risks.
+
Attributable fractions are calculated using the method as in Bellis & Jones 2014, which is also equivalent to the
method described in the Brennan et al. 2015 SAPM mathematical description paper.
}
diff --git a/man/tobalcepi-package.Rd b/man/tobalcepi-package.Rd
new file mode 100644
index 0000000..10f3982
--- /dev/null
+++ b/man/tobalcepi-package.Rd
@@ -0,0 +1,23 @@
+% Generated by roxygen2: do not edit by hand
+% Please edit documentation in R/tobalcepi-package.R
+\docType{package}
+\name{tobalcepi-package}
+\alias{tobalcepi}
+\alias{tobalcepi-package}
+\title{tobalcepi: Risk Functions and Attributable Fractions for Tobacco and Alcohol}
+\description{
+Functions to assign relative risks of disease to individuals based on their tobacco and/or alcohol consumption, and to estimate the attributable fractions of disease.
+}
+\author{
+\strong{Maintainer}: Duncan Gillespie \email{duncan.gillespie@sheffield.ac.uk} (\href{https://orcid.org/0000-0003-3450-5747}{ORCID})
+
+Authors:
+\itemize{
+ \item Laura Webster
+ \item Maddy Henney
+ \item Colin Angus \email{c.r.angus@sheffield.ac.uk}
+ \item Alan Brennan \email{a.brennan@sheffield.ac.uk}
+}
+
+}
+\keyword{internal}
diff --git a/public/404.html b/public/404.html
index 9d82e00..25043ad 100644
--- a/public/404.html
+++ b/public/404.html
@@ -71,7 +71,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/LICENSE.html b/public/LICENSE.html
index c864ce7..7ca2b73 100644
--- a/public/LICENSE.html
+++ b/public/LICENSE.html
@@ -71,7 +71,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/articles/alc_partially_attrib_acute.html b/public/articles/alc_partially_attrib_acute.html
index 1914876..998dbfd 100644
--- a/public/articles/alc_partially_attrib_acute.html
+++ b/public/articles/alc_partially_attrib_acute.html
@@ -31,7 +31,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/articles/alc_wholly_attrib_acute.html b/public/articles/alc_wholly_attrib_acute.html
index da28f9c..a954534 100644
--- a/public/articles/alc_wholly_attrib_acute.html
+++ b/public/articles/alc_wholly_attrib_acute.html
@@ -31,7 +31,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/articles/alc_wholly_attrib_chronic.html b/public/articles/alc_wholly_attrib_chronic.html
index 0866873..55f9fc6 100644
--- a/public/articles/alc_wholly_attrib_chronic.html
+++ b/public/articles/alc_wholly_attrib_chronic.html
@@ -31,7 +31,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/articles/index.html b/public/articles/index.html
index 5244d17..fcc6a92 100644
--- a/public/articles/index.html
+++ b/public/articles/index.html
@@ -71,7 +71,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/articles/smoking-disease-risks.html b/public/articles/smoking-disease-risks.html
index 04bdf58..79f7f93 100644
--- a/public/articles/smoking-disease-risks.html
+++ b/public/articles/smoking-disease-risks.html
@@ -31,7 +31,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/authors.html b/public/authors.html
index c782f25..024c438 100644
--- a/public/authors.html
+++ b/public/authors.html
@@ -71,7 +71,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/index.html b/public/index.html
index e97900b..7db9e5c 100644
--- a/public/index.html
+++ b/public/index.html
@@ -31,7 +31,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
diff --git a/public/pkgdown.yml b/public/pkgdown.yml
index 858add2..423bd79 100644
--- a/public/pkgdown.yml
+++ b/public/pkgdown.yml
@@ -6,7 +6,7 @@ articles:
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-28T16:23Z
+last_built: 2020-11-28T17:05Z
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 3a7c522..80074f3 100644
--- a/public/reference/AlcBinge.html
+++ b/public/reference/AlcBinge.html
@@ -40,9 +40,7 @@
-
+
@@ -74,7 +72,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
@@ -132,9 +130,7 @@
Calculate variables to inform alcohol binge model
-
Designed to work with cross-sectional survey data with a wide range of individual-level covariates.
-Uses survey data and previously estimated coefficients to describe
-the patterns of single occasion drinking.
Designed to work with cross-sectional survey data with a wide range of individual-level covariates.
+Uses survey data and previously estimated coefficients to describe
+the patterns of single occasion drinking.
+
This is based on a study by Hill-McManus 2014,
who analysed drinking occasions using data from detailed diaries in the National Diet and Nutrition Survey 2000/2001.
Using the results, it possible to model each individual's expected number of drinking occasions across the year,
the average amount they drunk on an occasion, the variability in the amount drunk among occasions,
diff --git a/public/reference/AlcBinge_stapm.html b/public/reference/AlcBinge_stapm.html
index 9556a41..22c80e4 100644
--- a/public/reference/AlcBinge_stapm.html
+++ b/public/reference/AlcBinge_stapm.html
@@ -40,10 +40,7 @@
-
+
@@ -75,7 +72,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
@@ -133,10 +130,7 @@
Calculate variables to inform alcohol binge model - STAPM version
-
Designed to work with simulated individual trajectories of alcohol consumption - stratified by
-age category, sex and IMD quintile. Assigns coefficients stratified by age category, sex and IMD quintile to
-the simulated sample of individuals to estimate their characteristics of single occassion drinking
-at each time step in the simulation.
The coefficients used come originally from a study by Hill-McManus 2014,
+
Designed to work with simulated individual trajectories of alcohol consumption - stratified by
+age category, sex and IMD quintile. Assigns coefficients stratified by age category, sex and IMD quintile to
+the simulated sample of individuals to estimate their characteristics of single occassion drinking
+at each time step in the simulation.
+
The coefficients used come originally from a study by Hill-McManus 2014,
who analysed drinking occasions using data from detailed diaries in the National Diet and Nutrition Survey 2000/2001.
Using the results, it possible to model each individual's expected number of drinking occasions across the year,
the average amount they drunk on an occasion, the variability in the amount drunk among occasions,
diff --git a/public/reference/AlcLags.html b/public/reference/AlcLags.html
index 2f74ca6..d8a4e5f 100644
--- a/public/reference/AlcLags.html
+++ b/public/reference/AlcLags.html
@@ -40,9 +40,7 @@
-
+
@@ -74,7 +72,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
@@ -132,9 +130,7 @@
Alcohol lag times
-
Prepare the disease specific functions that describe how a change in alcohol consumption
-gradually has an effect on the relative risk of disease incidence over time (up to 20 years)
-since alcohol consumption changed.
on an individual's relative risk of disease has so far emerged.
Details
-
All lag times are taken from the review by Holmes et al. 2012,
+
Prepare the disease specific functions that describe how a change in alcohol consumption
+gradually has an effect on the relative risk of disease incidence over time (up to 20 years)
+since alcohol consumption changed.
+
All lag times are taken from the review by Holmes et al. 2012,
and are the numbers used in the current version of SAPM.
Creates the lookup files for search for single ICD-10 codes related to tobacco and/or alcohol.
+
ExpandCodes(lkup)
@@ -149,7 +149,8 @@
Value
Returns a data frame containing a row for each single ICD-10 code to be searched for.
Details
-
For example, if one disease category is C00-C06 (oral cancer), this includes the single codes
+
Creates the lookup files for search for single ICD-10 codes related to tobacco and/or alcohol.
+
For example, if one disease category is C00-C06 (oral cancer), this includes the single codes
C00,C01,C02,C03,C04,C05,C06. The number of rows will be expanded to give each single code
its own row.
Uses the 'new' binge model methods to calculate a relative risk
-for each individual for experiencing each cause during one year.
+
PArisk(
@@ -211,7 +209,9 @@
Value
Returns a numeric vector of each individual's relative risk of the acute consequences of drinking.
Details
-
This calculation treats an ocassion as a single point in time and therefore does not detail
+
Uses the 'new' binge model methods to calculate a relative risk
+for each individual for experiencing each cause during one year.
+
This calculation treats an ocassion as a single point in time and therefore does not detail
about the rate of alcohol absorbtion (i.e. there is no alcohol absorbtion rate constant)
or the time interval between drinks within an occassion. This could introduce inaccuracies if
e.g. a drinking occassion lasted several hours. The methods to calculate the total time spent intoxicated
diff --git a/public/reference/RRFunc.html b/public/reference/RRFunc.html
index e9bed86..5703c50 100644
--- a/public/reference/RRFunc.html
+++ b/public/reference/RRFunc.html
@@ -75,7 +75,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
@@ -263,7 +263,8 @@
Value
Details
-
See below
+
+
See below
Alcohol risk
@@ -336,8 +337,7 @@
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.
Returns a numeric vector of each individual's relative risks for the tobacco related disease specified by "disease".
Details
-
Relative risks for come from published risk functions whose parameters have been
+
Computes the relative risks for each tobacco-related cancer based on the published risk curves.
+
Relative risks for come from published risk functions whose parameters have been
hard-coded within this function rather than being read from an external spreadsheet.
These relative risks are based on an individual's current smoking intensity. There are
others measures of smoking exposure including smoking duration and pack-years, which
diff --git a/public/reference/RRalc.html b/public/reference/RRalc.html
index 6631019..a9804ca 100644
--- a/public/reference/RRalc.html
+++ b/public/reference/RRalc.html
@@ -40,7 +40,7 @@
-
+
@@ -72,7 +72,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
@@ -130,7 +130,7 @@
Relative risks for alcohol related diseases
-
Computes the relative risks for each alcohol related disease based on the published risk curves.
+
RRalc(
@@ -212,7 +212,8 @@
Value
Returns a numeric vector of each individual's relative risks for the alcohol related disease specified by "disease".
Details
-
Relative risks for partially attributable chronic come from published risk functions whose parameters have been
+
Computes the relative risks for each alcohol related disease based on the published risk curves.
+
Relative risks for partially attributable chronic come from published risk functions whose parameters have been
hard-coded within this function rather than being read from an external spreadsheet. For some conditions there are
separate risk functions for morbidity and mortality. For conditions that show a J-shaped risk function that
indicates protective effects of alcohol, there is an option to remove the protective effect by setting all
diff --git a/public/reference/RRtob.html b/public/reference/RRtob.html
index bb930bf..40ec91c 100644
--- a/public/reference/RRtob.html
+++ b/public/reference/RRtob.html
@@ -40,7 +40,7 @@
-
+
@@ -72,7 +72,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
@@ -130,7 +130,7 @@
Tobacco relative risks
-
Relative risks for current vs. never cigarette smokers.
+
RRtob(
@@ -179,7 +179,8 @@
Value
specified by "disease".
Details
-
We focus on the risks of current smoking and limit ourselves to diseases that affect the consumer themselves e.g.
+
Relative risks for current vs. never cigarette smokers.
+
We focus on the risks of current smoking and limit ourselves to diseases that affect the consumer themselves e.g.
excluding secondary effects of smoking on children.
We assume the equivalence of relative risks and odds ratios.
Our starting point was the Royal College of Physician's (RCP) report "Hiding in plain sight:
diff --git a/public/reference/TobAlcInt.html b/public/reference/TobAlcInt.html
index 9b61380..138df76 100644
--- a/public/reference/TobAlcInt.html
+++ b/public/reference/TobAlcInt.html
@@ -40,8 +40,7 @@
-
+
@@ -73,7 +72,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
@@ -131,8 +130,7 @@
Risk interaction between tobacco and alcohol
-
Assigns the disease-specific interaction term (synergy index) appropriate to each
-individual's tobacco and alcohol consumption.
+
TobAlcInt(
@@ -179,7 +177,9 @@
Value
specified by "disease".
Details
-
We currently include estimates of synergistic effects for
+
Assigns the disease-specific interaction term (synergy index) appropriate to each
+individual's tobacco and alcohol consumption.
+
We currently include estimates of synergistic effects for
oral, pharyngeal, laryngeal and oesophageal cancers
(we describe these data and their sources in our tobacco risk functions report
Webster et al. (2018)
@@ -207,7 +207,6 @@
Prepare the disease specific functions that describe how a change in tobacco consumption
-gradually has an effect on the relative risk of disease incidence over time (up to 40 years)
-since e.g. someone quit smoking
+
TobLags(
@@ -169,7 +165,10 @@
Value
on an individual's relative risk of disease has so far emerged.
Details
-
All lag times are taken from a re-analysis of the Cancer prevention II study by Oza et al 2011 and Kontis et al 2014
+
Prepare the disease specific functions that describe how a change in tobacco consumption
+gradually has an effect on the relative risk of disease incidence over time (up to 40 years)
+since e.g. someone quit smoking
+
All lag times are taken from a re-analysis of the Cancer prevention II study by Oza et al 2011 and Kontis et al 2014
The values were sent to us by Kontis. Lags are smoothed functions over time describing the proportion of
the excess risk due to smoking that still remains.
Kontis et al. re-analysed the change in risk after smoking in the ACS-CPS II study from Oza et al.,
diff --git a/public/reference/WArisk_acute.html b/public/reference/WArisk_acute.html
index 6d926c9..84a127d 100644
--- a/public/reference/WArisk_acute.html
+++ b/public/reference/WArisk_acute.html
@@ -40,9 +40,7 @@
-
+
@@ -74,7 +72,7 @@
tobalcepi
- 1.3.0
+ 1.3.1
@@ -132,9 +130,7 @@
Risk of acute conditions wholly-attributable to alcohol
-
Uses the 'new' binge model methods to calculate the risk
-that each individual experiences each acute consequence of drinking during one year
-(e.g. alcohol poisoning or the effects of acute intoxication).
+
WArisk_acute(
@@ -187,7 +183,10 @@
Value
Returns a numeric vector of each individual's relative risk of the acute consequences of drinking.
Details
-
The function implements a new method for estimating risk that was developed to suit the STAPM modelling.
+
Uses the 'new' binge model methods to calculate the risk
+that each individual experiences each acute consequence of drinking during one year
+(e.g. alcohol poisoning or the effects of acute intoxication).
+
The function implements a new method for estimating risk that was developed to suit the STAPM modelling.
The calculation is based on the link between average weekly alcohol consumption and
the distribution of characteristics of single ocassion drinking described by the
parameter estimates of Hill-McManus et al 2014.
Calculate the sum of the relative risk for all individuals in a subgroup,
-or calculate the subgroup specific attributable fraction based on the current relative risks.
+
subgroupRisk(
@@ -190,7 +188,9 @@
Value
Returns a data table containing the subgroup specific summaries for each disease.
Details
-
Attributable fractions are calculated using the method as in Bellis & Jones 2014, which is also equivalent to the
+
Calculate the sum of the relative risk for all individuals in a subgroup,
+or calculate the subgroup specific attributable fraction based on the current relative risks.
+
Attributable fractions are calculated using the method as in Bellis & Jones 2014, which is also equivalent to the
method described in the Brennan et al. 2015 SAPM mathematical description paper.
tobalcepi: Risk Functions and Attributable Fractions for Tobacco and Alcohol
+
+
tobalcepi-package.Rd
+
+
+
+
Functions to assign relative risks of disease to individuals based on their tobacco and/or alcohol consumption, and to estimate the attributable fractions of disease.