# load package - prime
library(prime)

PRIME

PRIME stands for Papillomavirus Rapid Interface for Modelling and Economics. The R package (prime) is based of the spreadsheet-based tool (see http://primetool.org).

PRIME provides users with an idea of:

Functions

The main PRIME functions are:

Other functions include:

R code for the functions are in the R-folder of the package, i.e. ./R/

Documentation of a function can be viewed, by running ?functionname in the console, i.e. ?RunCohort

# View documentation of RunCohort function
?RunCohort

The source code of a function can be viewed by running the functionname without any brackets in the console.

# View source code of RunCohort function
RunCohort

Data

Several data sets are included in the package. The data files (.rda files) are stored as data tables (data.table) in the data folder of the package, i.e. ./data/

Documentation of a data set can be viewed, by running ?dataset-name in the console, i.e. ?data.incidence

# View documentation of data.incidence data set
?data.incidence

A data set can be viewed by typing the data file name in the console.

# View data set for age-specific incidence of cervical cancer in different countries (estimated by Globocan)
data.incidence

Examples

Use RunCountry to run PRIME for a single birthcohort in a single country.

RunCountry ("RWA")
result <- RunCountry ("RWA")
result [,c("vaccinated", "immunized", "inc.cecx", "mort.cecx", "lifey","disability", "cost.cecx")] <- result[, cohort_size] * result[,c("vaccinated", "immunized", "inc.cecx", "mort.cecx", "lifey", "disability", "cost.cecx")]
result [age>15]

If you don't know the exact ISO3 code for a country, you can try to look it up using the getISO3 function.

getISO3 ("Malawi")

If you want to analyse the costs/benefits of vaccinating this specific cohort, set analyseCosts to TRUE.

# To be updated
# RunCountry ("MWI", analyseCosts=TRUE)

RunCountry automatically assumes 100% coverage, 100% vaccine-efficacy, and age of vaccination at 12.

# To be updated
# RunCountry("MWI", analyseCosts=TRUE, discounting=TRUE, agevac=10, agecohort=10, vaceff_beforesexdebut=0.98, vaceff_aftersexdebut=0, cov=0.75, year_vac=2020)
# To be updated
# analyseCosts (
#   RunCountry("MWI", analyseCosts=FALSE, discounting=TRUE, agevac=10, agecohort=10, vaceff_beforesexdebut=0.98, vaceff_aftersexdebut=0, cov=0.75, year_vac=2020),
#   vaccine_cost=100,
#   gdp_per_capita=561
# )
qx <- unlist(data.mortall[iso3=="MWI", as.character(0:100), with=F], use.names=F)
lifeTable(qx)
ages <- c(0:100)
routine_coverage <- 0.75
vaccine_efficacy_nosexdebut <- 0.99
vaccine_efficacy_sexdebut <- 0
lifetab <- lifeTable(unlist(data.mortall[iso3=="MWI", as.character(0:100), with=F], use.names=F), 9)
cohort <- unlist(data.popproj[iso3=="MWI", "2020"], use.names=F)
agevac <- 9
ageCoverage(ages, routine_coverage, vaccine_efficacy_nosexdebut=1, vaccine_efficacy_sexdebut=0, -1, lifetab, cohort, agevac, country_iso3="MWI")
result <- RunCountry ("MWI", analyseCosts=FALSE, discounting=TRUE, agevac=10, agecohort=10, vaceff_beforesexdebut=0.98, vaceff_aftersexdebut=0, cov=0.75, year_vac=2020)

result [,c("vaccinated", "immunized", "inc.cecx", "mort.cecx", "lifey", "disability", "cost.cecx")] <- result [, cohort_size] * result[,c("vaccinated", "immunized", "inc.cecx", "mort.cecx", "lifey", "disability", "cost.cecx")]

# aggregate results on age
result <- dtAggregate (result, "age", id.vars=c("scenario", "type") )
result


lshtm-vimc/prime documentation built on April 21, 2024, 3:21 a.m.