<p><div><div><div><div data-show-faces="false" data-height="21" data-width="100" data-layout="button_count" data-send="true" data-href="https://www.r-bloggers.com/retracing-prenatal-testing-algorithms/"></div></div><div></div></div><div></div></div>
<div>
(This article was first published on <strong><a href="http://staff.math.su.se/hoehle/blog/2018/06/14/prc.html"> Theory meets practice...</a></strong>, and kindly contributed to <a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers)</a> </div>
<h2>Abstract</h2>
<p>A good understanding of the statistical procedure used to calculate trisomy 21 (Down syndrome) risk in combined first trimester screening is a precondition for taking an informed decision on how to proceed with the screening results. For this purpose we implement the Fetal Medicine Foundation (FMF) Germany procedure described in <span data-cites="merz_etal2016">Merz et al. (2016)</span>. To allow soon-to-become-parents an insight on what the procedure does and how sensitive conclusions are to perturbations, we wrote a small Shiny app as part of the R package <code>trisomy21risk</code> to visualize the results. We hope the tool can be helpful in the individual decision making process associated with first trimester screening.</p>
<p><center><br>
<img src="https://i2.wp.com/upload.wikimedia.org/wikipedia/commons/thumb/a/aa/Feindiagnostik_%28Ultraschall%29.jpg/320px-Feindiagnostik_%28Ultraschall%29.jpg?w=456&ssl=1" data-recalc-dims="1"><br>
</center></p>
<p> <a rel="nofollow" href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank"><img alt="Creative Commons License" src="https://i1.wp.com/i.creativecommons.org/l/by-sa/4.0/88x31.png?w=456&ssl=1" data-recalc-dims="1"></a> This work is licensed under a <a rel="nofollow" href="http://creativecommons.org/licenses/by-sa/4.0/" target="_blank">Creative Commons Attribution-ShareAlike 4.0 International License</a>. The markdown+Rknitr source code of this blog is available under a <a rel="nofollow" href="https://www.gnu.org/licenses/gpl-3.0.html" target="_blank">GNU General Public License (GPL v3)</a> license from github.</p>
<h2>Introduction</h2>
<p>Biostatisticians predominantly analyse samples from populations of dead and diseased in the hope of substantiating answers to question aimed at preventing the adverse event in future individuals. Less common is the personalized <span>\(n=1\)</span> case, where -based on historical data- one has to choose an optimal test sequence or treatment regime for a specific individual. However, when interpreting your own laboratory values that is what you have to do – implicitly or explicitly!</p>
<p>In the case of first trimester <a rel="nofollow" href="http://staff.math.su.se/hoehle/blog/2018/06/14/en.wikipedia.org/wiki/Prenatal_testing" target="_blank">prenatal testing</a> for <a rel="nofollow" href="https://en.wikipedia.org/wiki/Down_syndrome" target="_blank">Down syndrome</a>, aka. trisomy 21 (T21), parents are at the end of the screening routine given a piece of paper containing the results of a combined test. This consists of</p>
<ul>
<li>the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Nuchal_scan" target="_blank">nuchal translucency</a> (NT) measurement (in mm) of the fetus</li>
<li>concentration of the Pregnancy-associated plasma protein A <a rel="nofollow" href="https://en.wikipedia.org/wiki/Pregnancy-associated_plasma_protein_A" target="_blank">(PAPP-A)</a> and the human chorionic gonadotropin <a rel="nofollow" href="https://en.wikipedia.org/wiki/Human_chorionic_gonadotropin" target="_blank">(β-HCG)</a> hormone in the serum of the mother (measured in <a rel="nofollow" href="https://en.wikipedia.org/wiki/International_unit" target="_blank">miU</a>/ml)</li>
<li>(optional) results for other markers (e.g. ethnicity, maternal smoking, fetal heart rate, visibility of the nasal bone on the ultrasound)</li>
</ul>
<p>From the biomarker values NT, PAPPA-A and β-HCG (and possibly additional markers) a risk for T21 is calculated and presented as an odds, say, 1:486. The question for the concerned soon-to-become-parents is now, whether to proceed with further tests – for example a DNA based approach in maternal blood plasma, a so called <strong>non-invasive prenatal test</strong> (NIPT) or, further down the line, an invasive <a rel="nofollow" href="https://en.wikipedia.org/wiki/Amniocentesis" target="_blank">amniotic fluid test</a>. Recommendations for when to perform which additional screening steps exist and are discussed with the supervising gynecologist, but at the end its your choice as soon-to-become-parents.</p>
<p>The aim of this blog post is to illustrate how we failed to identify and understand the algorithm used to calculate the risk. As a consequence, we attempt a transparent and reproducible risk calculation algorithm based on the procedure described in <span data-cites="merz_etal2016">Merz et al. (2016)</span>. To enhance risk communication we wrote an interactive Shiny app to calculate the risk, perform sensitivity analyses and graph distributions. Even though we are not experts on prenatal screening and have no access to any data, we hope such tools can inspire the experts or even be helpful in the individual decision making process associated with first trimester screening.</p>
<h3>What is the FMF Algorithm 2012?</h3>
<p>The first step in a scientific approach towards the problem is to understand, how the <span>\(y\)</span> in the reported <span>\(1:y\)</span> odds was determined. For this purpose the exemplary result report (in this case from a German prenatal diagnosis facility) contained a cryptic note to a &quot;FMF Algorithm 2012&quot;. Unfortunately, no further reference to any scientific article, no link to a website with additional information nor any separate pamphlet was provided. Nevertheless, the soon-to-be-parents are assured that &quot;The model for calculating the risk is based on intensive research work coordinated by the fetal medicine foundation (registered charity 1037116)&quot;. Cranking the google handle we found that there exists both an UK <a rel="nofollow" href="https://fetalmedicine.org/" target="_blank">Fetal Medicine Foundation</a> (FMF), which has the stated registered charity number, as well as a <a rel="nofollow" href="https://www.fmf-deutschland.info/en/fmf-deutschland/" target="_blank">Fetal Medicine Foundation Germany</a>. For reasons unclear to the outsider these two organizations use different risk algorithms: FMF-Germany uses a so called DoE-algorithm (DoE = Degree of extremeness) documented in the <span data-cites="merz_etal2008">Merz et al. (2008)</span>, <span data-cites="merz_etal2011">Merz et al. (2011)</span> and <span data-cites="merz_etal2016">Merz et al. (2016)</span> (open-access) sequence of papers. In contrast FMF-UK uses software following &quot;The First Trimester Screening module 2012 algorithm&quot;, which uses so called MoMs (multiples of the median). What this entails we could only find in a <a rel="nofollow" href="https://doclegend.com/queue/03-guide-for-the-first-trimester-screening-module_5a17d7fbd64ab28f8c88fe0e_pdf?queue_id=5b205c29d64ab23ffc4c2e34" target="_blank">rogue access software manual</a>: the document contains a large body of references sketching the different analysis components – in particular <span data-cites="kagan_etal2008a">Kagan, Wright, Baker, et al. (2008)</span> and <span data-cites="kagan_etal2008b">Kagan, Wright, Valencia, et al. (2008)</span> seem to cover the essentials components of the algorithm. However, for each component (nuchal translucency, β-HCG, PAPP-A, nasal bone, ductus venosus, heart rate, …) further references are given without it being clear, if or how they enter the algorithm. As an example, the FMF 2012 algorithm seems to analyze the NT measurement by a mixture model approach described in <span data-cites="wright_etal2008">Wright et al. (2008)</span> so the original approach in <span data-cites="kagan_etal2008a">Kagan, Wright, Baker, et al. (2008)</span> now seems obsolete. This might all be scientifically justified, but for an outsider it is impossible to retrace what is done: Even though we spent quite some time searching the FMF-UK website, which provides access to many of the FMF’s 957 scientific publications and watched <a rel="nofollow" href="http://www.perkinelmer.co.uk/lab-products-and-services/maternal-fetal-health/FMF-risk-algorithm.html" target="_blank">videos about the algorithm</a>, we could not find a more coherent document on what the FMF 2012 algorithm exactly is. Even the FMF <a rel="nofollow" href="https://fetalmedicine.org/research/assess/trisomies" target="_blank">on-line risk calculator</a> does not contain a specific reference and seems to implement its own a variant of the algorithm (<a rel="nofollow" href="https://fetalmedicine.org/assets/b302e11a/js/_fmf.min.js?v=14397" target="_blank">undocumented javascript source code</a>).</p>
<p>At this point it is instrumental to recall paragraph V.3.3 in the <a rel="nofollow" href="https://www.rki.de/DE/Content/Kommissionen/GendiagnostikKommission/Richtlinien/RL-VorgeburtlicheRisikoabklaerung.pdf?__blob=publicationFile" target="_blank">German Gene Diagnostic Commission</a> guideline for prenatal screening. It demands that the algorithm for the computation of such risks to be <em>comprehensible, scientifically justified and published in a peer review process</em>. In particular the guideline stresses that <em>scientifically justified</em> means:</p>
<div>
<em>Demanded is publication of the entire algorithm with detailed software specification, which precisely and comprehensible describes how the risks are calculated.</em>
</div>
<p><p>With such a strong statement by the guideline about the <strong>transparency</strong> and <strong>reproducibility</strong> of the algorithm the above hide-and-seek seems absurd.</p>
<p>Since we at the time of testing (wrongly?) believed that the FMF-Germany algorithm was the one used in the lab report and its papers appeared comprehensible enough for a re-implementation, we decided to scrutinize the FMF-Germany algorithm further in order to understand the computations. Aim was to understand how components influenced the calculation, perform a sensitivity analysis and better understand the uncertainty associated with the reported risk. The FMF Algorithm 2012 was expected to be similar in style.</p>
<h2>The FMF-Germany Procedure – PRC 3.0</h2>
<p>The procedure described in <span data-cites="merz_etal2016">Merz et al. (2016)</span> entitled <strong>Prenatal Risk Calculation</strong> (PRC) uses a classic Bayesian diagnostic approach, where one computes a posterior odds for the fetus having T21 as</p>
<p><span>\[<br>
\text{Posterior odds} = \text{Likelihood ratio} \cdot \text{Prior odds}<br>
\]</span></p>
<p>In the context of T21 first trimester screening, the prior odds is known to depend on maternal age and gestational age (at the time of screening) of the fetus. Tables for this can be found in, e.g., Table 4 of <span data-cites="snijders_etal1999">Snijders et al. (1999)</span>, which is shown below in the form of odds <span>\(1:x\)</span> for maternal age gaps of 5 years and selected <a rel="nofollow" href="https://en.wikipedia.org/wiki/Gestational_age" target="_blank">gestational ages</a> (measured in weeks). The gestational weeks relevant for the first trimester screening are the gestational weeks 10-13. Using a linear interpolation we obtain values for maternal and gestational age not covered in the table – see the <code>trisomy21risk</code> package code for details.</p>
<table>
<caption>
Table 1: Background risk in matrix form for T21 for maternal age (in years) and gestational age (in weeks) by Snijders et al. (1999).<br>
</caption>
<thead>
<tr>
<th>
Maternal Age
</th>
<th>
W10
</th>
<th>
W12
</th>
<th>
W14
</th>
<th>
W16
</th>
<th>
W20
</th>
<th>
W40
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
20
</td>
<td>
983
</td>
<td>
1068
</td>
<td>
1140
</td>
<td>
1200
</td>
<td>
1295
</td>
<td>
1527
</td>
</tr>
<tr>
<td>
25
</td>
<td>
870
</td>
<td>
946
</td>
<td>
1009
</td>
<td>
1062
</td>
<td>
1147
</td>
<td>
1352
</td>
</tr>
<tr>
<td>
30
</td>
<td>
576
</td>
<td>
626
</td>
<td>
668
</td>
<td>
703
</td>
<td>
759
</td>
<td>
895
</td>
</tr>
<tr>
<td>
35
</td>
<td>
229
</td>
<td>
249
</td>
<td>
266
</td>
<td>
280
</td>
<td>
302
</td>
<td>
356
</td>
</tr>
<tr>
<td>
40
</td>
<td>
62
</td>
<td>
68
</td>
<td>
72
</td>
<td>
76
</td>
<td>
82
</td>
<td>
97
</td>
</tr>
<tr>
<td>
45
</td>
<td>
15
</td>
<td>
16
</td>
<td>
17
</td>
<td>
18
</td>
<td>
19
</td>
<td>
23
</td>
</tr>
</tbody>
</table>
<p><p>From the table we see that the background risk increases with maternal age and decreases with gestational age. The latter is related to the fact that a T21 fetus has an increased risk of spontaneous abortion. One criticism of using the maternal age as background risk is that age is merely a proxy for processes and complications not well understood. From a certain maternal age, it is thus almost impossible to get a test-negative result, even though most babies born by mothers that age are healthy <span data-cites="schmidt_etal2007">(Schmidt et al. 2007)</span>.</p>
<p>The above formula for the posterior odds means that we can compute the posterior probability for T21 as <span>\[<br>
\text{Posterior probability} = \left( 1 + \frac{1}{\operatorname{LR}_{joint}} \cdot \frac{1-\text{Prior probability}}{\text{Prior probability}} \right)^{-1}.<br>
\]</span> The complicated part of the analysis is now to determine the joint likelihood ratio between the aneuploid pregnancies (i.e. T21 pregnancies) vs. euploid pregnancies (i.e. non-T21 pregnancies) as a function of the three biomarkers. In some cases additional continuous or binary markers indicating for example the smoking status, the visibility of the nasal bone on the ultrasound or the ductus venosus blood flow (expressed as pulsatility index) are used to distinguish further. For sake of exposition we use the presence of a nasal bone on the ultrasound as additional marker.</p>
<p>In <span data-cites="merz_etal2011">Merz et al. (2011)</span> and <span data-cites="merz_etal2016">Merz et al. (2016)</span> the likelihood ratio between aneuploid and euploid pregnancies is broken down into individual components by assuming that the random variables describing the observed value for the four risk factors are independent given ploidy (i.e. the T21 status):</p>
<p><span>\[<br>
\begin{align*}<br>
\operatorname{LR}_{joint} &amp;= \frac{f_{\text{aneu}}(y_{\text{NT}}, y_{\beta\text{-HCG}}, y_{\text{PAPP-A}}, y_{\text{nasal bone}})}{f_{\text{eu}}(y_{\text{NT}}, y_{\beta\text{-HCG}}, y_{\text{PAPP-A}}, y_{\text{nasal bone}})} \\<br>
&amp;=<br>
\left(<br>
\frac{f_{\text{aneu}, \text{NT}}(y_{\text{NT}})}{f_{\text{eu}, \text{NT}}(y_{\text{NT}})}<br>
\right)<br>
\cdot<br>
\left(<br>
\frac{f_{\text{aneu}, \beta\text{-HCG}}(y_{\beta\text{-HCG}}}{f_{\text{eu}, \beta\text{-HCG}}(y_{\beta\text{-HCG}})}<br>
\right)<br>
\cdot<br>
\left(<br>
\frac{f_{\text{aneu}, \text{PAPP-A}}(y_{\text{PAPP-A}})}{f_{\text{eu}, \text{PAPP-A}}(y_{\text{PAPP-A}})}<br>
\right)<br>
\cdot<br>
\left(<br>
\frac{f_{\text{aneu}, \text{nasal bone}}(y_{\text{nasal bone}})}{f_{\text{eu}, \text{nasal bone}}(y_{\text{nasal bone}})}<br>
\right)\\<br>
&amp;= \operatorname{LR}_{\text{NT}} \cdot \operatorname{LR}_{\beta\text{-HCG}} \cdot \operatorname{LR}_{\text{PAPP-A}} \cdot \operatorname{LR}_{\text{nasal bone}}<br>
\end{align*}<br>
\]</span></p>
<p>In the above, the <span>\(f\)</span>‘s denote the respective probability density functions, which may depend on covariates such as gestational age (at the time of measuring) or the weight of the mother. In <a rel="nofollow" href="http://staff.math.su.se/hoehle/blog/figure/source/2018-06-14-prc/fts-appendix.html#appendix1" target="_blank">Appendix 1</a> we look in detail at how the likelihood ratio is computed for the NT measurement. The procedure is then analogous for the β-HCG and PAPPA-A markers – one difference is, though, that <span data-cites="merz_etal2016">Merz et al. (2016)</span> extends the analysis to allow for these β-HCG and PAPPA serum markers to be collected at a gestational age 2-3 weeks earlier than the NT measurement, because the discrimination is better for these biochemistry markers at this gestational age. Altogether, if the prior odds is given in the form <span>\(1:x\)</span> then <span>\(\operatorname{LR}_{joint}\)</span> is the factor multiplied onto <span>\(x\)</span> to get the posterior odds in the form of <span>\(1:y\)</span>. That means that if <span>\(\operatorname{LR}_{joint}>1\)</span> then the marker values are such that the risk for T21 increases.</p>
<h2>R Implementation</h2>
<p>The <code>trisomy21</code> function in the <code>trisomy21risk</code> package performs all the computations to take one from the prior odds, covariates and biomarker values to the posterior odds.</p>
<div>
<pre><code><span>formalArgs</span>(trisomy21risk::trisomy21)</code></pre>
</div>
<pre><code>## [1] &quot;age&quot;        &quot;weight&quot;     &quot;crlbe&quot;      &quot;crl&quot;        &quot;nt&quot;         &quot;pappa&quot;     
## [7] &quot;betahCG&quot;    &quot;nasalbone&quot;  &quot;background&quot;</code></pre>
<p>In the above <code>age</code> (in years) and <code>weight</code> (in kg) refer to the mother, <code>crl</code> is the <a rel="nofollow" href="https://en.wikipedia.org/wiki/Crown-rump_length" target="_blank">crown-rump-length</a> (measured in mm) at the time of the NT measurement and <code>crlbe</code> is the crown-rump-length at the time of the biomarker measurement. The <code>pappa</code> and <code>betahCG</code> concentrations are both measured in miU/ml. Finally, <code>background</code> is the <span>\(x\)</span> of the prior odds <span>\(1:x\)</span>. The function outputs a named list of which one element is the posterior odds (in the form of <span>\(1:y\)</span>).</p>
<div>
Philosophical note: The obtained posterior odds for the risk from the analysis is technically not really <strong>your individual risk</strong>, but the proportion in a population of, say, 1000 individuals with the same (measurable) covariate configuration as your own. As Bayesians we, however, feel a certain pain towards such a frequentist interpretation of the probability concept at the end of a Bayesian analysis. Believing that assumptions and model choice are subjective, we dare say that the obtained number has become <strong><a rel="nofollow" href="https://t.co/iekXiiKGn1" target="_blank">your risk</a></strong> as soon as you have to deal with the number.
</div>
<p><p>We can now compare our results to, e.g., the 12 randomly selected patients listed in Tab. 5 of <span data-cites="merz_etal2016">Merz et al. (2016)</span>. Note that the first patient has a posterior odds of 1:486, which we used as example patient in the introduction. Results are compared in two ways:</p>
<ul>
<li>using the background risk as specified in the <code>Background</code> column by the paper and comparing our result (Column: <code>our_Post</code>) to the <span>\(y\)</span> of the posterior odds stated in the paper (Column: <code>Post</code>).</li>
<li>Manually calculate the background risk using maternal age and gestational age by interpolation of the Snijders table (Column: <code>our_Background</code>) and compare our result (Column: <code>our_Post_Back</code>) with the result of the paper (Column: <code>Post</code>).</li>
</ul>
<div>
<pre><code>##Load numbers from Tab. 5 of the paper (contains 12 patients)
tab5 &lt;-<span> </span><span>read.csv2</span>(<span>file.path</span>(filePath,<span>&quot;merzetal2015-tab5.csv&quot;</span>))

##Compute our own results for each patient
tab5 %&lt;>%<span> </span>rowwise %>%<span> </span><span>do</span>({
  ##Arguments for the call to the trisomy21 function
  args &lt;-<span> </span><span>list</span>(<span>age=</span>.$Age, <span>weight=</span>.$Weight, <span>crlbe=</span><span>gestage2crl</span>(.$CRLBE), <span>crl=</span><span>gestage2crl</span>(.$CRL), <span>nt=</span>.$NT, <span>pappa=</span>.$PAPP_A, <span>betahCG=</span>.$beta_hCG, <span>nasalbone=</span><span>&quot;Unknown&quot;</span>, <span>background=</span>.$Background)

  ##Manually compute the prior odds
  our_Background &lt;-<span> </span><span>background_risk</span>(<span>age_mother=</span>.$Age, <span>gestage=</span>.$CRL/<span>7</span>)

  ##Call the trisomy function with the two type of background odds
  post &lt;-<span> </span><span>do.call</span>(<span>&quot;trisomy21&quot;</span>,<span>args=</span>args)
  post_back &lt;-<span> </span><span>do.call</span>(<span>&quot;trisomy21&quot;</span>,<span>args=</span><span>modifyList</span>(args, <span>list</span>(<span>background=</span>our_Background)))

  ##Return result
  <span>data.frame</span>(., <span>our_Post =</span> post$onetox, <span>our_Background=</span><span>round</span>(our_Background,<span>digits=</span><span>0</span>), <span>our_Post_Back=</span>post_back$onetox)
})</code></pre>
</div>
<table>
<caption>
Table 2: Table 5 in Merz et al. (2016) annotated with our manually computed results. Note: The gestational ages (CRL and CRLBE) are now suddenly measured in gestation week and not mm.<br>
</caption>
<thead>
<tr>
<th>
Age
</th>
<th>
Weight
</th>
<th>
CRLBE
</th>
<th>
CRL
</th>
<th>
NT
</th>
<th>
PAPP_A
</th>
<th>
beta_hCG
</th>
<th>
Background
</th>
<th>
Post
</th>
<th>
our_Post
</th>
<th>
our_Background
</th>
<th>
our_Post_Back
</th>
</tr>
</thead>
<tbody>
<tr>
<td>
37
</td>
<td>
74.5
</td>
<td>
58
</td>
<td>
86
</td>
<td>
2.3
</td>
<td>
0.330
</td>
<td>
52.5
</td>
<td>
145
</td>
<td>
486
</td>
<td>
494
</td>
<td>
140
</td>
<td>
477
</td>
</tr>
<tr>
<td>
33
</td>
<td>
65.1
</td>
<td>
58
</td>
<td>
86
</td>
<td>
2.0
</td>
<td>
0.526
</td>
<td>
124.7
</td>
<td>
349
</td>
<td>
1022
</td>
<td>
1043
</td>
<td>
352
</td>
<td>
1052
</td>
</tr>
<tr>
<td>
27
</td>
<td>
48.6
</td>
<td>
59
</td>
<td>
88
</td>
<td>
1.2
</td>
<td>
0.210
</td>
<td>
71.6
</td>
<td>
876
</td>
<td>
2901
</td>
<td>
3412
</td>
<td>
752
</td>
<td>
2931
</td>
</tr>
<tr>
<td>
23
</td>
<td>
65.4
</td>
<td>
58
</td>
<td>
88
</td>
<td>
1.9
</td>
<td>
0.725
</td>
<td>
96.0
</td>
<td>
1021
</td>
<td>
13238
</td>
<td>
13583
</td>
<td>
915
</td>
<td>
12175
</td>
</tr>
<tr>
<td>
42
</td>
<td>
72.8
</td>
<td>
59
</td>
<td>
89
</td>
<td>
2.0
</td>
<td>
0.359
</td>
<td>
77.0
</td>
<td>
45
</td>
<td>
176
</td>
<td>
208
</td>
<td>
35
</td>
<td>
162
</td>
</tr>
<tr>
<td>
37
</td>
<td>
69.0
</td>
<td>
58
</td>
<td>
89
</td>
<td>
1.8
</td>
<td>
0.241
</td>
<td>
47.2
</td>
<td>
147
</td>
<td>
1355
</td>
<td>
1526
</td>
<td>
140
</td>
<td>
1453
</td>
</tr>
<tr>
<td>
36
</td>
<td>
84.4
</td>
<td>
58
</td>
<td>
90
</td>
<td>
2.0
</td>
<td>
0.290
</td>
<td>
51.9
</td>
<td>
225
</td>
<td>
2198
</td>
<td>
2332
</td>
<td>
180
</td>
<td>
1865
</td>
</tr>
<tr>
<td>
41
</td>
<td>
61.6
</td>
<td>
55
</td>
<td>
90
</td>
<td>
1.7
</td>
<td>
0.219
</td>
<td>
84.6
</td>
<td>
55
</td>
<td>
264
</td>
<td>
285
</td>
<td>
47
</td>
<td>
243
</td>
</tr>
<tr>
<td>
30
</td>
<td>
57.6
</td>
<td>
59
</td>
<td>
91
</td>
<td>
1.6
</td>
<td>
0.349
</td>
<td>
75.3
</td>
<td>
677
</td>
<td>
6329
</td>
<td>
6990
</td>
<td>
576
</td>
<td>
5947
</td>
</tr>
<tr>
<td>
26
</td>
<td>
64.7
</td>
<td>
59
</td>
<td>
92
</td>
<td>
1.6
</td>
<td>
0.230
</td>
<td>
73.9
</td>
<td>
945
</td>
<td>
3983
</td>
<td>
4506
</td>
<td>
811
</td>
<td>
3868
</td>
</tr>
<tr>
<td>
35
</td>
<td>
74.3
</td>
<td>
59
</td>
<td>
92
</td>
<td>
1.5
</td>
<td>
0.399
</td>
<td>
69.6
</td>
<td>
233
</td>
<td>
5072
</td>
<td>
5691
</td>
<td>
229
</td>
<td>
5593
</td>
</tr>
<tr>
<td>
34
</td>
<td>
51.6
</td>
<td>
58
</td>
<td>
93
</td>
<td>
2.1
</td>
<td>
0.563
</td>
<td>
142.4
</td>
<td>
338
</td>
<td>
902
</td>
<td>
966
</td>
<td>
287
</td>
<td>
821
</td>
</tr>
</tbody>
</table>
<p><p>Altogether, we observe that the results do not fully agree, but are in most cases of the same magnitude. Even when using the same prior odds there are still differences, which can be explained by the use of different polynomial <span>\(\hat{y}(x)\)</span> forms for NT, PAPP-A and β-HCG, because of problems reproducing the results with the polynomials stated in <span data-cites="merz_etal2016">Merz et al. (2016)</span> – see <a rel="nofollow" href="http://staff.math.su.se/hoehle/blog/figure/source/2018-06-14-prc/fts-appendix.html#appendix2" target="_blank">Appendix 2</a>. Furthermore, the interpolation of the background risks from the Snijders table (Column: <code>our_Background</code>) deviates: Apparently, a different interpolation procedure is used by <span data-cites="merz_etal2016">Merz et al. (2016)</span> – we could not find an explicit mentioning of how this part is done.</p>
<h2>Shiny App</h2>
<p>For better illustration we have written a small Shiny app in order to get a better feeling of what the algorithm does, for example, by performing a sensitivity analysis where one changes one measurement value slightly. The App is available from:</p>
<p><center><br>
<a rel="nofollow" href="https://hoehle.shinyapps.io/t21app/" target="_blank">https://hoehle.shinyapps.io/t21app/</a><br>
</center></p>
<p><p>and can also be ran locally, by installing the <a rel="nofollow" href="https://github.com/hoehleatsu/trisomy21risk" target="_blank"><code>trisomy21risk</code></a> package from github:</p>
<div>
<pre><code>devtools::<span>install_github</span>(<span>&quot;hoehleatsu/trisomy21risk&quot;</span>)
trisomy21risk::<span>runExample</span>()</code></pre>
</div>
<h4>Screenshots</h4>
<p>Computing the T21 risk:<br>
<center><br>
<img alt="Second screenshot from the Shiny App" src="https://i2.wp.com/staff.math.su.se/hoehle/blog/figure/source/2018-06-14-prc/shinyapp.png?w=85%25" data-recalc-dims="1"><br>
</center></p>
<p>As example: the NT measurement in the ultrasound image is subject to some measurement error – even the most skilled operator has difficulties obtaining errors smaller than 0.2 – 0.3 mm. With the app we can easily investigate how such measurement error influences the calculated risk. Another aspect to investigate is the influence of the background risk from maternal age.</p>
<p>Visualizing the likelihood ratios:<br>
<center><br>
<img alt="Second screenshot from the Shiny App" src="https://i2.wp.com/staff.math.su.se/hoehle/blog/figure/source/2018-06-14-prc/shinyapp2.png?w=85%25" data-recalc-dims="1"><br>
</center></p>
<h2>Discussion</h2>
<p>With a cut-off of value of 1:150 for the posterior odds, <span data-cites="merz_etal2016">Merz et al. (2016)</span> report a detection rate for T21 of 86.8% and a false positive rate of 3.42%. The 1:150 is also the threshold they suggest for further invasive action. For posterior odds up to 1:500 the suggestion in <span data-cites="merz_etal2011">Merz et al. (2011)</span> is to perform additional sonographic investigations in the second trimester. Nowadays, one would typically perform a NIPT.</p>
<p>Was the algorithm for the computation of the risk detailed and comprehensive as demanded by the Gene Diagnostic Commission? Well, since we -despite quite some effort- were not able to find a full description of the FMF 2012 algorithm and, as described in <a rel="nofollow" href="http://staff.math.su.se/hoehle/blog/figure/source/2018-06-14-prc/fts-appendix.html#appendix2" target="_blank">Appendix 2</a>, were not able to reproduce the numbers in <span data-cites="merz_etal2016">Merz et al. (2016)</span>, we say: no. As algorithms become more complex and -as for the FMF 2012 algorithm- contain the combined insights of 10+ scientific papers, transparency starts with a single easy-to-find accessible document coarsely describing the overall algorithm. The FMF software manual, which apparently is not accessible to the public, would have been a start. Even better would be an open-source reference implementation! To this date it remained unclear how the standard NT, PAPP-A and β-HCG measurements entered the analysis and if additional components (ethnicity? smoking status? nasal bone? heart rate? ductus flow?) entered the risk calculation. Similarly, publishing a statistical description of the FMF-Germany algorithm in open-access articles, e.g. such as <span data-cites="merz_etal2016">Merz et al. (2016)</span>, is a step in the right direction, however, some of the equations in the paper were either erroneous or intentionally kept so vague, the algorithm became impossible to reconstruct. Altogether, transparency and risk communication for this sensitive diagnostic procedure should be improved to meet guideline standards.</p>
<p>What do you do with the obtained posterior risk once you have it? This is indeed a very personal decision, which make the shortcomings of statistics clear: Statisticians can annotate even the most unlikely event with a probability of happening, but the probability is rarely zero, so it’s your personal threshold for <em>likely enough</em> balanced against the ethics and personal beliefs of what to do if, which determines your actions… In this <span>\(n=1\)</span> context the reported risk might merely be a hypothetical number – at most its rough magnitude is of interest. However, from a system perspective <span>\(n\)</span> is much larger, so everything possible should be done such that the probabilistic forecast is both calibrated and sharp and that the recipient(s) knows what this number entails.</p>
<h4>Postscript</h4>
<p>Further information about first trimester screening can be obtained from the <a rel="nofollow" href="https://fetalmedicine.org/" target="_blank">Fetal Medicine Foundation</a>. In particular their <a rel="nofollow" href="http://www.fetalmedicine.com/fmf/FMF-English.pdf" target="_blank">book</a> about the 11-13 weeks scan (available in several languages) is very helpful <span data-cites="FMF2004">(Nicolaides 2004)</span>. As mentioned the FMF-UK offers a web-based <a rel="nofollow" href="https://fetalmedicine.org/research/assess/trisomies" target="_blank">trisomies risk assessment calculator</a>. Similarly, the <a rel="nofollow" href="https://www.fmf-deutschland.info/en/fmf-deutschland/" target="_blank">FMF-Germany</a> has their own website with information – apparently it is now also possible to obtain a demo version of their risk calculation software <a rel="nofollow" href="https://www.fmf-deutschland.info/en/software/" target="_blank">PRC 3.0</a>.</p>
<h2>Appendix</h2>
<p>The mathematical details of the post and our troubles reproducing the results of <span data-cites="merz_etal2016">Merz et al. (2016)</span> are described in two separate <a rel="nofollow" href="http://staff.math.su.se/hoehle/blog/figure/source/2018-06-14-prc/fts-appendix.html" target="_blank">Appendixes</a>,</p>
<h2>Literature</h2>
<div>
<div>
<p>Kagan, K. O., D. Wright, A. Baker, D. Sahota, and K. H. Nicolaides. 2008. “Screening for trisomy 21 by maternal age, fetal nuchal translucency thickness, free beta-human chorionic gonadotropin and pregnancy-associated plasma protein-A.” <em>Ultrasound Obstet Gynecol</em> 31 (6): 618–24.</p>
</div>
<div>
<p>Kagan, K. O., D. Wright, C. Valencia, N. Maiz, and K. H. Nicolaides. 2008. “Screening for trisomies 21, 18 and 13 by maternal age, fetal nuchal translucency, fetal heart rate, free beta-hCG and pregnancy-associated plasma protein-A.” <em>Hum. Reprod.</em> 23 (9): 1968–75.</p>
</div>
<div>
<p>Merz, E., C. Thode, A. Alkier, B. J. Hackelöer, M. Hansmann, G. Huesgen, P. Kozlowski, M. Pruggmaier, and S. Wellek. 2008. “A New Approach to Calculating the Risk of Chromoso- Mal Abnormalities with First-Trimester Screening Data.” <em>Ultraschall in Der Medizin / European Journal of Ultrasound</em> 29: 639–45. doi:<a rel="nofollow" href="https://doi.org/10.1055/s-2008-1027958" target="_blank">10.1055/s-2008-1027958</a>.</p>
</div>
<div>
<p>Merz, E., C. Thode, B. Eiben, and S. Wellek. 2016. “Prenatal Risk Calculation (PRC) 3.0: An Extended DoE-Based First-Trimester Screening Algorithm Allowing for Early Blood Sampling.” <em>Ultrasound International Open</em> 2: E19–E26. doi:<a rel="nofollow" href="https://doi.org/10.1055/s-0035-1569403" target="_blank">10.1055/s-0035-1569403</a>.</p>
</div>
<div>
<p>Merz, E., C. Thode, B. Eiben, R. Faber, B. J. Hackelöer, G. Huesgen, M. Pruggmaier, and S. Wellek. 2011. “Individualized Correction for Maternal Weight in Calculating the Risk of Chromosomal Abnormalities with First-Trimester Screening Data.” <em>Ultraschall in Der Medizin/European Journal of Ultrasound</em> 32: 33–39. doi:<a rel="nofollow" href="https://doi.org/http://dx.doi.org/10.1055/" target="_blank">http://dx.doi.org/10.1055/</a>.</p>
</div>
<div>
<p>Nicolaides, K. H. 2004. <em>The 11–13<span>\(^{+6}\)</span> Weeks Scan</em>. Fetal Medicine Foundation, <a rel="nofollow" href="https://fetalmedicine.com/synced/fmf/FMF-English.pdf" target="_blank">https://fetalmedicine.com/synced/fmf/FMF-English.pdf</a>.</p>
</div>
<div>
<p>Schmidt, P., J. Rom, H. Maul, B. Vaske, P. Hillemanns, and A. Scharf. 2007. “Advanced first trimester screening (AFS): an improved test strategy for the individual risk assessment of fetal aneuploidies and malformations.” <em>Arch. Gynecol. Obstet.</em> 276 (2): 159–66.</p>
</div>
<div>
<p>Snijders, R. J., K. Sundberg, W. Holzgreve, G. Henry, and K. H. Nicolaides. 1999. “Maternal age- and gestation-specific risk for trisomy 21.” <em>Ultrasound Obstet Gynecol</em> 13 (3): 167–70.</p>
</div>
<div>
<p>Wright, D., K. O. Kagan, F. S. Molina, A. Gazzoni, and K. H. Nicolaides. 2008. “A mixture model of nuchal translucency thickness in screening for chromosomal defects.” <em>Ultrasound Obstet Gynecol</em> 31 (4): 376–83.</p>
</div>
</div>
	<p>
<div>
<div>To <strong>leave a comment</strong> for the author, please follow the link and comment on their blog: <strong><a href="http://staff.math.su.se/hoehle/blog/2018/06/14/prc.html"> Theory meets practice...</a></strong>.</div>
<hr>
<a rel="nofollow" href="https://www.r-bloggers.com/">R-bloggers.com</a> offers <strong><a rel="nofollow" href="https://feedburner.google.com/fb/a/mailverify?uri=RBloggers">daily e-mail updates</a></strong> about <a rel="nofollow" href="https://www.r-project.org/" title="The R Project for Statistical Computing">R</a> news and <a rel="nofollow" href="https://www.r-bloggers.com/search/tutorial" title="R tutorials">tutorials</a> on topics such as: <a rel="nofollow" href="https://www.r-bloggers.com/search/data%20science" title="Data science">Data science</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Big%20Data" title="Big Data">Big Data, <a rel="nofollow" href="https://www.r-users.com/" title="R jobs">R jobs</a>, visualization (<a rel="nofollow" href="https://www.r-bloggers.com/search/ggplot2" title="ggplot and ggplot2 tutorials">ggplot2</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/boxplot" title="Boxplots using lattice and ggplot2 tutorials">Boxplots</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/map" title="Maps and gis">maps</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/animation" title="Animation in R">animation</a>), programming (<a rel="nofollow" href="https://www.r-bloggers.com/search/RStudio" title="RStudio IDE for R">RStudio</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/sweave" title="Sweave and literate programming">Sweave</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/LaTeX" title="LaTeX in R">LaTeX</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/SQL" title="SQL and databases">SQL</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/eclipse" title="Eclipse IDE for R">Eclipse</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/git" title="git and github, Version Control System">git</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/hadoop" title="Large data in R using Hadoop">hadoop</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/Web+Scraping" title="Web Scraping of google, facebook, yahoo, twitter and more using R">Web Scraping</a>) statistics (<a rel="nofollow" href="https://www.r-bloggers.com/search/regression" title="Regressions and ANOVA analysis tutorials">regression</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/PCA" title="principal component analysis tutorial">PCA</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/time+series" title="Time series">time series</a>, <a rel="nofollow" href="https://www.r-bloggers.com/search/trading" title="finance trading">trading</a>) and more...
<img width="1" alt="" src="http://feeds.feedburner.com/~r/RBloggers/~4/ndOUEQD05mA" height="1"></a></div>