Skip to content

Commit

Permalink
review PAF calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
dosgillespie committed Oct 26, 2023
1 parent 6987959 commit 987b7cc
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 5 deletions.
8 changes: 6 additions & 2 deletions R/PAFcalc.R
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@
#' that are not categorised as CVD, COPD, or Cancer. Options: c("Cancers", "CVD", "COPD", "immediate").
#' The default is "Cancers", which gives the most conservative (i.e. slowest) estimate of the rate of decline in
#' the risk of disease after quitting smoking.
#' @param oesoph_subtypes Logical - should the attributable fractions for oesophageal cancer
#' be multiplied by the proportions of each subtype. Defaults to FALSE.
#'
#' @return Returns a data.table containing the estimated PAFs.
#'
Expand Down Expand Up @@ -72,7 +74,8 @@ PAFcalc <- function(
within_model = FALSE,
mort_or_morb = c("mort", "morb")[1],
country = c("England", "Scotland")[1],
other_lag_function = "Cancers"
other_lag_function = "Cancers",
oesoph_subtypes = FALSE
) {


Expand Down Expand Up @@ -163,7 +166,8 @@ PAFcalc <- function(
disease_names = disease_names,
use_weights = use_weights,
pool = pool,
subgroups = subgroups)
subgroups = subgroups,
oesoph_subtypes = oesoph_subtypes)


return(paf_data)
Expand Down
2 changes: 1 addition & 1 deletion R/subgroupRisk.R
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
#' @param smooth Logical - should the age patterns in average risk be smoothed with a moving average.
#' For use only if average risk is stratified by single years of age. Defaults to FALSE
#' @param oesoph_subtypes Logical - should the attributable fractions for oesophageal cancer
#' be multiplied by the proportions of each subtype. In development. Defaults to FALSE.
#' be multiplied by the proportions of each subtype. Defaults to FALSE.
#'
#' @return Returns a data table containing the subgroup specific summaries for each disease.
#'
Expand Down
6 changes: 5 additions & 1 deletion man/PAFcalc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/subgroupRisk.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 987b7cc

Please sign in to comment.