econcalc was created as part of a programme of work on the health
economics of tobacco and alcohol at the School of Health and Related
Research (ScHARR), The University of Sheffield. This programme is based
around the construction of the Sheffield Tobacco and Alcohol Policy
Model (STAPM), which aims to use comparable methodologies to evaluate
the impacts of tobacco and alcohol policies, and investigate the
consequences of clustering and interactions between tobacco and alcohol
consumption behaviours.
The motivation for econcalc was to provide functions to process the
raw outputs of the price-policy simulation into clean economic outcomes.
Economic outcomes included are mean prices, consumer spending, retail
revenues, and tax revenues. Outcomes can be disaggregated into
population subgroup by age group, sex, index of multiple deprivation
(IMD) quintile, drinker category, and smoker category. Other outcomes
include summaries of the price and net retail revenue distributions,
also stratified by subgroup.
econcalc is a package for post-processing of the results of modelling
the effects of price policies on tobacco and alcohol spending and
consumption, with a focus on the economic outcomes.
The inputs are the raw output files from the simulation
The processes applied by the functions in pricepol give options
to:
- Calculate the distribution of prices paid for tobacco and alcohol products, for people in different socio-demographic groups.
- Calculate the distribution of net revenue to retailers from tobacco and alcohol products, for people in different socio-demographic groups.
- Summarise total tax revenues, retail revenues, and consumer spending as well as mean prices paid by consumers.
The output of these processes is a summary of the economic outcomes.
econcalc is currently available only to members of the project team
(but please contact Duncan Gillespie duncan.gillespie@sheffield.ac.uk
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 of
econcalc from GitLab with:
#install.packages("devtools")
#install.packages("getPass")
devtools::install_git(
"https://gitlab.com/stapm/r-packages/econcalc.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 - change to the version you want e.g. "1.2.3"
# this should make a box pop up where you enter your GitLab passwordThen load the package, and some other packages that are useful. Note
that the code within pricepol uses the data.table::data.table()
syntax.
# Load the package
library(econcalc)
# Other useful packages
library(ggplot2) # for plottingPlease cite the latest version of the package using: