README.md

QRISK3 R package

Update

This respiratory has been updated to ver0.6 as CRAN version.

Introduction

This function allows you to calculate 10-year individual CVD risk using QRISK3-2017.

The original QRISK3 model formula <https://qrisk.org/src.php> 
including original variable names and model beta coefficients
is under the license of LGPL and copyright to ClinRisk Ltd.

Details:
========

Copyright 2017 ClinRisk Ltd.

QRISK3-2017 is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

QRISK3-2017 is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License
along with QRISK3-2017.  If not, see http://www.gnu.org/licenses/.

Additional terms

The following disclaimer must be held together with any risk score score generated by this code.  
If the score is displayed, then this disclaimer must be displayed or otherwise be made easily accessible, e.g. by a prominent link alongside it.
The initial version of this file, to be found at http://svn.clinrisk.co.uk/opensource/qrisk2, faithfully implements QRISK3-2017.
ClinRisk Ltd. have released this code under the GNU Lesser General Public License to enable others to implement the algorithm faithfully.
However, the nature of the GNU Lesser General Public License is such that we cannot prevent, for example, someone accidentally 
altering the coefficients, getting the inputs wrong, or just poor programming.
ClinRisk Ltd. stress, therefore, that it is the responsibility of the end user to check that the source that they receive produces the same 
results as the original code found at https://qrisk.org.
Inaccurate implementations of risk scores can lead to wrong patients being given the wrong treatment.

End of additional terms

Install from

CRAN

install.packages("QRISK3")

github

install.packages("devtools")

library(devtools)

install_github("YanLiUK/QRISK3")

Example

data(QRISK3_2019_test)
test_all <- QRISK3_2019_test

test_all_rst <- QRISK3_2017(data=test_all, patid="ID", gender="gender", age="age",
atrial_fibrillation="b_AF", atypical_antipsy="b_atypicalantipsy",
regular_steroid_tablets="b_corticosteroids", erectile_disfunction="b_impotence2",
migraine="b_migraine", rheumatoid_arthritis="b_ra", 
chronic_kidney_disease="b_renal", severe_mental_illness="b_semi",
systemic_lupus_erythematosis="b_sle",
blood_pressure_treatment="b_treatedhyp", diabetes1="b_type1",
diabetes2="b_type2", weight="weight", height="height",
ethiniciy="ethrisk", heart_attack_relative="fh_cvd", 
cholesterol_HDL_ratio="rati", systolic_blood_pressure="sbp",
std_systolic_blood_pressure="sbps5", smoke="smoke_cat", townsend="town")

test_all_rst$"QRISK_C_algorithm_score" <- test_all$"QRISK_C_algorithm_score"
test_all_rst$"diff" <- test_all_rst$"QRISK3_2017_1digit" - test_all_rst$"QRISK_C_algorithm_score"
print(test_all_rst$"diff")
print(identical(test_all_rst$"QRISK3_2017_1digit", test_all_rst$"QRISK_C_algorithm_score"))

Paper about how to create QRISK3 variables

<https://f1000research.com/articles/8-2139>
Doi: <https://doi.org/10.12688/f1000research.21679.1>


YanLiUK/QRISK3 documentation built on July 30, 2023, 2:21 a.m.