<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE article PUBLIC "-//NLM//DTD JATS (Z39.96) Journal Publishing DTD v1.2 20190208//EN" "http://jats.nlm.nih.gov/publishing/1.2/JATS-journalpublishing1.dtd"><article xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink" article-type="other" dtd-version="1.2" xml:lang="en">
    <front>
        <journal-meta>
            <journal-id journal-id-type="pmc">F1000Research</journal-id>
            <journal-title-group>
                <journal-title>F1000Research</journal-title>
            </journal-title-group>
            <issn pub-type="epub">2046-1402</issn>
            <publisher>
                <publisher-name>F1000 Research Limited</publisher-name>
                <publisher-loc>London, UK</publisher-loc>
            </publisher>
        </journal-meta>
        <article-meta>
            <article-id pub-id-type="doi">10.12688/f1000research.21679.1</article-id>
            <article-categories>
                <subj-group subj-group-type="heading">
                    <subject>Software Tool Article</subject>
                </subj-group>
                <subj-group>
                    <subject>Articles</subject>
                </subj-group>
            </article-categories>
            <title-group>
                <article-title>R package &#x201c;QRISK3&#x201d;: an unofficial research purposed implementation of ClinRisk&#x2019;s QRISK3 algorithm into R</article-title>
                <fn-group content-type="pub-status">
                    <fn>
                        <p>[version 1; peer review: 1 not approved]</p>
                    </fn>
                </fn-group>
            </title-group>
            <contrib-group>
                <contrib contrib-type="author" corresp="no">
                    <name>
                        <surname>Li</surname>
                        <given-names>Yan</given-names>
                    </name>
                    <role content-type="http://credit.niso.org/">Conceptualization</role>
                    <role content-type="http://credit.niso.org/">Data Curation</role>
                    <role content-type="http://credit.niso.org/">Formal Analysis</role>
                    <role content-type="http://credit.niso.org/">Funding Acquisition</role>
                    <role content-type="http://credit.niso.org/">Investigation</role>
                    <role content-type="http://credit.niso.org/">Methodology</role>
                    <role content-type="http://credit.niso.org/">Resources</role>
                    <role content-type="http://credit.niso.org/">Software</role>
                    <role content-type="http://credit.niso.org/">Validation</role>
                    <role content-type="http://credit.niso.org/">Visualization</role>
                    <role content-type="http://credit.niso.org/">Writing &#x2013; Original Draft Preparation</role>
                    <uri content-type="orcid">https://orcid.org/0000-0002-0167-4520</uri>
                    <xref ref-type="aff" rid="a1">1</xref>
                </contrib>
                <contrib contrib-type="author" corresp="no">
                    <name>
                        <surname>Sperrin</surname>
                        <given-names>Matthew</given-names>
                    </name>
                    <role content-type="http://credit.niso.org/">Conceptualization</role>
                    <role content-type="http://credit.niso.org/">Investigation</role>
                    <role content-type="http://credit.niso.org/">Methodology</role>
                    <role content-type="http://credit.niso.org/">Supervision</role>
                    <role content-type="http://credit.niso.org/">Validation</role>
                    <role content-type="http://credit.niso.org/">Writing &#x2013; Original Draft Preparation</role>
                    <role content-type="http://credit.niso.org/">Writing &#x2013; Review &amp; Editing</role>
                    <xref ref-type="aff" rid="a1">1</xref>
                </contrib>
                <contrib contrib-type="author" corresp="yes">
                    <name>
                        <surname>van Staa</surname>
                        <given-names>Tjeerd</given-names>
                    </name>
                    <role content-type="http://credit.niso.org/">Conceptualization</role>
                    <role content-type="http://credit.niso.org/">Funding Acquisition</role>
                    <role content-type="http://credit.niso.org/">Methodology</role>
                    <role content-type="http://credit.niso.org/">Project Administration</role>
                    <role content-type="http://credit.niso.org/">Resources</role>
                    <role content-type="http://credit.niso.org/">Supervision</role>
                    <role content-type="http://credit.niso.org/">Validation</role>
                    <role content-type="http://credit.niso.org/">Writing &#x2013; Original Draft Preparation</role>
                    <role content-type="http://credit.niso.org/">Writing &#x2013; Review &amp; Editing</role>
                    <xref ref-type="corresp" rid="c1">a</xref>
                    <xref ref-type="aff" rid="a1">1</xref>
                    <xref ref-type="aff" rid="a2">2</xref>
                    <xref ref-type="aff" rid="a3">3</xref>
                </contrib>
                <aff id="a1">
                    <label>1</label>Health e-Research Centre, School of Health Sciences, Faculty of Biology, Medicine and Health, the University of Manchester, Manchester, UK</aff>
                <aff id="a2">
                    <label>2</label>Utrecht Institute for Pharmaceutical Sciences, Utrecht University, Utrecht, The Netherlands</aff>
                <aff id="a3">
                    <label>3</label>Alan Turing Institute, Alan Turing Institute, London, UK</aff>
            </contrib-group>
            <author-notes>
                <corresp id="c1">
                    <label>a</label>
                    <email xlink:href="mailto:tjeerd.vanstaa@manchester.ac.uk">tjeerd.vanstaa@manchester.ac.uk</email>
                </corresp>
                <fn fn-type="conflict">
                    <p>No competing interests were disclosed.</p>
                </fn>
            </author-notes>
            <pub-date pub-type="epub">
                <day>23</day>
                <month>12</month>
                <year>2019</year>
            </pub-date>
            <pub-date pub-type="collection">
                <year>2019</year>
            </pub-date>
            <volume>8</volume>
            <elocation-id>2139</elocation-id>
            <history>
                <date date-type="accepted">
                    <day>17</day>
                    <month>12</month>
                    <year>2019</year>
                </date>
            </history>
            <permissions>
                <copyright-statement>Copyright: &#x00a9; 2019 Li Y et al.</copyright-statement>
                <copyright-year>2019</copyright-year>
                <license xlink:href="https://creativecommons.org/licenses/by/4.0/">
                    <license-p>This is an open access article distributed under the terms of the Creative Commons Attribution Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
                </license>
            </permissions>
            <self-uri content-type="pdf" xlink:href="https://f1000research.com/articles/8-2139/pdf"/>
            <abstract>
                <p>Cardiovascular disease has been the leading cause of death for decades. Risk prediction models are used to identify high risk patients; the most common model used in the UK is ClinRisk&#x2019;s QRISK3. In this paper we describe the implementation of the QRISK3 algorithm into an R package. The package was successfully validated by the open sourced QRISK3 algorithm and QRISK3 SAS program. We provide detailed examples of the use of the package, including assigning QRISK3 scores for a large cohort of patients. This R package could help the research community to better understand risk prediction scores and improve future risk prediction models. The package is available from CRAN: 
                    <ext-link ext-link-type="uri" xlink:href="https://cran.r-project.org/web/packages/QRISK3/index.html">https://cran.r-project.org/web/packages/QRISK3/index.html</ext-link>.</p>
            </abstract>
            <kwd-group kwd-group-type="author">
                <kwd>CVD</kwd>
                <kwd>risk prediction model</kwd>
                <kwd>R</kwd>
                <kwd>QRISK3</kwd>
            </kwd-group>
            <funding-group>
                <award-group id="fund-1" xlink:href="http://dx.doi.org/10.13039/501100004543">
                    <funding-source>China Scholarship Council</funding-source>
                </award-group>
                <funding-statement>This work was supported by the China Scholarship Council.</funding-statement>
                <funding-statement>
                    <italic>The funders had no role in study design, data collection and analysis, decision to publish, or preparation of the manuscript.</italic>
                </funding-statement>
            </funding-group>
        </article-meta>
    </front>
    <body>
        <sec sec-type="intro">
            <title>Introduction</title>
            <p>Cardiovascular disease (CVD) was responsible for 17.9 million deaths in 2016, which represents 31% of overall global deaths, and over 75% of these deaths happened in low/middle-income countries
                <sup>
                    <xref ref-type="bibr" rid="ref-1">1</xref>
                </sup>. People who are at high risk of CVD need to be identified and treated early
                <sup>
                    <xref ref-type="bibr" rid="ref-1">1</xref>
                </sup>. Risk prediction models that use risk factors to calculate the probability of patients developing diseases are often used to identify high risk patients
                <sup>
                    <xref ref-type="bibr" rid="ref-2">2</xref>
                </sup>. QRISK3 is the most popular risk prediction model for CVD developed in the UK. It calculates risk of patients developing CVD in the next 10 years and has been incorporated into the electronic health records (EHRs) system in the UK in order to detect high risk CVD patients and help clinicians make treatment decisions
                <sup>
                    <xref ref-type="bibr" rid="ref-3">3</xref>,
                    <xref ref-type="bibr" rid="ref-4">4</xref>
                </sup>. NICE guidelines recommend clinicians to consider prescribing statins to patients with a risk over 10% identified from QRISK3
                <sup>
                    <xref ref-type="bibr" rid="ref-5">5</xref>
                </sup>. QRISK3 was developed from historical patients&#x2019; EHR data using Cox proportional hazard model
                <sup>
                    <xref ref-type="bibr" rid="ref-6">6</xref>
                </sup> and has been well validated at population level corresponding to discrimination and calibration
                <sup>
                    <xref ref-type="bibr" rid="ref-3">3</xref>,
                    <xref ref-type="bibr" rid="ref-4">4</xref>,
                    <xref ref-type="bibr" rid="ref-7">7</xref>
                </sup>.</p>
            <p>The implementation of QRISK3 into R would not only benefit researchers to improve future risk prediction but also enable them to use QRISK3 scores to identify patients at certain risk levels, e.g. for clinical trial recruitment. There is also scope to improve these risk predictions; it has been found that QRISK3 has uncertainty on individual risk prediction
                <sup>
                    <xref ref-type="bibr" rid="ref-7">7</xref>,
                    <xref ref-type="bibr" rid="ref-8">8</xref>
                </sup> due to unmeasured heterogeneity between practices, which was not captured. A follow-up study suggests that QRISK3 may need to include additional causal risk factors as this uncertainty on individual risk prediction was not related to data quality and variation of association between disease and outcome
                <sup>
                    <xref ref-type="bibr" rid="ref-9">9</xref>
                </sup>. The current QRISK3 can only be accessed through an online web calculator or specialised commercial software
                <sup>
                    <xref ref-type="bibr" rid="ref-10">10</xref>
                </sup> and its original algorithm was written by C, which is a low level programming language appealing to software engineering rather than data science
                <sup>
                    <xref ref-type="bibr" rid="ref-11">11</xref>
                </sup>. R is the most popular statistical programming language in the data science field due to its great advantage as free and open-source, with fast computing and a well-supported community
                <sup>
                    <xref ref-type="bibr" rid="ref-12">12</xref>
                </sup>. This paper explains the incorporation of the QRISK3 algorithm into R for ease of research concerning QRISK3 and how the package was developed and validated. The package aims to help researchers to improve risk prediction models and better detect high risk CVD patients.</p>
        </sec>
        <sec sec-type="methods">
            <title>Methods</title>
            <sec>
                <title>Extraction of the QRISK3 algorithm</title>
                <p>The original QRISK3 algorithm was written in C by ClinRisk under a GNU Lesser General Public License
                    <sup>
                        <xref ref-type="bibr" rid="ref-11">11</xref>
                    </sup>. Their previously published QRISK3 paper was used to understand the original algorithm and the associations between variables used in the original algorithm and risk factors of QRISK3
                    <sup>
                        <xref ref-type="bibr" rid="ref-3">3</xref>
                    </sup>.</p>
            </sec>
            <sec>
                <title>Development and validation of the QRISK3 R package</title>
                <p>The QRISK3 algorithm was written in both R (3.4.2) and SAS (9.4)
                    <sup>
                        <xref ref-type="bibr" rid="ref-13">13</xref>
                    </sup> independently, in order to mimic double programming, with a plan to use the SAS implementation to validate the R package. An additional C program, which could directly call the original QRISK3 algorithm to calculate risk, was written for validation. Two validation datasets (QRISK3_2017_test and QRISK3_2019_test) were then created and included in the R package. Dataset QRISK3_2017_test was created by manually recording the calculated QRISK3 risk score from the original QRISK3 algorithm for a group of simulated patients. The simulated patient groups were generated by changing each risk factor sequentially covering the changes of all QRISK3 risk factors. For example, patient 1 in QRISK3_2017_test does not have any positive CVD risk factors, patient 2 is similar to patient 1 expect he has atrial fibrillation, patient ID 3 is similar to patient 2 except he is on atypical antipsychotic medication rather than atrial fibrillation and so on until all the change of CVD predictors are covered. Therefore, each patient is similar to the previous patient except the change of one CVD predictor. QRISK3_2019_test was the version recorded using the original QRISK3 algorithm with different value changes for each risk factor. Risk scores of the same simulated patient groups (QRISK3_2017_test and QRISK3_2019_test) was compared among different versions of QRISK3, including QRISK3 R package, QRISK3 SAS program and QRISK3 C function for validation. The R package was created using R CMD tool
                    <sup>
                        <xref ref-type="bibr" rid="ref-14">14</xref>
                    </sup> with several useful online tutorials
                    <sup>
                        <xref ref-type="bibr" rid="ref-15">15</xref>&#x2013;
                        <xref ref-type="bibr" rid="ref-18">18</xref>
                    </sup>.</p>
            </sec>
            <sec>
                <title>Implementation</title>
                <p>The QRISK3 package can be directly installed from CRAN
                    <sup>
                        <xref ref-type="bibr" rid="ref-19">19</xref>
                    </sup> using &#x201c;install(QRISK3)&#x201d; or GitHub respiratory
                    <sup>
                        <xref ref-type="bibr" rid="ref-20">20</xref>
                    </sup> with &#x201c;install_github("YanLiUK/QRISK3")&#x201d;. The package contains one function (QRISK3_2017) to calculate the risk of patients developing CVD in the next 10 years using the QRISK3 algorithm
                    <sup>
                        <xref ref-type="bibr" rid="ref-11">11</xref>
                    </sup> and the two datasets for testing.</p>
                <p>Variables used by the QRISK3 package were summarised and compared to the original algorithm in 
                    <xref ref-type="table" rid="T1">Table 1</xref>. All variables have the same definition as the QRISK3 paper
                    <sup>
                        <xref ref-type="bibr" rid="ref-3">3</xref>
                    </sup>, most of variables were coded into numeric variables similar to the original algorithm. The coding of ethnicity and smoking was different from the original algorithm (written in C), as the C index starts from 0 but R&#x2019;s index starts from 1.</p>
                <table-wrap id="T1" orientation="portrait" position="anchor">
                    <label>Table 1. </label>
                    <caption>
                        <title>Description of QRISK3 variables.</title>
                    </caption>
                    <table content-type="article-table" frame="hsides">
                        <thead>
                            <tr>
                                <th align="center" colspan="1" rowspan="1">Parameters in QRISK3
                                    <break/>R package</th>
                                <th align="center" colspan="1" rowspan="1" valign="bottom">Meaning of variables</th>
                                <th align="center" colspan="1" rowspan="1">Variables in original
                                    <break/>algorithm</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">age</td>
                                <td colspan="1" rowspan="1" valign="top">Specify the age of the patient in year (e.g. 64 years-old)</td>
                                <td colspan="1" rowspan="1" valign="top">age</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">atrial_fibrillation</td>
                                <td colspan="1" rowspan="1" valign="top">Atrial fibrillation? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_AF</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">atypical_antipsy</td>
                                <td colspan="1" rowspan="1" valign="top">On atypical antipsychotic medication? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_atypicalantipsy</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">regular_steroid_tablets</td>
                                <td colspan="1" rowspan="1" valign="top">On regular steroid tablets? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_corticosteroids</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">erectile_disfunction</td>
                                <td colspan="1" rowspan="1" valign="top">A diagnosis of or treatment for erectile disfunction?
                                    <break/>(0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_impotence2
                                    <break/>(only for men)</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">migraine</td>
                                <td colspan="1" rowspan="1" valign="top">Do patients have migraines? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_migraine</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">rheumatoid_arthritis</td>
                                <td colspan="1" rowspan="1" valign="top">Rheumatoid arthritis? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_ra</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">chronic_kidney_disease</td>
                                <td colspan="1" rowspan="1" valign="top">Chronic kidney disease (stage 3, 4 or 5)? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_renal</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">severe_mental_illness</td>
                                <td colspan="1" rowspan="1" valign="top">Severe mental illness? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_semi</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">systemic_lupus_erythematosis</td>
                                <td colspan="1" rowspan="1" valign="top">Systemic lupus erythematosis (SLE)? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_sle</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">blood_pressure_treatment</td>
                                <td colspan="1" rowspan="1" valign="top">On blood pressure treatment? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_treatedhyp</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">diabetes1</td>
                                <td colspan="1" rowspan="1" valign="top">Diabetes status: type 1? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_type1</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">diabetes2</td>
                                <td colspan="1" rowspan="1" valign="top">Diabetes status: type 2? (0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">b_type2</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">Weight (kg)</td>
                                <td colspan="1" rowspan="1" valign="top">Weight</td>
                                <td colspan="1" rowspan="1" valign="top">Not available</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">Height (cm)</td>
                                <td colspan="1" rowspan="1" valign="top">Height</td>
                                <td colspan="1" rowspan="1" valign="top">Not available</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">Weight (m) / (Height (cm) /100)
                                    <sup>2</sup>
                                </td>
                                <td colspan="1" rowspan="1" valign="top">Body mass index (BMI)</td>
                                <td colspan="1" rowspan="1" valign="top">bmi</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">ethnicity</td>
                                <td colspan="1" rowspan="1" valign="top">1 White or not stated
                                    <break/>2 Indian
                                    <break/>3 Pakistani
                                    <break/>4 Bangladeshi
                                    <break/>5 Other Asian
                                    <break/>6 Black Caribbean
                                    <break/>7 Black African
                                    <break/>8 Chinese
                                    <break/>9 Other ethnic group</td>
                                <td colspan="1" rowspan="1" valign="top">ethrisk:
                                    <break/>0, --not stated
                                    <break/>1, --white
                                    <break/>2, --inidan
                                    <break/>3, --Pakistani
                                    <break/>4,--Bangladeshi
                                    <break/>5,--Other Asian
                                    <break/>6,--Black Caribbean
                                    <break/>7,--Black African
                                    <break/>8,--Chinese
                                    <break/>9--Other ethnic group</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">heart_attack_relative</td>
                                <td colspan="1" rowspan="1" valign="top">Angina or heart attack in a 1st degree relative &lt; 60?
                                    <break/>(0: No, 1: Yes)</td>
                                <td colspan="1" rowspan="1" valign="top">fh_cvd</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">cholesterol_HDL_ratio</td>
                                <td colspan="1" rowspan="1" valign="top">Cholesterol/HDL ratio? (range from 1 to 11, e.g. 4)</td>
                                <td colspan="1" rowspan="1" valign="top">rati</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">systolic_blood_pressure</td>
                                <td colspan="1" rowspan="1" valign="top">Systolic blood pressure (mmHg, e.g. 180 mmHg)</td>
                                <td colspan="1" rowspan="1" valign="top">sbp</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">std_systolic_blood_pressure</td>
                                <td colspan="1" rowspan="1" valign="top">Standard deviation of at least two most recent systolic
                                    <break/>blood pressure readings(mmHg)</td>
                                <td colspan="1" rowspan="1" valign="top">sbps5</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">smoke</td>
                                <td colspan="1" rowspan="1" valign="top">1 non-smoker
                                    <break/>2 ex-smoker
                                    <break/>3 light smoker (less than 10)
                                    <break/>4 moderate smoker (10 to 19)
                                    <break/>5 heavy smoker (20 or over)</td>
                                <td colspan="1" rowspan="1" valign="top">smoke_cat:
                                    <break/>0 non-smoker
                                    <break/>1 ex-smoker
                                    <break/>2 light smoker
                                    <break/>(less than 10)
                                    <break/>3 moderate smoker
                                    <break/>(10 to 19)
                                    <break/>4 heavy smoker
                                    <break/>(20 or over)</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">townsend</td>
                                <td colspan="1" rowspan="1" valign="top">Townsend deprivation scores</td>
                                <td colspan="1" rowspan="1" valign="top">town</td>
                            </tr>
                        </tbody>
                    </table>
                </table-wrap>
            </sec>
            <sec>
                <title>Validation</title>
                <p>The two datasets QRISK3_2017_test and QRISK3_2019_test were used for validation. Risk scores calculated from this QRISK3 package, the original algorithm and the SAS version on the same group of patients was exactly the same. The external validation of this QRISK3 package in a big CPRD cohorts with 3.6 million patients shows a good and similar discrimination (C statistic: 0.85) and calibration to a previous study
                    <sup>
                        <xref ref-type="bibr" rid="ref-7">7</xref>
                    </sup> compared to the original QRISK3 paper
                    <sup>
                        <xref ref-type="bibr" rid="ref-3">3</xref>
                    </sup>.</p>
            </sec>
            <sec>
                <title>Usage and features</title>
                <p>A patient cohort with anonymous patient identifiers and CVD risk factors should first be extracted and coded similarly to QRISK3 by the user. Missing values in the dataset should be handled (e.g. multiple imputation) before using this package. Column names of CVD risk factors (e.g. &#x201c;age&#x201d;) should then be specified correctly to the QRISK3_2017 function. The function returns calculated risk scores through a dataset with three columns, including patient identifier, calculated QRISK3 score and calculated QRISK3 score with one digit. It also reminds users to double check whether the definition of their variables was the same as the definition of QRISK3. The package also automatically detects whether all variables were coded as numeric and whether age of patients was ranged between 28 and 84, if not an error message returns (explained in 
                    <xref ref-type="table" rid="T2">Table 2</xref>).</p>
                <table-wrap id="T2" orientation="portrait" position="anchor">
                    <label>Table 2. </label>
                    <caption>
                        <title>Description of error message in the QRISK3 R package.</title>
                    </caption>
                    <table content-type="article-table" frame="hsides">
                        <thead>
                            <tr>
                                <th align="center" colspan="1" rowspan="1">Error message</th>
                                <th align="center" colspan="1" rowspan="1">Conditions</th>
                                <th align="center" colspan="1" rowspan="1">Explanation</th>
                            </tr>
                        </thead>
                        <tbody>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">&#x201c;Variables including XXX, XXX must
                                    <break/>be coded as numeric (0/1) variable.&#x201d;</td>
                                <td colspan="1" rowspan="1" valign="top">When at least one of variables in
                                    <break/>dataset are not numeric</td>
                                <td colspan="1" rowspan="1" valign="top">QRISK3 algorithm needs numeric
                                    <break/>variable (0/1) to calculate risk</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">&#x201c;Age of patients must be between
                                    <break/>25 and 84.&#x201d;</td>
                                <td colspan="1" rowspan="1" valign="top">When at least one patient in the dataset
                                    <break/>has age below 25 or above 84</td>
                                <td colspan="1" rowspan="1" valign="top">QRISK3 algorithm was developed
                                    <break/>from a population with age between
                                    <break/>25 and 84</td>
                            </tr>
                            <tr>
                                <td colspan="1" rowspan="1" valign="top">&#x201c;Variables including XXX, XXX has
                                    <break/>missing values.&#x201d;</td>
                                <td colspan="1" rowspan="1" valign="top">When at least one of variables in
                                    <break/>dataset has missing value</td>
                                <td colspan="1" rowspan="1" valign="top">Missing values must be handled
                                    <break/>before using this QRISK3 algorithm</td>
                            </tr>
                        </tbody>
                    </table>
                </table-wrap>
            </sec>
        </sec>
        <sec>
            <title>Workflow</title>
            <p>
                <bold>
                    <italic toggle="yes">1. Set path and read data from CSV file</italic>
                </bold>
            </p>
            <p>
                <preformat orientation="portrait" position="float" preformat-type="computer code" xml:space="preserve">
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">dataPath &lt;-</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8"> "yourPath"                          </styled-content>

                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">dataName &lt;-</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8"> "yourDataName.csv"                  </styled-content>

                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">                                                </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8; font-weight:bold">setwd</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">(dataPath)                                 </styled-content>

                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">myData &lt;-</styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8; font-weight:bold"> read.csv</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">(dataName, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">check.names=</styled-content>
                    <styled-content style="color:#8F5902;font-size:15px;background-color:#F8F8F8">FALSE</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">) </styled-content>
</preformat>
</p>
            <p>
                <bold>
                    <italic toggle="yes">2. See the data structure and other information</italic>
                </bold>
            </p>
            <p>
                <preformat orientation="portrait" position="float" preformat-type="computer code" xml:space="preserve">
                    <styled-content style="color:#8F5902;font-size:15px;background-color:#F8F8F8">#See data structure </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8; font-weight:bold">str</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">(myData)         </styled-content>

</preformat>
</p>
            <p>
                <preformat orientation="portrait" position="float" preformat-type="computer code" xml:space="preserve">
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">## 'data.frame':    48 obs. of  26 variables:                                               
##  $ QRISK_C_algorithm_score  : num  17.2 36 21.6 24.1 17.2 19.1 20.9 22.3 19.3 23.5 ...   
##  $ age              : int  64 64 64 64 64 64 64 64 64 64 ...                             
##  $ gender           : num  1 1 1 1 1 1 1 1 1 1 ...                                       
##  $ b_AF             : int  0 1 0 0 0 0 0 0 0 0 ...                                       
##  $ b_atypicalantipsy: int  0 0 1 0 0 0 0 0 0 0 ...                                       
##  $ b_corticosteroids: int  0 0 0 1 0 0 0 0 0 0 ...                                       
##  $ b_impotence2     : int  0 0 0 0 1 0 0 0 0 0 ...                                       
##  $ b_migraine       : int  0 0 0 0 0 1 0 0 0 0 ...                                       
##  $ b_ra             : int  0 0 0 0 0 0 1 0 0 0 ...                                       
##  $ b_renal          : int  0 0 0 0 0 0 0 1 0 0 ...                                       
##  $ b_semi           : int  0 0 0 0 0 0 0 0 1 0 ...                                       
##  $ b_sle            : int  0 0 0 0 0 0 0 0 0 1 ...                                       
##  $ b_treatedhyp     : int  0 0 0 0 0 0 0 0 0 0 ...                                       
##  $ b_type1          : int  0 0 0 0 0 0 0 0 0 0 ...                                       
##  $ b_type2          : int  0 0 0 0 0 0 0 0 0 0 ...                                       
##  $ weight           : int  70 70 70 70 70 70 70 70 70 70 ...                             
##  $ height           : int  180 180 180 180 180 180 180 180 180 180 ...                   
##  $ ethrisk          : int  2 2 2 2 2 2 2 2 2 2 ...                                       
##  $ fh_cvd           : int  0 0 0 0 0 0 0 0 0 0 ...                                       
##  $ rati             : int  4 4 4 4 4 4 4 4 4 4 ...                                       
##  $ sbp              : int  180 180 180 180 180 180 180 180 180 180 ...                   
##  $ sbps5            : int  20 20 20 20 20 20 20 20 20 20 ...                             
##  $ smoke_cat        : int  1 1 1 1 1 1 1 1 1 1 ...                                       
##  $ surv             : int  10 10 10 10 10 10 10 10 10 10 ...                             
##  $ town             : int  0 0 0 0 0 0 0 0 0 0 ...                                       
##  $ ID               : int  1 2 3 4 5 6 7 8 9 10 ...                                      
                                                                                            </styled-content>

                    <styled-content style="color:#8F5902;font-size:15px;background-color:#F8F8F8; font-style:italic">#See missing value                                                                          
# summary(myData)                                                                           
                                                                                            
#If there is any missing value                                                              
#please use methods (e.g. multiple imputation) to impute missing value                      
                                                                                            
#Once there is no missing value                                                             
#Get all variable names in your data                                                        
# colnames(myData)                                                                          
                                                                                            
#Use help of this package to map your variable to QRISK3 variables                          
# ?QRISK3_2017                                                                              </styled-content>
                </preformat>
            </p>
            <p>
                <bold>
                    <italic toggle="yes">3. Call the QRISK3 function to calculate risk score</italic>
                </bold>
            </p>
            <p>
                <preformat orientation="portrait" position="float" preformat-type="computer code" xml:space="preserve">
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">test_all_rst &lt;- </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8; font-weight:bold"> QRISK3_2017</styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">(data= </styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">myData, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">patid=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"ID"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">gender=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"gender"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,</styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">age=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"age"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                     </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">atrial_fibrillation=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_AF"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">atypical_antipsy=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_atypicalantipsy"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                                     </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">regular_steroid_tablets=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_corticosteroids"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">erectile_disfunction=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_impotence2"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                     </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">migraine=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_migraine"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">rheumatoid_arthritis=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_ra"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                                                   </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">chronic_kidney_disease=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_renal"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">severe_mental_illness=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_semi"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                                     </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">systemic_lupus_erythematosis=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_sle"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                                                                 </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">blood_pressure_treatment=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_treatedhyp"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">diabetes1=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_type1"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                                         </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">diabetes2=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"b_type2"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">weight=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"weight"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">height=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"height"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                                                </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">ethiniciy=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"ethrisk"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">heart_attack_relative=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"fh_cvd"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                                                  </styled-content> 

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">cholesterol_HDL_ratio=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"rati"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">systolic_blood_pressure=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"sbp"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">,                                          </styled-content>

                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">std_systolic_blood_pressure=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"sbps5"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">smoke=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"smoke_cat"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">, </styled-content>
                    <styled-content style="color:#204A87;font-size:15px;background-color:#F8F8F8">townsend=</styled-content>
                    <styled-content style="color:#4E9A06;font-size:15px;background-color:#F8F8F8">"town"</styled-content>
                    <styled-content style="color:#000000;font-size:15px;background-color:#F8F8F8">)                              
##                                                                                                    
## This R package was based on open-sourced original QRISK3-2017 algorithm.                           
## &lt;https://qrisk.org/three/src.php&gt; Copyright 2017 ClinRisk Ltd.                                     
##                                                                                                    
## The risk score calculated from this R package can only be used for  research purpose.              
##                                                                                                    
## Please refer to QRISK3 website for more information                                                
## &lt;https://qrisk.org/three/index.php&gt;                                                                
##                                                                                                    
## Important: Please double check whether your variables are coded the same as the QRISK3 calculator  
##                                                                                                    
## Height should have unit as (cm)                                                                    
## Weight should have unit as (kg)                                                                    
##                                                                                                    
## Ethnicity should be coded as:                                                                      
##    Ethnicity_category Ethnicity                                                                    
## 1 White or not stated         1                                                                   
## 2              Indian         2                                                                   
## 3           Pakistani         3                                                                   
## 4         Bangladeshi         4                                                                   
## 5         Other Asian         5                                                                   
## 6     Black Caribbean         6                                                                   
##                                                                                                    
## Smoke should be coded as:                                                                          
##                Smoke_category Smoke                                                                
## 1                  non-smoker     1                                                                
## 2                   ex-smoker     2                                                                
## 3 light smoker (less than 10)     3                                                                
## 4  moderate smoker (10 to 19)     4                                                                
## 5   heavy smoker (20 or over)     5                                                                
##                                                                                                    
## The head of result in all patients is:                                                             
##   ID QRISK3_2017 QRISK3_2017_1digit                                                                
## 1  1    17.22985               17.2                                                                
## 2  2    17.89260               17.9                                                                
## 3  3    36.02081               36.0                                                                
## 4  4    21.60346               21.6                                                                
## 5  5    24.06195               24.1                                                                
## 6  6    17.22985               17.2                                                                </styled-content>
</preformat>
</p>
        </sec>
        <sec>
            <title>Use case</title>
            <p>Users first need to create a statistical analysis dataset similar to the provided test dataset (e.g. QRISK3_2019_test) which contains information of patients&#x2019; identifier and QRISK3 risk factors and mimics QRISK3&#x2019;s training cohort
                <sup>
                    <xref ref-type="bibr" rid="ref-3">3</xref>
                </sup>. The structure of this statistical analysis dataset should be set out so that each row (observation) represents one individual patient and each column represents one QRISK3 predictor. The exact definition of all QRISK3 predictors can be found from Box 1 of the original QRISK3 paper
                <sup>
                    <xref ref-type="bibr" rid="ref-3">3</xref>
                </sup>. Variables used by QRISK3 can be extracted from EHR databases, such as CPRD
                <sup>
                    <xref ref-type="bibr" rid="ref-21">21</xref>
                </sup> or QResearch
                <sup>
                    <xref ref-type="bibr" rid="ref-22">22</xref>
                </sup>. Code lists (Read code) for the outcome variable (CVD) can be obtained from the supplementary materials of the QRISK3 paper
                <sup>
                    <xref ref-type="bibr" rid="ref-3">3</xref>
                </sup>. Code lists for variables included in QRISK2 can be extracted from a previous study
                <sup>
                    <xref ref-type="bibr" rid="ref-23">23</xref>
                </sup>. Code lists for other variables including anxiety, alcohol abuse, atypical anti-psychotic medication, erectile dysfunction, HIV/AIDS, left ventricular hypertrophy, migraine and systemic lupus erythematosus could be found from CPRD
                <sup>
                    <xref ref-type="bibr" rid="ref-24">24</xref>
                </sup> or clinical codes website
                <sup>
                    <xref ref-type="bibr" rid="ref-25">25</xref>
                </sup>. All CVD risk factors should be coded as numeric, binary variables should be coded as 0 or 1, categorical variables such as smoking status should be coded as the same as this package. Any differences between users&#x2019; variables and QRISK3 predictors (e.g. different criteria to define smoking status) should be mentioned in users&#x2019; final report. Once the analysis dataset was extracted, it is recommended to compare the distribution of users&#x2019; analysis dataset to Qresearch&#x2019;s cohort using their baseline table
                <sup>
                    <xref ref-type="bibr" rid="ref-3">3</xref>,
                    <xref ref-type="bibr" rid="ref-26">26</xref>
                </sup>. Missing values should be imputed with multiple imputation
                <sup>
                    <xref ref-type="bibr" rid="ref-27">27</xref>
                </sup>. Finally, users should follow the above workflow and carefully match their variable names to pre-defined QRISK3 predictors to calculate risk score. The function will return a dataset with patient identifier, calculated score and calculated score with 1 digit.</p>
        </sec>
        <sec sec-type="discussion">
            <title>Discussion</title>
            <p>This R package successfully implements the QRISK3 algorithm into R, which allows researchers to calculate CVD risk of patients in the next 10 years. The R package was validated by the original algorithm and a SAS version. This is also the first R implementation of the QRISK3 algorithm at the date of writing.</p>
            <p>Though QRISK3 was already published and released from the online website, it is time consuming for researchers to calculate QRISK3 risk score, as the online calculator cannot be used as a service to obtain QRISK3 scores for a large cohort, and the original algorithm is written in C rather than a well-established data science language such as R. This package bridges this gap. It allows researchers to obtain QRISK3 scores for large cohorts, which could help to improve model accuracy of QRISK3 and help with any more applied tasks that require knowing CVD risk at a patient level.</p>
            <p>Although it is easy to use this R function to calculate a risk score, researchers should carefully check whether their variables are coded the same as the original QRISK3 cohort, otherwise the calculated score might not be the correct risk of the patient in the cohort. For example, a patient who is a smoker is coded as &#x201c;1&#x201d; in the variable &#x201c;smoking&#x201d; would be in conflict with the definition of the QRISK3 algorithm (&#x201c;smoking&#x201d; equals 1 in this R package means non-smoker). Since QRISK is updated annually every spring, researchers who are interested in the latest work should refer to their website
                <sup>
                    <xref ref-type="bibr" rid="ref-10">10</xref>
                </sup>.</p>
            <p>In conclusion, we developed this R package to allow researchers to obtain QRISK3 scores for large cohorts. It allows the research community to better understand and apply a currently used risk prediction model for CVD risk.</p>
        </sec>
        <sec>
            <title>Data availability</title>
            <sec>
                <title>Underlying data</title>
                <p>Original QRISK3 algorithm: 
                    <ext-link ext-link-type="uri" xlink:href="https://qrisk.org/three/src.php">https://qrisk.org/three/src.php</ext-link>
				</p>
            </sec>
        </sec>
        <sec>
            <title>Software availability</title>
            <p>Package available from CRAN: 
                <ext-link ext-link-type="uri" xlink:href="https://cran.r-project.org/web/packages/QRISK3/index.html">https://cran.r-project.org/web/packages/QRISK3/index.html</ext-link>
			</p>
            <p>Source code available from: 
                <ext-link ext-link-type="uri" xlink:href="https://github.com/YanLiUK/QRISK3">https://github.com/YanLiUK/QRISK3</ext-link>
			</p>
            <p>Archived source code as at time of publication: 
                <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.5281/zenodo.3570682">https://doi.org/10.5281/zenodo.3570682</ext-link>
                <sup>
                    <xref ref-type="bibr" rid="ref-28">28</xref>
                </sup>
            </p>
            <p>License: GPL-3</p>
            <p>C source code, SAS version and QRISK3_2017_test and QRISK3_2019_test datasets used for validation available from: 
                <ext-link ext-link-type="uri" xlink:href="https://github.com/YanLiUK/QRISK3_valid">https://github.com/YanLiUK/QRISK3_valid</ext-link>
			</p>
            <p>Archived C code, SAS version and test datasets as at time of publication: 
                <ext-link ext-link-type="uri" xlink:href="https://doi.org/10.5281/zenodo.3571304">https://doi.org/10.5281/zenodo.3571304</ext-link>
                <sup>
                    <xref ref-type="bibr" rid="ref-29">29</xref>
                </sup>
            </p>
            <p>License: GPL-3</p>
        </sec>
    </body>
    <back>
        <ref-list>
            <ref id="ref-1">
                <label>1</label>
                <mixed-citation publication-type="journal">
                    <article-title>Cardiovascular diseases (CVDs).</article-title>Accessed November 16, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://www.who.int/news-room/fact-sheets/detail/cardiovascular-diseases-(cvds)">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-2">
                <label>2</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Grant</surname>
                            <given-names>SW</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Collins</surname>
                            <given-names>GS</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Nashef</surname>
                            <given-names>SAM</given-names>
                        </name>
</person-group>:
                    <article-title>Statistical Primer: developing and validating a risk prediction model.</article-title>
                    <source>

                        <italic toggle="yes">Eur J Cardiothorac Surg.</italic>
</source>
                    <year>2018</year>;<volume>54</volume>(<issue>2</issue>):<fpage>203</fpage>&#x2013;<lpage>208</lpage>.
                    <pub-id pub-id-type="pmid">29741602</pub-id>
                    <pub-id pub-id-type="doi">10.1093/ejcts/ezy180</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-3">
                <label>3</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Hippisley-Cox</surname>
                            <given-names>J</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Coupland</surname>
                            <given-names>C</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Brindle</surname>
                            <given-names>P</given-names>
                        </name>
</person-group>:
                    <article-title>Development and validation of QRISK3 risk prediction algorithms to estimate future risk of cardiovascular disease: prospective cohort study.</article-title>
                    <source>

                        <italic toggle="yes">BMJ.</italic>
</source>
                    <year>2017</year>;<volume>357</volume>:<fpage>j2099</fpage>.
                    <pub-id pub-id-type="pmid">28536104</pub-id>
                    <pub-id pub-id-type="doi">10.1136/bmj.j2099</pub-id>
                    <pub-id pub-id-type="pmcid">5441081</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-4">
                <label>4</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Collins</surname>
                            <given-names>GS</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Altman</surname>
                            <given-names>DG</given-names>
                        </name>
</person-group>:
                    <article-title>An independent and external validation of QRISK2 cardiovascular disease risk score: a prospective open cohort study.</article-title>
                    <source>

                        <italic toggle="yes">BMJ.</italic>
</source>
                    <year>2010</year>;<volume>340</volume>:<fpage>c2442</fpage>.
                    <pub-id pub-id-type="pmid">20466793</pub-id>
                    <pub-id pub-id-type="doi">10.1136/bmj.c2442</pub-id>
                    <pub-id pub-id-type="pmcid">2869403</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-5">
                <label>5</label>
                <mixed-citation publication-type="journal">
                    <article-title>CVD risk assessment and management - NICE CKS.</article-title>Accessed November 16, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://cks.nice.org.uk/cvd-risk-assessment-and-management#!scenario:2">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-6">
                <label>6</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Cox</surname>
                            <given-names>DR</given-names>
                        </name>
</person-group>:
                    <article-title>Regression Models and Life-Tables.</article-title>
                    <year>1972</year>;<volume>34</volume>: Accessed February 21, 2019.
                    <ext-link ext-link-type="uri" xlink:href="http://www.stat.cmu.edu/~ryantibs/journalclub/cox_1972.pdf">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-7">
                <label>7</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Li</surname>
                            <given-names>Y</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Sperrin</surname>
                            <given-names>M</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Belmonte</surname>
                            <given-names>M</given-names>
                        </name>

                        <etal/>
</person-group>:
                    <article-title>Do population-level risk prediction models that use routinely collected health data reliably predict individual risks?</article-title>
                    <source>

                        <italic toggle="yes">Sci Rep.</italic>
</source>
                    <year>2019</year>;<volume>9</volume>(<issue>1</issue>):<fpage>11222</fpage>.
                    <pub-id pub-id-type="pmid">31375726</pub-id>
                    <pub-id pub-id-type="doi">10.1038/s41598-019-47712-5</pub-id>
                    <pub-id pub-id-type="pmcid">6677736</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-8">
                <label>8</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Pate</surname>
                            <given-names>A</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Emsley</surname>
                            <given-names>R</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Ashcroft</surname>
                            <given-names>D</given-names>
                        </name>

                        <etal/>
</person-group>:
                    <article-title>The uncertainty with using risk prediction models for individual decision making: an exemplar cohort study examining the prediction of cardiovascular disease in English primary care.</article-title>
                    <source>

                        <italic toggle="yes">BMC Med.</italic>
</source>
                    <year>2019</year>;<volume>17</volume>(<issue>1</issue>):<fpage>134</fpage>.
                    <pub-id pub-id-type="pmid">31311543</pub-id>
                    <pub-id pub-id-type="doi">10.1186/s12916-019-1368-8</pub-id>
                    <pub-id pub-id-type="pmcid">6636064</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-9">
                <label>9</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Li</surname>
                            <given-names>Y</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Sperrin</surname>
                            <given-names>M</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Martin</surname>
                            <given-names>GP</given-names>
                        </name>

                        <etal/>
</person-group>:
                    <article-title>Examining the impact of data quality and completeness of electronic health records on predictions of patients' risks of cardiovascular disease.</article-title>
                    <source>

                        <italic toggle="yes">Int J Med Inform.</italic>
</source>
                    <year>2020</year>;<volume>133</volume>:<fpage>104033</fpage>.
                    <pub-id pub-id-type="pmid">31785526</pub-id>
                    <pub-id pub-id-type="doi">10.1016/j.ijmedinf.2019.104033</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-10">
                <label>10</label>
                <mixed-citation publication-type="journal">
                    <article-title>QRISK3.</article-title>Accessed November 16, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://qrisk.org/three/">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-11">
                <label>11</label>
                <mixed-citation publication-type="journal">
                    <ext-link ext-link-type="uri" xlink:href="https://qrisk.org/three/src.php">https://qrisk.org/three/src.php</ext-link>. Accessed November 16, 2019.</mixed-citation>
            </ref>
            <ref id="ref-12">
                <label>12</label>
                <mixed-citation publication-type="journal">
                    <article-title>R: The R Project for Statistical Computing. </article-title>Accessed April 28, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://www.r-project.org/">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-13">
                <label>13</label>
                <mixed-citation publication-type="journal">
                    <article-title>SAS&#x00ae; 9.4 Statements: Reference, Fifth Edition. </article-title>Accessed August 20, 2017.
                    <ext-link ext-link-type="uri" xlink:href="http://support.sas.com/documentation/cdl/en/lestmtsref/69738/HTML/default/viewer.htm#n1i8w2bwu1fn5kn1gpxj18xttbb0.htm">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-14">
                <label>14</label>
                <mixed-citation publication-type="journal">
                    <article-title>R Installation and Administration.</article-title>Accessed November 17, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://cran.r-project.org/doc/manuals/r-release/R-admin.html">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-15">
                <label>15</label>
                <mixed-citation publication-type="journal">
                    <article-title>Submitting your first package to CRAN, my experience | R-bloggers.</article-title>Accessed November 17, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://www.r-bloggers.com/submitting-your-first-package-to-cran-my-experience">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-16">
                <label>16</label>
                <mixed-citation publication-type="journal">
                    <article-title>Writing an R package from scratch | Not So Standard Deviations.</article-title>Accessed November 17, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://hilaryparker.com/2014/04/29/writing-an-r-package-from-scratch/">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-17">
                <label>17</label>
                <mixed-citation publication-type="journal">
                    <article-title>R package primer. </article-title>Accessed November 17, 2019.
                    <ext-link ext-link-type="uri" xlink:href="http://kbroman.org/pkg_primer/">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-18">
                <label>18</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Collins</surname>
                            <given-names>D</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Lee</surname>
                            <given-names>J</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Bobrovitz</surname>
                            <given-names>N</given-names>
                        </name>

                        <etal/>
</person-group>:
                    <article-title>whoishRisk &#x2013; an R package to calculate WHO/ISH cardiovascular risk scores for all epidemiological subregions of the world [version 2; peer review: 3 approved].</article-title>
                    <source>

                        <italic toggle="yes">F1000Res.</italic>
</source>
                    <year>2016</year>;<volume>5</volume>:<fpage>2522</fpage>.
                    <pub-id pub-id-type="pmid">28357040</pub-id>
                    <pub-id pub-id-type="doi">10.12688/f1000research.9742.2</pub-id>
                    <pub-id pub-id-type="pmcid">5345772</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-19">
                <label>19</label>
                <mixed-citation publication-type="journal">
                    <article-title>CRAN - Package QRISK3. </article-title>Accessed December 8, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://cran.r-project.org/web/packages/QRISK3/index.html">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-20">
                <label>20</label>
                <mixed-citation publication-type="journal">
                    <article-title>YanLiUK/QRISK3: A QRISK3 R package implements QRISK3 algorithm into R. </article-title>Accessed December 12, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://github.com/YanLiUK/QRISK3">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-21">
                <label>21</label>
                <mixed-citation publication-type="journal">
                    <article-title>Clinical Practice Research Datalink - CPRD.</article-title>Accessed August 20, 2017.
                    <ext-link ext-link-type="uri" xlink:href="https://www.cprd.com/">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-22">
                <label>22</label>
                <mixed-citation publication-type="journal">
                    <article-title>Home - QResearch. </article-title>Accessed December 8, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://www.qresearch.org/">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-23">
                <label>23</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>van Staa</surname>
                            <given-names>TP</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Gulliford</surname>
                            <given-names>M</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Ng</surname>
                            <given-names>ES</given-names>
                        </name>

                        <etal/>
</person-group>:
                    <article-title>Prediction of cardiovascular risk using Framingham, ASSIGN and QRISK2: how well do they predict individual rather than population risk?</article-title>
                    <source>

                        <italic toggle="yes">PLoS One.</italic>
</source>
                    <year>2014</year>;<volume>9</volume>(<issue>10</issue>):<fpage>e106455</fpage>.
                    <pub-id pub-id-type="pmid">25271417</pub-id>
                    <pub-id pub-id-type="doi">10.1371/journal.pone.0106455</pub-id>
                    <pub-id pub-id-type="pmcid">4182667</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-24">
                <label>24</label>
                <mixed-citation publication-type="journal">
                    <article-title>CPRD @ Cambridge - Code Lists - Primary Care Unit. </article-title>Accessed November 18, 2019.
                    <ext-link ext-link-type="uri" xlink:href="http://www.phpc.cam.ac.uk/pcu/cprd_cam/codelists/">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-25">
                <label>25</label>
                <mixed-citation publication-type="journal">
                    <article-title>ClinicalCodes Repository.</article-title>Accessed November 18, 2019.
                    <ext-link ext-link-type="uri" xlink:href="https://clinicalcodes.rss.mhs.man.ac.uk/">Reference Source</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-26">
                <label>26</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Pate</surname>
                            <given-names>A</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Emsley</surname>
                            <given-names>R</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Ashcroft</surname>
                            <given-names>DM</given-names>
                        </name>

                        <etal/>
</person-group>:
                    <article-title>The uncertainty with using risk prediction models for individual decision making: an exemplar cohort study examining the prediction of cardiovascular disease in English primary care.</article-title>
                    <source>

                        <italic toggle="yes">BMC Med.</italic>
</source>
                    <year>2019</year>;<volume>17</volume>(<issue>1</issue>):<fpage>134</fpage>.
                    <pub-id pub-id-type="pmid">31311543</pub-id>
                    <pub-id pub-id-type="doi">10.1186/s12916-019-1368-8</pub-id>
                    <pub-id pub-id-type="pmcid">6636064</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-27">
                <label>27</label>
                <mixed-citation publication-type="journal">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>Sterne</surname>
                            <given-names>JA</given-names>
                        </name>

                        <name name-style="western">
                            <surname>White</surname>
                            <given-names>IR</given-names>
                        </name>

                        <name name-style="western">
                            <surname>Carlin</surname>
                            <given-names>JB</given-names>
                        </name>

                        <etal/>
</person-group>:
                    <article-title>Multiple imputation for missing data in epidemiological and clinical research: potential and pitfalls.</article-title>
                    <source>

                        <italic toggle="yes">BMJ.</italic>
</source>
                    <year>2009</year>;<volume>338</volume>:<fpage>b2393</fpage>.
                    <pub-id pub-id-type="pmid">19564179</pub-id>
                    <pub-id pub-id-type="doi">10.1136/bmj.b2393</pub-id>
                    <pub-id pub-id-type="pmcid">2714692</pub-id>
                </mixed-citation>
            </ref>
            <ref id="ref-28">
                <label>28</label>
                <mixed-citation publication-type="data">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>YanLiUK</surname>
                        </name>
</person-group>:
                    <article-title>YanLiUK/QRISK3 v1.0.0 (Version v1.0.0).</article-title>
                    <source>

                        <italic toggle="yes">Zenodo.</italic>
</source>
                    <year>2019</year>.
                    <ext-link ext-link-type="uri" xlink:href="http://www.doi.org/10.5281/zenodo.3570682">http://www.doi.org/10.5281/zenodo.3570682</ext-link>
                </mixed-citation>
            </ref>
            <ref id="ref-29">
                <label>29</label>
                <mixed-citation publication-type="data">
                    <person-group person-group-type="author">

                        <name name-style="western">
                            <surname>YanLiUK</surname>
                        </name>
</person-group>:
                    <article-title>YanLiUK/QRISK3_valid: QRISK3_valid (Version v1.0.0).</article-title>
                    <source>

                        <italic toggle="yes">Zenodo.</italic>
</source>
                    <year>2019</year>.
                    <ext-link ext-link-type="uri" xlink:href="http://www.doi.org/10.5281/zenodo.3571304">http://www.doi.org/10.5281/zenodo.3571304</ext-link>
                </mixed-citation>
            </ref>
        </ref-list>
    </back>
    <sub-article article-type="reviewer-report" id="report59681">
        <front-stub>
            <article-id pub-id-type="doi">10.5256/f1000research.23899.r59681</article-id>
            <title-group>
                <article-title>Reviewer response for version 1</article-title>
            </title-group>
            <contrib-group>
                <contrib contrib-type="author">
                    <name>
                        <surname>Jafari</surname>
                        <given-names>Mohieddin</given-names>
                    </name>
                    <xref ref-type="aff" rid="r59681a1">1</xref>
                    <role>Referee</role>
                    <uri content-type="orcid">https://orcid.org/0000-0002-6991-8587</uri>
                </contrib>
                <contrib contrib-type="author">
                    <name>
                        <surname>Amiryousefi</surname>
                        <given-names>Ali</given-names>
                    </name>
                    <xref ref-type="aff" rid="r59681a1">1</xref>
                    <role>Co-referee</role>
                </contrib>
                <aff id="r59681a1">
                    <label>1</label>University of Helsinki, Helsinki, Finland</aff>
            </contrib-group>
            <author-notes>
                <fn fn-type="conflict">
                    <p>
                        <bold>Competing interests: </bold>No competing interests were disclosed.</p>
                </fn>
            </author-notes>
            <pub-date pub-type="epub">
                <day>12</day>
                <month>2</month>
                <year>2020</year>
            </pub-date>
            <permissions>
                <copyright-statement>Copyright: &#x00a9; 2020 Jafari M and Amiryousefi A</copyright-statement>
                <copyright-year>2020</copyright-year>
                <license xlink:href="https://creativecommons.org/licenses/by/4.0/">
                    <license-p>This is an open access peer review report distributed under the terms of the Creative Commons Attribution Licence, which permits unrestricted use, distribution, and reproduction in any medium, provided the original work is properly cited.</license-p>
                </license>
            </permissions>
            <related-article ext-link-type="doi" id="relatedArticleReport59681" related-article-type="peer-reviewed-article" xlink:href="10.12688/f1000research.21679.1"/>
            <custom-meta-group>
                <custom-meta>
                    <meta-name>recommendation</meta-name>
                    <meta-value>reject</meta-value>
                </custom-meta>
            </custom-meta-group>
        </front-stub>
        <body>
            <p>The authors provided an R package for the QRISK3 algorithm to predict the risk of cardiovascular disease. My main comment is related to the size of this package, which has only one simple function with two simple datasets. I am not sure that this tiny package can be presented as an F1000Research article. There are not any new findings represented in this article compared to the author's previous works. I suggest enriching this package with more visualization and data manipulation functions and datasets. Besides, I do not think it needs to highlight validation of R performance with SAS or C. This is part of your quality control, not an outcome. Also, I have some minor comments: 
                <list list-type="order">
                    <list-item>
                        <p>Why didn't you use the R 3.6.2 instead of 3.4.2?</p>
                    </list-item>
                    <list-item>
                        <p>Why you did not make the categorical variables as ordered factor R object instead of a simple numeric object? (in this case, you do not need to think about the conflict of the meaning of "1" and "0").</p>
                    </list-item>
                    <list-item>
                        <p>The range of patient ages is not consistent between text and table.</p>
                    </list-item>
                    <list-item>
                        <p>"Height", "Weight" and "Weight/Height" in table 1 should be lowercase the same as the package.</p>
                    </list-item>
                </list>
            </p>
            <p>Are the conclusions about the tool and its performance adequately supported by the findings presented in the article?</p>
            <p>Yes</p>
            <p>Is the rationale for developing the new software tool clearly explained?</p>
            <p>Yes</p>
            <p>Is the description of the software tool technically sound?</p>
            <p>Yes</p>
            <p>Are sufficient details of the code, methods and analysis (if applicable) provided to allow replication of the software development and its use by others?</p>
            <p>Yes</p>
            <p>Is sufficient information provided to allow interpretation of the expected output datasets and any results generated using the tool?</p>
            <p>Yes</p>
            <p>Reviewer Expertise:</p>
            <p>Computational biologist</p>
            <p>We confirm that we have read this submission and believe that we have an appropriate level of expertise to state that we do not consider it to be of an acceptable scientific standard, for reasons outlined above.</p>
        </body>
        <sub-article article-type="response" id="comment5229-59681">
            <front-stub>
                <contrib-group>
                    <contrib contrib-type="author">
                        <name>
                            <surname>Li</surname>
                            <given-names>Yan</given-names>
                        </name>
                        <aff>University of Manchester, UK</aff>
                    </contrib>
                </contrib-group>
                <author-notes>
                    <fn fn-type="conflict">
                        <p>
                            <bold>Competing interests: </bold>No competing interests should be disclosed.</p>
                    </fn>
                </author-notes>
                <pub-date pub-type="epub">
                    <day>12</day>
                    <month>2</month>
                    <year>2020</year>
                </pub-date>
            </front-stub>
            <body>
                <p>We appreciate reviewers&#x2019; time and effort in review this package paper, we would like to make following reply to these comments.</p>
                <p> 
                    <bold>Reviewer&#x2019;s comments:</bold>
                </p>
                <p> 
                    <italic>The authors provided an R package for the QRISK3 algorithm to predict the risk of cardiovascular disease. My main comment is related to the size of this package, which has only one simple function with two simple datasets. I am not sure that this tiny package can be presented as an F1000Research article. There are not any new findings represented in this article compared to the author's previous works.</italic>
                </p>
                <p> 
                    <bold>Reply: </bold>This implementation of QRISK3 algorithm was needed due to lack of metadata, explanations of variables and accessible source code. There is a need of this R package as researchers cannot easily estimate risks based on the QRISK3 algorithm
                    <sup>1</sup>. This is also the first implementation of QRISK3 into R (validated by SAS and C version) and was approved by CRAN. By the date of 12-02-2020 (67 days since the first release), this R package has been downloaded by 1343 times and rank 42 among total 66 packages which were published in the same day (data available from &#x201c;cranlogs&#x201d;).</p>
                <p> </p>
                <p> We believe the novelty of this package and this paper is:</p>
                <p> </p>
                <p> QRISK3 is different from other model such as Framingham model (one other popular American CVD risk prediction model). For Framingham model, the model formula was simple and clearly presented in its original paper, and user could easily implement it into R. While for QRISK3, this is different and difficult. The main challenge implementing QRISK into R is the original algorithm written in low level language C and there is no document to explain the meaning of these variables in original algorithm. Users also need to validate their implemented version is the same as the original version of QRISK3, this requires users to have programming knowledge of both R and C while R is the dominated language in data science. Therefore, researchers don&#x2019;t have table 1 of this paper if they start to implement QRISK3 from the original algorithm. This creates challenges that it is hard to acquire a similar statistic model formula as presented in Framingham, and it is hard to identify which variable represents what risk factors especially considering they were written in C. For example, how to know variable such as &#x201c;b_impotence2&#x201d;, &#x201c;ethrisk&#x201d; and &#x201c;fh_cvd&#x201d; represents &#x201c;erectile disfunction&#x201d;, &#x201c;ethnicity&#x201d; and &#x201c;relative of CVD&#x201d;. QRISK was used to predict 10 years risk, why there are 11 values in a vector which represents baseline risk from the original algorithm, and which variable represents this baseline risk? There is a long distance between input value of predictors to output a correct predicted risk. This package solved all the challenges mentioned above and bridges the gaps.</p>
                <p> This R package acts like a bridge which enables researchers to easily access and use QRISK3 model in R like using Framingham model.</p>
                <p> Without this R package and this paper described how this R package was developed and validated, researchers may spend months to re-implement QRISK into R and they also need to spend a lot of effort on validating whether their implemented version of QRISK3 does the similar thing as the original algorithm. Overall, our package and this paper solved these, and saved time and energy for researchers who only require calculated QRISK3 score as part of their new research.</p>
                <p> 
                    <bold>Reviewer&#x2019;s comments:</bold>
                </p>
                <p> 
                    <italic>I suggest enriching this package with more visualization and data manipulation functions and datasets. Besides, I do not think it needs to highlight validation of R performance with SAS or C. This is part of your quality control, not an outcome. Also, I have some minor comments:</italic>
                </p>
                <p> 
                    <bold>Reply: </bold>We appreciate reviewers&#x2019; suggestion, but this package was a simple implementation of QRISK3 algorithm. We decide to make this package as simple as we can as: 
                    <list list-type="order">
                        <list-item>
                            <p>It would be easier for user to quickly obtain QRISK3 score. Rather than searching a list of redundant functions, user could instantly test and use this package. &#x00a0;</p>
                        </list-item>
                        <list-item>
                            <p>There are mature R packages which support reviewer suggested functions. Due to the nature of this R package (i.e. only write with base R language without dependent packages), it is well compatible to all the other R packages. For visualization, users could easily use R package like &#x201c;ggplot2&#x201d; with this R package. For data manipulation, R package like &#x201c;dplyr&#x201d; is well compatible to our package.</p>
                        </list-item>
                        <list-item>
                            <p>The main function of this R package is to provide QRISK3 calculated risk score. What visualization and datasets user might require were purely dependent on their research question. In the current version, we have provided a dataset with patient identifier and calculated QRISK score, which could be easily used by researchers to draw their own visualization. &#x00a0;</p>
                        </list-item>
                    </list> Though there are only two datasets present in this package, it contains all the key information of what the datasets would look like and what variables were needed. They contain enough information for user to understand and use this package easily. Overall, simplistic is a part of design of this R package and there are well established R packages which could be used with this simple R package. We do not find any necessary reasons to add more functions in this R package, as the aim of this R package is to help users to obtain a QRISK3 score from large dataset quickly and current version fulfilled this purpose. We are happy to add more functions or tools if there are more specific requirements from users in future.</p>
                <p> </p>
                <p> We also believe it is essential to show user how this R package was validated with the original algorithm, as this R package aims to provide a correct QRISK3 predicted score. Users who decide to use our package may wish to replicate our validation process.</p>
                <p> 
                    <bold>Reviewer&#x2019;s comments:</bold>
                </p>
                <p> 
                    <italic>Why didn't you use the R 3.6.2 instead of 3.4.2?</italic>
                </p>
                <p> 
                    <bold>Reply:</bold> R 3.4.2 was used to develop the prototype of this R package in 2017. However, all functions in this package used R base language, so it can be used in any R version including 3.6.2 (tested).</p>
                <p> 
                    <bold>Reviewer&#x2019;s comments:</bold>
                </p>
                <p> 
                    <italic>Why you did not make the categorical variables as ordered factor R object instead of a simple numeric object? (in this case, you do not need to think about the conflict of the meaning of "1" and "0")</italic>.</p>
                <p> 
                    <bold>Reply:</bold> This was due to how QRISK3 score was calculated. It was calculated from a mathematic formula where we need to calculate a linear predictor which requires numeric value of predictors. We coded all variables into numeric rather than some are numeric, and some are factor is for the ease of users (follow the simplistic principle). In this case, users would know all variables need to be numeric rather than to remember which variable should be a factor especially when there are over 20 predictors in the model. We also provided an automate function to help user double check which variables were not coded into numeric. However, we do realize that we may never prevent all unforeseen mistake, so we highlight this in descriptions of both of paper and package.&#x00a0;</p>
                <p> 
                    <bold>Reviewer&#x2019;s comments:</bold>
                </p>
                <p> 
                    <italic>The range of patient ages is not consistent between text and table.</italic>
                </p>
                <p> 
                    <bold>Reply:</bold> thanks. Corrected in the next version.</p>
                <p> 
                    <bold>Reviewer&#x2019;s comments:</bold>
                </p>
                <p> 
                    <italic>"Height", "Weight" and "Weight/Height" in table 1 should be lowercase the same as the package.</italic>
                </p>
                <p> 
                    <bold>Reply:</bold> thanks. Updated. &#x00a0;</p>
                <p> 
                    <bold>Other reviewer&#x2019;s comments:</bold>
                </p>
                <p> 
                    <italic>Is the rationale for developing the new software tool clearly explained?</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Yes</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Is the description of the software tool technically sound?</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Yes</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Are sufficient details of the code, methods and analysis (if applicable) provided to allow replication of the software development and its use by others?</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Yes</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Is sufficient information provided to allow interpretation of the expected output datasets and any results generated using the tool?</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Yes</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Are the conclusions about the tool and its performance adequately supported by the findings presented in the article?</italic>
                </p>
                <p>
                    <italic> &#x00a0;</italic>
                </p>
                <p>
                    <italic> Yes</italic>
                </p>
                <p> 
                    <bold>References</bold>
                </p>
                <p> 1. &#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0;&#x00a0; I need SAS, or SPSS or Stata or R code for&#x202f;:Two cardiac risk scores: QRISK and SCORE . May you share? https://www.researchgate.net/post/I_need_SAS_or_SPSS_or_Stata_or_R_code_for_Two_cardiac_risk_scores_QRISK_and_SCORE_May_you_share. Accessed February 12, 2020.</p>
            </body>
        </sub-article>
    </sub-article>
</article>
