
Calculate The Risk Factor Index For Duke Clinical Score 1993
Source:R/dcs_ptp.R
calculate_dcs_1993_risk_factor_index.Rd
A function used to calculate the patient's risk factor index. This is used to calculate the likelihood of severe coronary artery disease in the Duke Clinical Score 1993 paper.
Usage
calculate_dcs_1993_risk_factor_index(
have_hypertension,
have_dyslipidemia,
have_diabetes,
max_na = 0
)
Arguments
- have_hypertension
Input characters (no, yes) to indicate if the patient has hypertension.
no stands for not having hypertension.
yes stands for having hypertension.
- have_dyslipidemia
Input characters (no, yes) to indicate if the patient has dyslipidemia.
no stands for not having dyslipidemia.
yes stands for having dyslipidemia.
- have_diabetes
Input characters (no, yes) to indicate if the patient has diabetes.
no stands for not having diabetes.
yes stands for having diabetes.
- max_na
Input integer 0 to 3 to indicate the maximum number of missing risk factors to tolerate before outputting an
NA
. Default: 0
Value
An integer indicating the patient's risk factor index.
It can also be NA
if the number of missing risk factors exceeds the max_na
input value.
Examples
calculate_dcs_1993_risk_factor_index(
have_hypertension = "yes",
have_dyslipidemia = "yes",
have_diabetes = "no"
)
#> [1] 2
calculate_dcs_1993_risk_factor_index(
have_hypertension = NA,
have_dyslipidemia = "yes",
have_diabetes = "no",
max_na = 0
)
#> [1] NA
calculate_dcs_1993_risk_factor_index(
have_hypertension = NA,
have_dyslipidemia = "yes",
have_diabetes = "no",
max_na = 1
)
#> [1] 1