<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE article PUBLIC "-//NLM//DTD Journal Publishing DTD v2.3 20070202//EN" "journalpublishing.dtd">
<article article-type="research-article" dtd-version="2.3" xml:lang="EN" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:xlink="http://www.w3.org/1999/xlink">
<front>
<journal-meta>
<journal-id journal-id-type="publisher-id">J. Pharm. Pharm. Sci</journal-id>
<journal-title>Journal of Pharmacy &#x26; Pharmaceutical Sciences</journal-title>
<abbrev-journal-title abbrev-type="pubmed">J. Pharm. Pharm. Sci</abbrev-journal-title>
<issn pub-type="epub">1482-1826</issn>
<publisher>
<publisher-name>Frontiers Media S.A.</publisher-name>
</publisher>
</journal-meta>
<article-meta>
<article-id pub-id-type="publisher-id">12095</article-id>
<article-id pub-id-type="doi">10.3389/jpps.2023.12095</article-id>
<article-categories>
<subj-group subj-group-type="heading">
<subject>Science archive</subject>
<subj-group>
<subject>Original Research</subject>
</subj-group>
</subj-group>
</article-categories>
<title-group>
<article-title>Comparing broad and narrow phenotype algorithms: differences in performance characteristics and immortal time incurred</article-title>
<alt-title alt-title-type="left-running-head">Swerdel and Conover</alt-title>
<alt-title alt-title-type="right-running-head">
<ext-link ext-link-type="uri" xlink:href="https://doi.org/10.3389/jpps.2023.12095">10.3389/jpps.2023.12095</ext-link>
</alt-title>
</title-group>
<contrib-group>
<contrib contrib-type="author" corresp="yes">
<name>
<surname>Swerdel</surname>
<given-names>Joel N.</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
<xref ref-type="corresp" rid="c001">&#x2a;</xref>
<uri xlink:href="https://loop.frontiersin.org/people/2291809/overview"/>
</contrib>
<contrib contrib-type="author">
<name>
<surname>Conover</surname>
<given-names>Mitchell M.</given-names>
</name>
<xref ref-type="aff" rid="aff1">
<sup>1</sup>
</xref>
<xref ref-type="aff" rid="aff2">
<sup>2</sup>
</xref>
</contrib>
</contrib-group>
<aff id="aff1">
<sup>1</sup>
<institution>Observational Health Data Analytics</institution>, <institution>Global Epidemiology</institution>, <institution>Janssen Research and Development</institution>, <addr-line>Titusville</addr-line>, <addr-line>NJ</addr-line>, <country>United States</country>
</aff>
<aff id="aff2">
<sup>2</sup>
<institution>Observational Health Data Sciences and Informatics</institution>, <addr-line>New York</addr-line>, <addr-line>NY</addr-line>, <country>United States</country>
</aff>
<author-notes>
<fn fn-type="edited-by">
<p>
<bold>Edited by:</bold> <ext-link ext-link-type="uri" xlink:href="https://loop.frontiersin.org/people/2197306/overview">Jesse Berlin</ext-link>, Rutgers, The State University of New Jersey, United States</p>
</fn>
<corresp id="c001">&#x2a;Correspondence: Joel N. Swerdel, <email>jswerdel@its.jnj.com</email>
</corresp>
</author-notes>
<pub-date pub-type="epub">
<day>03</day>
<month>01</month>
<year>2024</year>
</pub-date>
<pub-date pub-type="collection">
<year>2023</year>
</pub-date>
<volume>26</volume>
<elocation-id>12095</elocation-id>
<history>
<date date-type="received">
<day>22</day>
<month>09</month>
<year>2023</year>
</date>
<date date-type="accepted">
<day>15</day>
<month>12</month>
<year>2023</year>
</date>
</history>
<permissions>
<copyright-statement>Copyright &#xa9; 2024 Swerdel and Conover.</copyright-statement>
<copyright-year>2024</copyright-year>
<copyright-holder>Swerdel and Conover</copyright-holder>
<license xlink:href="http://creativecommons.org/licenses/by/4.0/">
<p>This is an open-access article distributed under the terms of the Creative Commons Attribution License (CC BY). The use, distribution or reproduction in other forums is permitted, provided the original author(s) and the copyright owner(s) are credited and that the original publication in this journal is cited, in accordance with accepted academic practice. No use, distribution or reproduction is permitted which does not comply with these terms.</p>
</license>
</permissions>
<abstract>
<p>
<bold>Introduction:</bold> When developing phenotype algorithms for observational research, there is usually a trade-off between definitions that are sensitive or specific. The objective of this study was to estimate the performance characteristics of phenotype algorithms designed for increasing specificity and to estimate the immortal time associated with each algorithm.</p>
<p>
<bold>Materials and methods:</bold> We examined algorithms for 11 chronic health conditions. The analyses were from data from five databases. For each health condition, we created five algorithms to examine performance (sensitivity and positive predictive value (PPV)) differences: one broad algorithm using a single code for the health condition and four narrow algorithms where a second diagnosis code was required 1&#x2013;30&#xa0;days, 1&#x2013;90&#xa0;days, 1&#x2013;365&#xa0;days, or 1- all days in a subject&#x2019;s continuous observation period after the first code. We also examined the proportion of immortal time relative to time-at-risk (TAR) for four outcomes. The TAR&#x2019;s were: 0&#x2013;30&#xa0;days after the first condition occurrence (the index date), 0&#x2013;90&#xa0;days post-index, 0&#x2013;365&#xa0;days post-index, and 0&#x2013;1,095&#xa0;days post-index. Performance of algorithms for chronic health conditions was estimated using PheValuator (V2.1.4) from the OHDSI toolstack. Immortal time was calculated as the time from the index date until the first of the following: 1) the outcome; 2) the end of the outcome TAR; 3) the occurrence of the second code for the chronic health condition.</p>
<p>
<bold>Results:</bold> In the first analysis, the narrow phenotype algorithms, i.e., those requiring a second condition code, produced higher estimates for PPV and lower estimates for sensitivity compared to the single code algorithm. In all conditions, increasing the time to the required second code increased the sensitivity of the algorithm. In the second analysis, the amount of immortal time increased as the window used to identify the second diagnosis code increased. The proportion of TAR that was immortal was highest in the 30&#xa0;days TAR analyses compared to the 1,095&#xa0;days TAR analyses.</p>
<p>
<bold>Conclusion:</bold> Attempting to increase the specificity of a health condition algorithm by adding a second code is a potentially valid approach to increase specificity, albeit at the cost of incurring immortal time.</p>
</abstract>
<kwd-group>
<kwd>phenotype algorithms</kwd>
<kwd>immortal time</kwd>
<kwd>validation</kwd>
<kwd>observational data</kwd>
<kwd>bias</kwd>
</kwd-group>
</article-meta>
</front>
<body>
<sec sec-type="intro" id="s1">
<title>Introduction</title>
<p>Phenotype algorithms are often the first component needed to conduct observational research studies. When developing these algorithms, there is usually a trade-off between definitions that are broad, prioritizing a lower number of false negative subjects, and narrow, prioritizing a lower number of false positive subjects. Narrow phenotypes for health conditions ensure that the cohorts selected by the algorithm are more likely to have the health conditions of interest.</p>
<p>A common method for developing narrow phenotypes and thereby increasing the specificity of an algorithm for a health condition is to require a second occurrence of the condition after the initial occurrence, which is the defined date of cohort entry. The required timing of the second code relative to the first is often inconsistent across studies. There are many examples of using this approach. For example, a literature search for algorithms for atrial fibrillation produced 39 research studies using computable phenotype algorithms. Of these, 16 used algorithms that required two or more diagnosis codes for atrial fibrillation. While requiring a second diagnosis code is a common practice, the time between the first and second codes varies widely. For example, O&#x2019;Neal et al. required a second code between 7&#xa0;days and 1&#xa0;year after the first code [<xref ref-type="bibr" rid="B1">1</xref>]. Wilson et al. required a second code any time within 1&#xa0;year from the initial diagnosis code [<xref ref-type="bibr" rid="B2">2</xref>]. Willey et al. required two diagnosis codes within the 3&#xa0;years of their study period [<xref ref-type="bibr" rid="B3">3</xref>].</p>
<p>Algorithms requiring a second code always introduce immortal time into any study utilizing the algorithm. Suissa defines immortal time as &#x201c;a span of cohort follow-up during which, because of exposure definition, the outcome under study could not occur.&#x201d; [<xref ref-type="bibr" rid="B4">4</xref>] Studies that inadvertently or deliberately require immortal time prior to the outcome have been long criticized. These studies commonly begin follow-up after the initiation of treatment, which cannot be confirmed until subsequent events occur after initiation (e.g., a second prescription, an additional therapy or procedure, etc.). Immortal time occurs when the subjects who die, disenroll from the database, or experience the outcome before the second requirement can be satisfied are not included in the analysis. Agarwal et al. discuss the immortal time incurred between a mastectomy and radiation therapy on patient survival [<xref ref-type="bibr" rid="B5">5</xref>]. The time between the surgery and the radiation treatment is considered immortal and must be accounted for in the treatment effect analysis.</p>
<p>Studies that require a second diagnosis code in a phenotype algorithm incur similar immortal time. These studies pose the potential for incorporating immortal time bias into analyses in cases where the data window used to determine inclusion in the cohort overlaps the data window used to assess outcome incidence. When using these algorithms, non-fatal outcomes of interest may occur between the time from the first diagnosis code to the second diagnosis code, as the first code is considered the cohort index date. The principal concern using these algorithms is the occurrence of death, which prevents a second code as required by the algorithm. The bias in this case is due to the possible loss of sicker subjects from the cohort. While these studies are similar to other forms of immortal time incurred in observational research, the effect of requiring a second diagnosis code has not been well studied.</p>
<p>A trade-off exists between the need to increase the likelihood of a research subject having the condition of interest, i.e., increasing specificity, when using the known errors in administrative claims data and the incorporation of immortal time. The objectives of this study were to 1) estimate the performance characteristics of phenotype algorithms that require a second code to increase specificity; 2) to estimate the immortal time associated with each algorithm; and 3) quantify the impact on incidence rate estimates for various outcomes across various time-at-risk definitions.</p>
</sec>
<sec sec-type="materials|methods" id="s2">
<title>Materials and methods</title>
<p>We examined algorithms for the following 11 chronic health conditions: atrial fibrillation, chronic kidney disease, chronic heart failure, coronary artery disease, migraine, multiple myeloma, multiple sclerosis, overactive bladder, plaque psoriasis, psoriatic arthritis, and ulcerative colitis. In this study, these 11 conditions are used as exposures or indications (i.e., the index event that represents entry into the study and the beginning of follow-up time). The analyses were from data from five databases: Merative<sup>&#xae;</sup> MarketScan<sup>&#xae;</sup> Commercial Database (CCAE), Multi-State Medicaid Database (MDCD), and Medicare Supplemental Database (MDCR), Optum<sup>&#xae;</sup>&#x27;s Clinformatics<sup>&#xae;</sup> Data Mart (DOD), and IQVIA<sup>&#xae;</sup> Adjudicated Health Plan Claims Data (formerly PharMetrics Plus)&#x2014;US database (PharMetrics). The results presented in this study are the mean values from the databases used in the analysis. For each health condition, we created five algorithms to examine performance [sensitivity and positive predictive value (PPV)] differences. We created a broad algorithm with a single code for the health condition, which incorporates no immortal time and would potentially have high sensitivity and low specificity. We also created four narrow algorithms with potentially higher specificity (and lower sensitivity) where a second diagnosis code was required at one of four time periods after the first diagnosis code: 1&#x2013;30&#xa0;days, 1&#x2013;90&#xa0;days, 1&#x2013;365&#xa0;days, and 1- all days in a subject&#x2019;s observed data after the first code. In these cohorts, subjects may have the outcome prior to the occurrence of the second code. For these algorithm definitions, the principal concern with immortal time is death or disenrollment rather than missed outcome occurrence. As disenrollment is likely to be health status agnostic, we will focus on death as the main effect of immortal time.</p>
<p>For each algorithm requiring a second code, the time between cohort entry (the first diagnosis) and the required second diagnosis is immortal. We examined the proportion of immortal time relative to time-at-risk (TAR) for four outcomes: death, myocardial infarction, Bell&#x2019;s palsy, and ingrown toenails. For these analyses, we only included data from DOD and MDCD, as these were more reliable for accurately recording death. For each outcome, we used four possible TARs for each chronic health condition: 0&#x2013;30&#xa0;days after the first condition occurrence (the index date), 0&#x2013;90&#xa0;days post-index, 0&#x2013;365&#xa0;days post-index, and 0&#x2013;1,095&#xa0;days post-index. Performance characteristics of algorithms for chronic health conditions were estimated using PheValuator (V2.1.4) from the Observational Health Data Sciences and Informatics (OHDSI) toolstack (for a complete description of this tool).<xref ref-type="fn" rid="fn1">
<sup>1</sup>
</xref> This method uses diagnostic predictive modeling to estimate the probability of subjects being cases of the condition of interest. It provides the complete set of performance characteristics, i.e., sensitivity, specificity, and positive and negative predictive value. Using the semi-automated phenotype algorithm evaluation method PheValuator, we eliminated the need for obtaining and reviewing subject&#x2019;s records. While algorithm validation results from chart review are considered the &#x201c;gold standard,&#x201d; we have compared the results from PheValuator with prior studies using chart review and found excellent agreement between the two methods [<xref ref-type="bibr" rid="B6">6</xref>]. Immortal time was calculated as the time from the index date until the first of the following: 1) the outcome; 2) the end of the outcome TAR; or 3) the occurrence of the second code for the chronic health condition. Total TAR was calculated as the total time across subjects from the index date until the end of TAR. We calculated the proportion of immortal time relative to the total TAR as total immortal time/total TAR. Incidence rates were calculated as the count of the first occurrence of the event for each subject during the TAR divided by the total TAR for all subjects. We used a lookback period (&#x201c;clean window&#x201d;) of a minimum of 365&#xa0;days to designate an incident event.</p>
<p>All phenotype algorithms used in this study were developed using the OHDSI open-source ATLAS tool.<xref ref-type="fn" rid="fn2">
<sup>2</sup>
</xref> Each algorithm is available in a JSON format.<xref ref-type="fn" rid="fn3">
<sup>3</sup>
</xref> The JSON format may be converted into executable SQL using either the ATLAS or CirceR<xref ref-type="fn" rid="fn4">
<sup>4</sup>
</xref> packages.</p>
<p>The preliminary results from this study were originally presented at the Observational Health Data Sciences and Informatics (OHDSI) symposium in 2022 [<xref ref-type="bibr" rid="B7">7</xref>].</p>
</sec>
<sec sec-type="results" id="s3">
<title>Results</title>
<p>In the first analysis, we estimated the sensitivity and PPV for the single-code algorithm and the four algorithms requiring a second condition code for each of the 11 chronic conditions across five databases. The results are shown in <xref ref-type="fig" rid="F1">Figure 1</xref>.</p>
<fig id="F1" position="float">
<label>FIGURE 1</label>
<caption>
<p>Performance characteristics of 11 chronic conditions by phenotype algorithm aggregated across five databases using PheValuator.</p>
</caption>
<graphic xlink:href="jpps-26-12095-g001.tif"/>
</fig>
<p>In each of these conditions, the narrow phenotype algorithms, i.e., those requiring a second condition code, produced higher estimates for PPV and lower estimates for sensitivity compared to the single code algorithm. For all conditions studied, PPV was highest in the algorithm requiring a second code 1&#x2013;365&#xa0;days after index, with moderate decreases in PPV when the second code was allowed to occur any other time after the first. Adding a second code had more of an impact on PPV in some conditions than in others. For example, adding the requirement of a second code 1&#x2013;365&#xa0;days after the index for multiple myeloma produced a 25% increase in PPV (0.71, single code, 0.89, two codes). For chronic kidney disease, adding a second code produced a 3% increase in PPV (0.96, single code, 0.99, two codes). The differences in PPV with any of the four versions of the two-coded algorithms were generally small. The largest difference was observed in psoriatic arthritis, where requiring a second code 1&#x2013;30&#xa0;days after index produced an estimated PPV of 0.85 which increased to 0.93 with the 1&#x2013;365&#xa0;days algorithm (&#x223c;9%).</p>
<p>The improvements in PPV came at the cost of decreased sensitivity. In all conditions, increasing the time to the required second code increased the sensitivity of the algorithm. However, in all conditions, the sensitivity of the two-code algorithms was lower than that of the single-code algorithms, regardless of the required time for the second code. There was substantial variation in the decrease in sensitivity depending on the time required for the second code and the condition type. For conditions with more serious and immediate clinical consequences, there was a smaller drop in sensitivity from the single code algorithm compared to the two-code algorithms for conditions with less critical immediate clinical consequences. For example, for atrial fibrillation, the sensitivity decreased from 0.95 to 0.50 when requiring a code 1&#x2013;30&#xa0;days after index (&#x2212;47%), while for overactive bladder the sensitivity decreased from 0.82 to 0.14 (&#x2212;83%). For the algorithms requiring a second code at 1-all days after index, atrial fibrillation sensitivity decreased from 0.95 to 0.84 (&#x2212;9%); for overactive bladder sensitivity decreased from 0.82 to 0.50 (&#x2212;39%).</p>
<p>In the second analysis, we calculated the proportion of TAR that would be immortal (i.e., time where subjects cannot die or leave the database) for four outcomes and four TARs, with the results for the outcome of death shown in <xref ref-type="fig" rid="F2">Figure 2</xref>.</p>
<fig id="F2" position="float">
<label>FIGURE 2</label>
<caption>
<p>Proportion of immortal time relative to total TAR for atrial fibrillation, migraine, and multiple myeloma with an outcome of death for multiple outcome times-at-risk (TAR) by phenotype algorithm aggregated across five databases using PheValuator.</p>
</caption>
<graphic xlink:href="jpps-26-12095-g002.tif"/>
</fig>
<p>The amount of immortal time in the analysis increased as the window used to identify the second diagnosis code increased. For example, in a 30&#xa0;days TAR incidence rate analysis conducted on cohorts where the second diagnosis code was allowed any time after the first (i.e., 1-ALL), 49%, 75%, and 44% of TAR was immortal for the atrial fibrillation, migraine, and multiple myeloma cohorts, respectively, compared to 23%, 36%, and 27% when the second code was required to occur within 30&#xa0;days of the first. Furthermore, the proportion of TAR that was immortal was highest when the maximum-allowable TAR in the incidence rate analysis was short and decreased as the maximum-allowable TAR increased. The proportion of immortal time was substantially lower for the 1,095&#xa0;days TAR analyses. For migraine cohorts requiring 2 codes, which had the highest proportions of immortal time among our four outcomes, we found the 1,095&#xa0;days TAR analysis had 25% of TAR immortal for cohorts requiring the second code any time after the first code and 2% of TAR immortal for cohorts requiring the second code within 30&#xa0;days of the first code. We found similar results for this analysis in the other three outcomes.</p>
<p>We found different trends for changes in incidence rates for death and ingrown toenail in chronic diseases, depending on the time to second occurrence of condition codes and the outcome TAR. For all target cohorts and both outcomes, we observed higher incidence rate estimates when a second code was required within 30&#xa0;days of the original, which opposes the direction of the bias expected due to immortal person time (which deflates incidence rates). This increase most likely reflects genuinely higher incidence rates of death or ingrown toenail among subjects who have two related codes within 30&#xa0;days of each other. This may be due to subjects who have more frequent encounters with the health system being at higher risk of death and also being more likely to have outcomes captured in the data.</p>
<p>For the mortality analysis (<xref ref-type="fig" rid="F3">Figure 3</xref>), as we extended the time period used to allow for the second code, we observed two phenomena working in the same direction: 1) a reduction in the incidence rate of death due to including subjects who are less intensely medicalized (who didn&#x2019;t have two diagnosis codes in very close proximity to each other) and 2) a false reduction in the incidence rate due to immortal time representing an increasing share of the total TAR. It is impossible to entirely parse these two drivers of change in estimates; however, we can observe that the variation in estimates across algorithms requiring the second code at different intervals was largest for the incidence rate analyses that included the largest proportion of TAR that was immortal.</p>
<fig id="F3" position="float">
<label>FIGURE 3</label>
<caption>
<p>Effect of requiring a second code in phenotype algorithms for atrial fibrillation, migraine, and multiple myeloma on incidence rates of death for multiple outcome times-at-risk (TAR) by phenotype algorithm aggregated across five databases using PheValuator.</p>
</caption>
<graphic xlink:href="jpps-26-12095-g003.tif"/>
</fig>
<p>For ingrown toenail (<xref ref-type="fig" rid="F4">Figure 4</xref>), an outcome that we expected to be much less susceptible to immortal time bias due to its limited association with mortality, we saw much less variation in the incidence rate estimates across the various algorithms requiring a second code within different time windows. This provides some evidence that immortal time is not meaningfully biasing these estimates. Indeed, we still saw an increase in the incidence rate comparing the single-code algorithm to the algorithm requiring a second code within 30&#xa0;days, which indicates that the aforementioned effects of having frequent encounters with the health system are still affecting incidence rate estimates to some degree for ingrown toenails (particularly for the migraine cohorts). However, extending the period used to observe the second code, which we found increased immortal time in the analysis, did not appear to have a meaningful impact on incidence rate estimates. This provides some insight that immortal time should only be of concern for high-mortality cohorts where outcomes are meaningfully associated with the risk of mortality.</p>
<fig id="F4" position="float">
<label>FIGURE 4</label>
<caption>
<p>Effect of requiring a second code in phenotype algorithms for atrial fibrillation, migraine, and multiple myeloma on incidence rates of ingrown toenail for multiple outcome times-at-risk (TAR) by phenotype algorithm aggregated across five databases using PheValuator.</p>
</caption>
<graphic xlink:href="jpps-26-12095-g004.tif"/>
</fig>
</sec>
<sec sec-type="discussion" id="s4">
<title>Discussion</title>
<p>In this study, we examined the effect of creating narrow phenotype algorithms by varying the time to require a second condition code in the algorithm compared to broad algorithms, i.e., those requiring a single code. We found that requiring a second code at any time after the index event (i.e., the occurrence of a condition code for the first time in a subject&#x2019;s history) always increased the positive predictive value and decreased the sensitivity compared to single-code algorithms. Requiring a second code 1&#x2013;365&#xa0;days post-index produced the highest estimates for positive predictive value. Requiring a second code 1&#x2013;30&#xa0;days post-index produced the lowest estimates for sensitivity. In the 11 health conditions we examined, the trade-off of positive predictive value gain to sensitivity loss was lower for certain conditions, particularly those where the single-code algorithm had a high positive predictive value. We also found that requiring a second code invariably adds immortal time to the subjects in these cohorts. The proportion of immortal time relative to the outcome time-at-risk was highest for short outcome times-at-risk and lower for long times-at-risk. Attempting to increase the specificity of a health condition algorithm by adding a second code is a potentially valid approach for the five US databases we tested. However, caution should be observed in analyses where the outcome is death or outcomes highly associated with death due to the necessary incorporation of immortal time, especially in analyses assessing short periods of follow-up.</p>
<p>Bias due to immortal time for incidence rate estimates is a complex function depending on several factors, including the distribution of TAR in the analysis, the background risk of mortality in the target population, the association of the outcome with mortality, and the shape of the hazard function over follow-up [<xref ref-type="bibr" rid="B4">4</xref>, <xref ref-type="bibr" rid="B8">8</xref>]. The impact of using various algorithms requiring a second code on incidence rates of death and ingrown toenails is shown in <xref ref-type="fig" rid="F3">Figures 3</xref>, <xref ref-type="fig" rid="F4">4</xref>, respectively. <italic>A priori</italic>, we expected that the ingrown toenail outcome would likely show limited bias due to immortal time as there should be almost no increased risk of death among people diagnosed with ingrown toenails. Researchers should always consider applying quantitative bias analysis (QBA) to understand the degree of bias incurred using any phenotype algorithm in a study. Many authors have provided guidelines for assessing bias due to immortal time [<xref ref-type="bibr" rid="B9">9</xref>, <xref ref-type="bibr" rid="B10">10</xref>]. Liang et al. provide a useful guide for performing QBA specifically to inform bias incurred by immortal time for non-fatal outcomes [<xref ref-type="bibr" rid="B11">11</xref>]. The work of Lash et al. provides a useful guide for QBA in general [<xref ref-type="bibr" rid="B12">12</xref>]. PheValuator is a useful tool to determine the performance characteristics of phenotype algorithms to be used in QBA calculations.</p>
<p>There are several strengths in the present study. First, this study developed phenotypes using data from five large datasets that reflect subjects of a wide range of ages and from various socioeconomic backgrounds. The approach we used for the development of the phenotypes in this study uses publicly available, open-source software, providing the capability for full result replication. Included in the supplemental information are the JSON files, which provide fully reproducible phenotype algorithms. There were also several limitations to our study, which included the use of administrative datasets primarily maintained for insurance billing that are well-known to have significant deficits, including coding inaccuracies [<xref ref-type="bibr" rid="B13">13</xref>]. In addition, the estimation of performance characteristics using the PheValuator methodology is dependent on the quality of the data in the dataset, which can vary substantially [<xref ref-type="bibr" rid="B14">14</xref>]. Incomplete signs and symptoms documentation in the data could affect the accuracy of the index date. The algorithm validation was performed using a method, PheValuator, involving predictive modeling rather than case review. This method does have the advantage of providing performance characteristics for multiple databases. It also provides the full set of performance metrics, including sensitivity and specificity which are rarely provided in validation studies using case reviews [<xref ref-type="bibr" rid="B15">15</xref>]. The results from PheValuator have also been compared to the results from previously published validation studies and have demonstrated excellent agreement [<xref ref-type="bibr" rid="B6">6</xref>]. In the algorithms defined with only one diagnostic code, it was not possible to determine if any of these were rule-out diagnoses. Lastly, our study observed data from those subjects who presented for medical attention; those who did not seek medical attention but had the disease were not included and may affect the metrics in this study. Those with less severe disease may also not have sought medical attention.</p>
</sec>
<sec sec-type="conclusion" id="s5">
<title>Conclusion</title>
<p>The work presented here provides evidence for the cost and benefits of using narrow and broad phenotype algorithms in epidemiological research. The benefits of a narrow phenotype are shown in higher positive predictive values for the health condition of interest, assuring researchers that they are studying the correct condition. The cost comes from incurring immortal time into the study design. We have shown this to be a significant issue when examining severe outcomes such as death but of minor impact when examining outcomes with low mortality rates. Researchers with study designs where a narrow phenotype algorithm is needed might consider alternative approaches to using a second code, such as requiring a specific procedure or other treatment within a very short period following the diagnosis code.</p>
</sec>
</body>
<back>
<sec sec-type="data-availability" id="s6">
<title>Data availability statement</title>
<p>The data analyzed in this study is subject to the following licenses/restrictions: The license to use the data sets were purchased from Optum, Merative, and IQVIA. The identical datasets may be purchased by other researchers. Requests to access these datasets should be directed to Merative Marketscan: <email>marketscan.support@merative.com</email>; Optum: <email>maria.restuccio@optum.com</email>; IQVIA: <ext-link ext-link-type="uri" xlink:href="http://www.iqvia.com">www.iqvia.com</ext-link>.</p>
</sec>
<sec id="s7">
<title>Author contributions</title>
<p>JS conceived and designed the analysis, performed analyses, and wrote the paper. MC conceived and designed the analysis, performed analyses, and edited the paper. All authors contributed to the article and approved the submitted version.</p>
</sec>
<sec sec-type="COI-statement" id="s8">
<title>Conflict of interest</title>
<p>JS and MC are employees of Johnson and Johnson and own stock in the company.</p>
</sec>
<fn-group>
<fn id="fn1">
<label>1</label>
<p>See: <ext-link ext-link-type="uri" xlink:href="https://github.com/OHDSI/PheValuator">https://github.com/OHDSI/PheValuator</ext-link>
</p>
</fn>
<fn id="fn2">
<label>2</label>
<p>
<ext-link ext-link-type="uri" xlink:href="https://atlas.ohdsi.org/">https://atlas.ohdsi.org/&#x23;/home</ext-link>
</p>
</fn>
<fn id="fn3">
<label>3</label>
<p>
<ext-link ext-link-type="uri" xlink:href="https://github.com/OHDSI/PheValuator/tree/develop/extras/ImmortalTimeBias">https://github.com/OHDSI/PheValuator/tree/develop/extras/ImmortalTimeBias</ext-link>
</p>
</fn>
<fn id="fn4">
<label>4</label>
<p>
<ext-link ext-link-type="uri" xlink:href="https://github.com/OHDSI/CirceR">https://github.com/OHDSI/CirceR</ext-link>
</p>
</fn>
</fn-group>
<ref-list>
<title>References</title>
<ref id="B1">
<label>1.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>O&#x27;Neal</surname>
<given-names>WT</given-names>
</name>
<name>
<surname>Sandesara</surname>
<given-names>PB</given-names>
</name>
<name>
<surname>Claxton</surname>
<given-names>JS</given-names>
</name>
<name>
<surname>MacLehose</surname>
<given-names>RF</given-names>
</name>
<name>
<surname>Chen</surname>
<given-names>LY</given-names>
</name>
<name>
<surname>Bengtson</surname>
<given-names>LGS</given-names>
</name>
<etal/>
</person-group> <article-title>Influence of sociodemographic factors and provider specialty on anticoagulation prescription fill patterns and outcomes in atrial fibrillation</article-title>. <source>Am J Cardiol</source> (<year>2018</year>) <volume>122</volume>(<issue>3</issue>):<fpage>388</fpage>&#x2013;<lpage>94</lpage>. <pub-id pub-id-type="doi">10.1016/j.amjcard.2018.04.022</pub-id>
</citation>
</ref>
<ref id="B2">
<label>2.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Wilson</surname>
<given-names>LE</given-names>
</name>
<name>
<surname>Luo</surname>
<given-names>X</given-names>
</name>
<name>
<surname>Li</surname>
<given-names>X</given-names>
</name>
<name>
<surname>Mardekian</surname>
<given-names>J</given-names>
</name>
<name>
<surname>Garcia Reeves</surname>
<given-names>AB</given-names>
</name>
<name>
<surname>Skinner</surname>
<given-names>A</given-names>
</name>
</person-group>. <article-title>Clinical outcomes and treatment patterns among Medicare patients with nonvalvular atrial fibrillation (NVAF) and chronic kidney disease</article-title>. <source>PLoS One</source> (<year>2019</year>) <volume>14</volume>(<issue>11</issue>):<fpage>e0225052</fpage>. <pub-id pub-id-type="doi">10.1371/journal.pone.0225052</pub-id>
</citation>
</ref>
<ref id="B3">
<label>3.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Willey</surname>
<given-names>V</given-names>
</name>
<name>
<surname>Franchino-Elder</surname>
<given-names>J</given-names>
</name>
<name>
<surname>Fu</surname>
<given-names>AC</given-names>
</name>
<name>
<surname>Wang</surname>
<given-names>C</given-names>
</name>
<name>
<surname>Sander</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Tan</surname>
<given-names>H</given-names>
</name>
<etal/>
</person-group> <article-title>Treatment and persistence with oral anticoagulants among newly diagnosed patients with non-valvular atrial fibrillation: a retrospective observational study in a US commercially insured and medicare advantage population</article-title>. <source>BMJ Open</source> (<year>2018</year>) <volume>8</volume>(<issue>6</issue>):<fpage>e020676</fpage>. <pub-id pub-id-type="doi">10.1136/bmjopen-2017-020676</pub-id>
</citation>
</ref>
<ref id="B4">
<label>4.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Suissa</surname>
<given-names>S</given-names>
</name>
</person-group>. <article-title>Immortal time bias in pharmacoepidemiology</article-title>. <source>Am J Epidemiol</source> (<year>2008</year>) <volume>167</volume>(<issue>4</issue>):<fpage>492</fpage>&#x2013;<lpage>9</lpage>. <pub-id pub-id-type="doi">10.1093/aje/kwm324</pub-id>
</citation>
</ref>
<ref id="B5">
<label>5.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Agarwal</surname>
<given-names>P</given-names>
</name>
<name>
<surname>Moshier</surname>
<given-names>E</given-names>
</name>
<name>
<surname>Ru</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Ohri</surname>
<given-names>N</given-names>
</name>
<name>
<surname>Ennis</surname>
<given-names>R</given-names>
</name>
<name>
<surname>Rosenzweig</surname>
<given-names>K</given-names>
</name>
<etal/>
</person-group> <article-title>Immortal time bias in observational studies of time-to-event outcomes: assessing effects of postmastectomy radiation therapy using the national cancer database</article-title>. <source>Cancer Control</source> (<year>2018</year>) <volume>25</volume>(<issue>1</issue>):<fpage>107327481878935</fpage>. <pub-id pub-id-type="doi">10.1177/1073274818789355</pub-id>
</citation>
</ref>
<ref id="B6">
<label>6.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Swerdel</surname>
<given-names>JN</given-names>
</name>
<name>
<surname>Schuemie</surname>
<given-names>M</given-names>
</name>
<name>
<surname>Murray</surname>
<given-names>G</given-names>
</name>
<name>
<surname>Ryan</surname>
<given-names>PB</given-names>
</name>
</person-group>. <article-title>PheValuator 2.0: methodological improvements for the PheValuator approach to semi-automated phenotype algorithm evaluation</article-title>. <source>J Biomed Inform</source> (<year>2022</year>) <volume>135</volume>:<fpage>104177</fpage>. <pub-id pub-id-type="doi">10.1016/j.jbi.2022.104177</pub-id>
</citation>
</ref>
<ref id="B7">
<label>7. In:</label>
<citation citation-type="book">
<person-group person-group-type="editor">
<name>
<surname>Swerdel</surname>
<given-names>J</given-names>
</name>
<name>
<surname>Conover</surname>
<given-names>M</given-names>
</name>
</person-group>, editors. <source>Comparing broad and narrow phenotype algorithms: differences in performance characteristics and immortal time incurred</source>. <publisher-loc>Bethesda, MD</publisher-loc>: <publisher-name>OHDSI Sympoium</publisher-name> (<year>2022</year>).</citation>
</ref>
<ref id="B8">
<label>8.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Harding</surname>
<given-names>BN</given-names>
</name>
<name>
<surname>Weiss</surname>
<given-names>NS</given-names>
</name>
</person-group>. <article-title>Point: immortal time bias&#x2014;what are the determinants of its magnitude?</article-title> <source>Am J Epidemiol</source> (<year>2019</year>) <volume>188</volume>(<issue>6</issue>):<fpage>1013</fpage>&#x2013;<lpage>5</lpage>. <pub-id pub-id-type="doi">10.1093/aje/kwz067</pub-id>
</citation>
</ref>
<ref id="B9">
<label>9.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>L&#xe9;vesque</surname>
<given-names>LE</given-names>
</name>
<name>
<surname>Hanley</surname>
<given-names>JA</given-names>
</name>
<name>
<surname>Kezouh</surname>
<given-names>A</given-names>
</name>
<name>
<surname>Suissa</surname>
<given-names>S</given-names>
</name>
</person-group>. <article-title>Problem of immortal time bias in cohort studies: example using statins for preventing progression of diabetes</article-title>. <source>BMJ</source> (<year>2010</year>) <volume>340</volume>:<fpage>b5087</fpage>. <pub-id pub-id-type="doi">10.1136/bmj.b5087</pub-id>
</citation>
</ref>
<ref id="B10">
<label>10.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Liu</surname>
<given-names>J</given-names>
</name>
<name>
<surname>Weinhandl</surname>
<given-names>ED</given-names>
</name>
<name>
<surname>Gilbertson</surname>
<given-names>DT</given-names>
</name>
<name>
<surname>Collins</surname>
<given-names>AJ</given-names>
</name>
<name>
<surname>St Peter</surname>
<given-names>WL</given-names>
</name>
</person-group>. <article-title>Issues regarding &#x2018;immortal time&#x27; in the analysis of the treatment effects in observational studies</article-title>. <source>Kidney Int</source> (<year>2012</year>) <volume>81</volume>(<issue>4</issue>):<fpage>341</fpage>&#x2013;<lpage>50</lpage>. <pub-id pub-id-type="doi">10.1038/ki.2011.388</pub-id>
</citation>
</ref>
<ref id="B11">
<label>11.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Liang</surname>
<given-names>C</given-names>
</name>
<name>
<surname>Seeger</surname>
<given-names>JD</given-names>
</name>
<name>
<surname>Dore</surname>
<given-names>DD</given-names>
</name>
</person-group>. <article-title>Implications of immortal person-time when outcomes are nonfatal</article-title>. <source>Ann Epidemiol</source> (<year>2016</year>) <volume>26</volume>(<issue>3</issue>):<fpage>212</fpage>&#x2013;<lpage>7</lpage>. <pub-id pub-id-type="doi">10.1016/j.annepidem.2015.12.004</pub-id>
</citation>
</ref>
<ref id="B12">
<label>12.</label>
<citation citation-type="book">
<person-group person-group-type="author">
<name>
<surname>Lash</surname>
<given-names>TL</given-names>
</name>
<name>
<surname>Fox</surname>
<given-names>MP</given-names>
</name>
<name>
<surname>Fink</surname>
<given-names>AK</given-names>
</name>
</person-group>. <source>Applying quantitative bias analysis to epidemiologic data</source>. <publisher-loc>New York, NY</publisher-loc>: <publisher-name>Springer</publisher-name> (<year>2009</year>).</citation>
</ref>
<ref id="B13">
<label>13.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Tyree</surname>
<given-names>PT</given-names>
</name>
<name>
<surname>Lind</surname>
<given-names>BK</given-names>
</name>
<name>
<surname>Lafferty</surname>
<given-names>WE</given-names>
</name>
</person-group>. <article-title>Challenges of using medical insurance claims data for utilization analysis</article-title>. <source>Am J Med Qual</source> (<year>2006</year>) <volume>21</volume>(<issue>4</issue>):<fpage>269</fpage>&#x2013;<lpage>75</lpage>. <pub-id pub-id-type="doi">10.1177/1062860606288774</pub-id>
</citation>
</ref>
<ref id="B14">
<label>14.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Peabody</surname>
<given-names>JW</given-names>
</name>
<name>
<surname>Luck</surname>
<given-names>J</given-names>
</name>
<name>
<surname>Jain</surname>
<given-names>S</given-names>
</name>
<name>
<surname>Bertenthal</surname>
<given-names>D</given-names>
</name>
<name>
<surname>Glassman</surname>
<given-names>P</given-names>
</name>
</person-group>. <article-title>Assessing the accuracy of administrative data in health information systems</article-title>. <source>Med Care</source> (<year>2004</year>) <volume>42</volume>(<issue>11</issue>):<fpage>1066</fpage>&#x2013;<lpage>72</lpage>. <pub-id pub-id-type="doi">10.1097/00005650-200411000-00005</pub-id>
</citation>
</ref>
<ref id="B15">
<label>15.</label>
<citation citation-type="journal">
<person-group person-group-type="author">
<name>
<surname>Swerdel</surname>
<given-names>JN</given-names>
</name>
<name>
<surname>Hripcsak</surname>
<given-names>G</given-names>
</name>
<name>
<surname>Ryan</surname>
<given-names>PB</given-names>
</name>
</person-group>. <article-title>PheValuator: development and evaluation of a phenotype algorithm evaluator</article-title>. <source>J Biomed Inform</source> (<year>2019</year>) <volume>97</volume>:<fpage>103258</fpage>. <pub-id pub-id-type="doi">10.1016/j.jbi.2019.103258</pub-id>
</citation>
</ref>
</ref-list>
</back>
</article>