| Title: | WHO Cardiovascular Disease Risk Calculator |
| Version: | 1.1.0 |
| Description: | Implements the 2019 World Health Organization (WHO) cardiovascular disease (CVD) risk prediction models, as described in Kaptoge et al. (2019) <doi:10.1016/S2214-109X(19)30318-3>. Provides two validated models for estimating 10-year risk of fatal and non-fatal cardiovascular events (myocardial infarction and stroke): a laboratory-based model using age, sex, systolic blood pressure, total cholesterol, smoking status, and diabetes history; and a non-laboratory-based model substituting body mass index (BMI) for cholesterol and diabetes, suitable for resource-limited settings. Risk estimates are recalibrated to 21 Global Burden of Disease regions (or to individual countries) using the authors' recalibration parameters, fitted to Global Burden of Disease 2017 incidence rates and Non-Communicable Disease Risk Factor Collaboration risk factor levels. Functions are fully vectorized for efficient batch calculations and support automatic country-to-region mapping via ISO 3166-1 alpha-3 country codes. |
| Depends: | R (≥ 2.10) |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| Suggests: | devtools, spelling, testthat (≥ 3.0.0) |
| Language: | en-US |
| Config/testthat/edition: | 3 |
| Config/roxygen2/version: | 8.1.1 |
| NeedsCompilation: | no |
| Packaged: | 2026-10-29 16:08:09 UTC; andre |
| Author: | WHO CVD Risk Chart Working Group [aut], Andrea Pedot [cre, ctb] |
| Maintainer: | Andrea Pedot <andrea.pedot@unimi.it> |
| Repository: | CRAN |
| Date/Publication: | 2026-10-30 09:50:57 UTC |
WHO CVD Risk Calculator
Description
Calculate 10-year cardiovascular disease (CVD) risk using the 2019 WHO risk prediction models. This package implements both laboratory-based and non-laboratory-based models, recalibrated to 21 global regions (default, as in the published WHO risk charts) or, optionally, to individual countries.
Author(s)
Maintainer: Andrea Pedot andrea.pedot@unimi.it [contributor]
Authors:
WHO CVD Risk Chart Working Group
References
Kaptoge S, Pennells L, De Bacquer D, et al. World Health Organization cardiovascular disease risk charts: revised models to estimate risk in 21 global regions. Lancet Glob Health. 2019;7(10):e1332-e1345. doi:10.1016/S2214-109X(19)30318-3
Calculate WHO 10-Year CVD Risk (Laboratory-Based Model)
Description
Calculates the 10-year risk of cardiovascular disease (fatal and non-fatal myocardial infarction and stroke) using the WHO laboratory-based model. This model requires total cholesterol measurement.
Usage
calculate_who_risk(
age,
sex,
sbp,
cholesterol,
smoking,
diabetes,
region = NULL,
country = NULL,
recalibration = c("region", "country"),
year = 2017
)
Arguments
age |
Numeric vector. Age in years (valid range: 40-80). |
sex |
Character vector. Sex: "male" or "female". |
sbp |
Numeric vector. Systolic blood pressure in mmHg. |
cholesterol |
Numeric vector. Total cholesterol in mmol/L. To convert from mg/dL to mmol/L, divide by 38.67. |
smoking |
Logical vector. Current smoking status (TRUE = current smoker). |
diabetes |
Logical vector. History of diabetes (TRUE = diabetic). |
region |
Character vector. WHO/GBD region name. One of the 21 global
regions (see |
country |
Character vector. ISO 3166-1 alpha-3 country code (e.g., "USA",
"GBR", "IND"). Used to determine region if |
recalibration |
Character. Level of recalibration:
|
year |
Integer vector. Calendar year of the recalibration target population (1990-2017, default 2017). Years up to 2015 use the 5-year period they fall in (1990, 1995, ..., 2015). |
Details
The model uses Cox proportional hazards regression with the following predictors:
Age (with interactions for all other predictors)
Total cholesterol
Systolic blood pressure
Diabetes status
Current smoking status
Risk is calculated separately for myocardial infarction/CHD death and stroke, then combined assuming independence of the two outcomes:
P_{CVD} = 1 - (1 - P_{MI}) \times (1 - P_{stroke})
Each endpoint risk is first computed from the derivation model,
P = 1 - S_0^{\exp(LP)}, using the baseline survival S_0 of the
derivation cohort, and then recalibrated on the complementary log-log scale:
P_{cal} = 1 - \exp(-\exp(c + s \log(-\log(1 - P))))
where the intercept c and slope s are specific to region (or
country), sex, endpoint and year. These parameters were fitted by the
authors to GBD 2017 incidence rates and NCD-RisC risk factor levels and are
taken from their Stata implementation (whocvdrisk).
Value
Numeric vector of 10-year CVD risk as a proportion (0-1). Multiply by 100 to get percentage.
Recalibration
Region-level (default). recalibration = "region" uses one
set of parameters per WHO/GBD region, sex and year. This reproduces the
published WHO risk charts (Kaptoge et al. 2019) and the default output of
the authors' Stata program whocvdrisk. When only country is
given, it is used solely to look up the region (see
country_to_region); all countries in a region get the same
risk.
Country-level (optional). recalibration = "country" uses
parameters fitted to each country's own GBD 2017 incidence rates and
NCD-RisC risk factor levels (the cal1 parameters of
whocvdrisk). It requires country. Use it when you need
country-specific estimates rather than chart-equivalent ones; results can
differ substantially from the region-level ones. For example, for a 45-year-old male
smoker in the United Kingdom (SBP 140 mmHg, total cholesterol 5.5 mmol/L, no
diabetes), the lab model gives about 7.0% with region-level and 9.4% with
country-level recalibration.
Country-specific estimates are not available for South Sudan (SSD), the US Virgin Islands (VIR), American Samoa (ASM), Guam (GUM) and the Northern Mariana Islands (MNP), nor for Greenland (GRL), Bermuda (BMU) and Puerto Rico (PRI) before 2015. For these, region-level parameters are used and a warning is issued.
Year. year selects the calendar year of the recalibration
target population (default 2017, as in the charts). Parameters exist for
1990, 1995, 2000, 2005, 2010, 2015, 2016 and 2017; other years up to 2015
use the 5-year period they fall in (e.g. 2003 uses 2000).
Centering Values
Variables are centered at:
Age: 60 years
Systolic blood pressure: 120 mmHg
Total cholesterol: 6 mmol/L
See Also
calculate_who_risk_nonlab for the non-laboratory-based model,
get_regions for available regions,
get_country_codes for country code lookup.
Examples
# Single calculation
calculate_who_risk(
age = 55,
sex = "male",
sbp = 140,
cholesterol = 5.5,
smoking = TRUE,
diabetes = FALSE,
region = "western_europe"
)
# Using country code instead of region
calculate_who_risk(
age = 60,
sex = "female",
sbp = 130,
cholesterol = 6.0,
smoking = FALSE,
diabetes = TRUE,
country = "ITA"
)
# Country-specific instead of region-level recalibration
calculate_who_risk(
age = 45,
sex = "male",
sbp = 140,
cholesterol = 5.5,
smoking = TRUE,
diabetes = FALSE,
country = "GBR",
recalibration = "country"
)
# Vectorized calculation
calculate_who_risk(
age = c(45, 55, 65),
sex = c("male", "female", "male"),
sbp = c(120, 140, 160),
cholesterol = c(5.0, 6.0, 7.0),
smoking = c(FALSE, TRUE, FALSE),
diabetes = c(FALSE, FALSE, TRUE),
country = c("USA", "GBR", "IND")
)
Calculate WHO 10-Year CVD Risk (Non-Laboratory-Based Model)
Description
Calculates the 10-year risk of cardiovascular disease using the WHO non-laboratory-based model. This model uses BMI instead of cholesterol and does not require diabetes status, making it suitable for resource-limited settings where laboratory testing may not be available.
Usage
calculate_who_risk_nonlab(
age,
sex,
sbp,
bmi,
smoking,
region = NULL,
country = NULL,
recalibration = c("region", "country"),
year = 2017
)
Arguments
age |
Numeric vector. Age in years (valid range: 40-80). |
sex |
Character vector. Sex: "male" or "female". |
sbp |
Numeric vector. Systolic blood pressure in mmHg. |
bmi |
Numeric vector. Body mass index in kg/m². |
smoking |
Logical vector. Current smoking status (TRUE = current smoker). |
region |
Character vector. WHO/GBD region name. One of the 21 global
regions (see |
country |
Character vector. ISO 3166-1 alpha-3 country code. Used to
determine region if |
recalibration |
Character. Level of recalibration:
|
year |
Integer vector. Calendar year of the recalibration target population (1990-2017, default 2017). Years up to 2015 use the 5-year period they fall in (1990, 1995, ..., 2015). |
Details
This model is designed for use in resource-limited settings where laboratory measurements (cholesterol, glucose) may not be readily available. It uses BMI as a proxy for metabolic risk.
Risks for CHD/MI and stroke are computed from the derivation model,
recalibrated on the complementary log-log scale with the authors'
non-laboratory model parameters, and combined assuming independence (see
calculate_who_risk for the formulas).
Important limitations:
The non-laboratory model tends to underestimate risk in people with diabetes because diabetes is a strong predictor not included in this model.
For individuals identified as high risk (>10%) by this model, laboratory-based assessment is recommended.
Value
Numeric vector of 10-year CVD risk as a proportion (0-1).
Centering Values
Variables are centered at:
Age: 60 years
Systolic blood pressure: 120 mmHg
BMI: 25 kg/m²
Recalibration
Region-level (default). recalibration = "region" uses one
set of parameters per WHO/GBD region, sex and year. This reproduces the
published WHO risk charts (Kaptoge et al. 2019) and the default output of
the authors' Stata program whocvdrisk. When only country is
given, it is used solely to look up the region (see
country_to_region); all countries in a region get the same
risk.
Country-level (optional). recalibration = "country" uses
parameters fitted to each country's own GBD 2017 incidence rates and
NCD-RisC risk factor levels (the cal1 parameters of
whocvdrisk). It requires country. Use it when you need
country-specific estimates rather than chart-equivalent ones; results can
differ substantially from the region-level ones. For example, for a 45-year-old male
smoker in the United Kingdom (SBP 140 mmHg, total cholesterol 5.5 mmol/L, no
diabetes), the lab model gives about 7.0% with region-level and 9.4% with
country-level recalibration.
Country-specific estimates are not available for South Sudan (SSD), the US Virgin Islands (VIR), American Samoa (ASM), Guam (GUM) and the Northern Mariana Islands (MNP), nor for Greenland (GRL), Bermuda (BMU) and Puerto Rico (PRI) before 2015. For these, region-level parameters are used and a warning is issued.
Year. year selects the calendar year of the recalibration
target population (default 2017, as in the charts). Parameters exist for
1990, 1995, 2000, 2005, 2010, 2015, 2016 and 2017; other years up to 2015
use the 5-year period they fall in (e.g. 2003 uses 2000).
See Also
calculate_who_risk for the laboratory-based model.
Examples
# Single calculation
calculate_who_risk_nonlab(
age = 55,
sex = "male",
sbp = 140,
bmi = 28,
smoking = TRUE,
region = "south_asia"
)
# Using country code
calculate_who_risk_nonlab(
age = 60,
sex = "female",
sbp = 135,
bmi = 26,
smoking = FALSE,
country = "KEN"
)
# Country-specific recalibration, for an earlier year
calculate_who_risk_nonlab(
age = 60,
sex = "female",
sbp = 135,
bmi = 26,
smoking = FALSE,
country = "KEN",
recalibration = "country",
year = 2010
)
Map Country Code to Region
Description
Utility function to map ISO 3166-1 alpha-3 country codes to WHO/GBD regions.
Usage
country_to_region(country)
Arguments
country |
Character vector of ISO 3166-1 alpha-3 country codes. |
Value
Character vector of region names.
Examples
country_to_region(c("USA", "DEU", "JPN"))
Get Country Code to Region Mapping
Description
Returns a named vector mapping ISO 3166-1 alpha-3 country codes to their corresponding WHO/GBD regions.
Usage
get_country_codes(country = NULL)
Arguments
country |
Optional character vector of country codes to look up. If NULL (default), returns the complete mapping. |
Value
If country is NULL, returns a named character vector where
names are country codes and values are region names. If country
is provided, returns the corresponding region(s).
Examples
# Get all mappings
head(get_country_codes())
# Look up specific countries
get_country_codes(c("USA", "GBR", "IND"))
Get Available Region Names
Description
Returns a character vector of valid WHO/GBD region names that can be used with the risk calculation functions.
Usage
get_regions()
Value
Character vector of 21 GBD region names.
Examples
get_regions()