Skip to content
Snippets Groups Projects
Commit 53d6e24f authored by lea.douchet_ird.fr's avatar lea.douchet_ird.fr
Browse files

Add picture to stat section

parent d227b61f
No related branches found
No related tags found
No related merge requests found
Showing
with 31 additions and 17 deletions
......@@ -99,7 +99,7 @@ mf_map(x = district,
var = "SIR",
type = "choro",
breaks = break_SIR,
pal = col_pal,
pal = col_pal,
cex = 2,
leg_title = "SIR")
mf_layout(title = "Standardized Incidence Ratio of W Fever")
......@@ -116,9 +116,11 @@ These maps illustrate the spatial heterogeneity of the cases. The incidence show
::: callout-tip
### To go further ...
In this example, we standardized the cases distribution for population count. This simple standardization assumes that the risk of contracting the disease is similar for each person. However, assumption does not hold for all diseases and for all observed events since confounding effects can create nuisance into the interpretations (e.g., the number of childhood illness and death outcomes in a district are usually related to the age pyramid) and you should keep in mind that other standardization can be performed based on variables known to have an effect but that you don't want to analyze (e.g., sex ratio, occupations, age pyramid).
In this example, we standardized the cases distribution for population count. This simple standardization assumes that the risk of contracting the disease is similar for each person. However, assumption does not hold for all diseases and for all observed events since confounding effects can create nuisance into the interpretations (e.g., the number of childhood illness and death outcomes in a district are usually related to the age pyramid). A confounding factor is a variable that influences both the dependent variable and independent variable, causing a spurious association. You should keep in mind that other standardization can be performed based on these confounding factors, i.e. variables known to have an effect but that you don't want to analyze (e.g., sex ratio, occupations, age pyramid).
In addition, one can wonder what does an SIR \~ 1 means, i.e., what is the threshold to decide whether the SIR is greater, lower or equivalent to 1. The significant of the SIR can be tested globally (to determine whether or not the incidence is homogeneously distributed) and locally in each district (to determine Which district have an SIR different than 1). We won't perform these analyses in this tutorial but you can look at the function `?achisq.test()` (from `Dcluster` package [@DCluster]) and `?probmap()` (from `spdep` package [@spdep]) to compute these statistics.
![](img/Stat_Confounders.jpg){fig-align="center" width="300"}
In addition, one can wonder what does an SIR \~ 1 means, i.e., what is the threshold to decide whether the SIR is greater, lower or equivalent to 1. The significant of the SIR can be tested globally (to determine whether or not the incidence is homogeneously distributed) and locally in each district (to determine Which district have an SIR different than 1). We won't perform these analyses in this tutorial but you can look at the functions `?achisq.test()` (from `Dcluster` package [@DCluster]) and `?probmap()` (from `spdep` package [@spdep]) to compute these statistics.
:::
## Cluster analysis
......@@ -131,6 +133,8 @@ Why studying clusters in epidemiology? Cluster analysis help identifying unusual
- The **2nd order effects** describes process of spread, contagion and diffusion of diseases caused by interactions between individuals. This includes transmission of infectious disease by proximity, but also the transmission of non-infectious disease, for example, with the diffusion of social norms within networks. This effect assume that the observed pattern is caused by correlations or co-variations.
![](img/Stat_order_effects.png){fig-align="center" width="500"}
No statistical methods could distinguish between these competing processes since their outcome results in similar pattern of points. The cluster analysis help describing the magnitude and the location of pattern but in no way could answer the question of why such patterns occurs. It is therefore a step that help detecting cluster for description and surveillance purpose and rising hypothesis on the underlying process that will lead further investigations.
Knowledge about the disease and its transmission process could orientate the choice of the methods of study. We presented in this brief tutorial two methods of cluster detection, the Moran's I test that test for spatial independence (likely related to 2nd order effects) and the scan statistics that test for homogeneous distribution (likely related 1st order effects). It relies on epidemiologist to select the tools that best serve the studied question.
......@@ -456,5 +460,5 @@ mf_layout(title = "Cluster using kulldorf scan statistic")
In this example, the expected number of cases was defined using the population count but note that standardization over other variables as age could also be implemented with the `strata` parameter in the `kulldorff()` function.
In addition, this cluster analysis was performed solely using the spatial scan but you should keep in mind that this method of cluster detection can be implemented for spatio-temporal data as well where the cluster definition is an abnormal number of cases in a delimited spatial area and during a given period of time. The windows of observation are therefore defined for a different center, radius and time-period. You should look at the function `scan_ep_poisson()` function in the package `scanstatistic` [@scanstatistics] for this analysis.
In addition, this cluster analysis was performed solely using the spatial scan but you should keep in mind that this method of cluster detection can be implemented for spatio-temporal data as well where the cluster definition is an abnormal number of cases in a delimited spatial area and during a given period of time. The windows of observation are therefore defined for a different center, radius and time-period. You should take a look at the function `scan_ep_poisson()` function in the package `scanstatistic` [@scanstatistics] for this analysis.
:::
img/Stat_Confounders.jpg

210 KiB

img/Stat_order_effects.png

367 KiB

......@@ -2,7 +2,7 @@
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><head>
<meta charset="utf-8">
<meta name="generator" content="quarto-1.1.251">
<meta name="generator" content="quarto-1.1.189">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
......@@ -361,7 +361,7 @@ Projected CRS: WGS 84 / UTM zone 48N
<span id="cb7-28"><a href="#cb7-28" aria-hidden="true" tabindex="-1"></a> <span class="at">var =</span> <span class="st">"SIR"</span>,</span>
<span id="cb7-29"><a href="#cb7-29" aria-hidden="true" tabindex="-1"></a> <span class="at">type =</span> <span class="st">"choro"</span>,</span>
<span id="cb7-30"><a href="#cb7-30" aria-hidden="true" tabindex="-1"></a> <span class="at">breaks =</span> break_SIR, </span>
<span id="cb7-31"><a href="#cb7-31" aria-hidden="true" tabindex="-1"></a> <span class="at">pal =</span> col_pal, </span>
<span id="cb7-31"><a href="#cb7-31" aria-hidden="true" tabindex="-1"></a> <span class="at">pal =</span> col_pal,</span>
<span id="cb7-32"><a href="#cb7-32" aria-hidden="true" tabindex="-1"></a> <span class="at">cex =</span> <span class="dv">2</span>,</span>
<span id="cb7-33"><a href="#cb7-33" aria-hidden="true" tabindex="-1"></a> <span class="at">leg_title =</span> <span class="st">"SIR"</span>)</span>
<span id="cb7-34"><a href="#cb7-34" aria-hidden="true" tabindex="-1"></a><span class="fu">mf_layout</span>(<span class="at">title =</span> <span class="st">"Standardized Incidence Ratio of W Fever"</span>)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
......@@ -385,8 +385,13 @@ To go further …
</div>
</div>
<div class="callout-body-container callout-body">
<p>In this example, we standardized the cases distribution for population count. This simple standardization assumes that the risk of contracting the disease is similar for each person. However, assumption does not hold for all diseases and for all observed events since confounding effects can create nuisance into the interpretations (e.g., the number of childhood illness and death outcomes in a district are usually related to the age pyramid) and you should keep in mind that other standardization can be performed based on variables known to have an effect but that you don’t want to analyze (e.g., sex ratio, occupations, age pyramid).</p>
<p>In addition, one can wonder what does an SIR ~ 1 means, i.e., what is the threshold to decide whether the SIR is greater, lower or equivalent to 1. The significant of the SIR can be tested globally (to determine whether or not the incidence is homogeneously distributed) and locally in each district (to determine Which district have an SIR different than 1). We won’t perform these analyses in this tutorial but you can look at the function <code>?achisq.test()</code> (from <code>Dcluster</code> package <span class="citation" data-cites="DCluster">(<a href="references.html#ref-DCluster" role="doc-biblioref">Gómez-Rubio et al. 2015</a>)</span>) and <code>?probmap()</code> (from <code>spdep</code> package <span class="citation" data-cites="spdep">(<a href="references.html#ref-spdep" role="doc-biblioref">R. Bivand et al. 2015</a>)</span>) to compute these statistics.</p>
<p>In this example, we standardized the cases distribution for population count. This simple standardization assumes that the risk of contracting the disease is similar for each person. However, assumption does not hold for all diseases and for all observed events since confounding effects can create nuisance into the interpretations (e.g., the number of childhood illness and death outcomes in a district are usually related to the age pyramid). A confounding factor is a variable that influences both the dependent variable and independent variable, causing a spurious association. You should keep in mind that other standardization can be performed based on these confounding factors, i.e.&nbsp;variables known to have an effect but that you don’t want to analyze (e.g., sex ratio, occupations, age pyramid).</p>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="img/Stat_Confounders.jpg" class="img-fluid figure-img" width="300"></p>
</figure>
</div>
<p>In addition, one can wonder what does an SIR ~ 1 means, i.e., what is the threshold to decide whether the SIR is greater, lower or equivalent to 1. The significant of the SIR can be tested globally (to determine whether or not the incidence is homogeneously distributed) and locally in each district (to determine Which district have an SIR different than 1). We won’t perform these analyses in this tutorial but you can look at the functions <code>?achisq.test()</code> (from <code>Dcluster</code> package <span class="citation" data-cites="DCluster">(<a href="references.html#ref-DCluster" role="doc-biblioref">Gómez-Rubio et al. 2015</a>)</span>) and <code>?probmap()</code> (from <code>spdep</code> package <span class="citation" data-cites="spdep">(<a href="references.html#ref-spdep" role="doc-biblioref">R. Bivand et al. 2015</a>)</span>) to compute these statistics.</p>
</div>
</div>
</section>
......@@ -399,6 +404,11 @@ To go further …
<li><p>The <strong>1st order effects</strong> are the spatial variations of cases distribution caused by underlying properties of environment or the population structure itself. In such process individual get infected independently from the rest of the population. Such process includes the infection through an environment at risk as, for example, air pollution, contaminated waters or soils and UV exposition. This effect assume that the observed pattern is caused by a difference in risk intensity.</p></li>
<li><p>The <strong>2nd order effects</strong> describes process of spread, contagion and diffusion of diseases caused by interactions between individuals. This includes transmission of infectious disease by proximity, but also the transmission of non-infectious disease, for example, with the diffusion of social norms within networks. This effect assume that the observed pattern is caused by correlations or co-variations.</p></li>
</ul>
<div class="quarto-figure quarto-figure-center">
<figure class="figure">
<p><img src="img/Stat_order_effects.png" class="img-fluid figure-img" width="500"></p>
</figure>
</div>
<p>No statistical methods could distinguish between these competing processes since their outcome results in similar pattern of points. The cluster analysis help describing the magnitude and the location of pattern but in no way could answer the question of why such patterns occurs. It is therefore a step that help detecting cluster for description and surveillance purpose and rising hypothesis on the underlying process that will lead further investigations.</p>
<p>Knowledge about the disease and its transmission process could orientate the choice of the methods of study. We presented in this brief tutorial two methods of cluster detection, the Moran’s I test that test for spatial independence (likely related to 2nd order effects) and the scan statistics that test for homogeneous distribution (likely related 1st order effects). It relies on epidemiologist to select the tools that best serve the studied question.</p>
<div class="callout-note callout callout-style-default callout-captioned">
......@@ -488,14 +498,14 @@ Moran’s I test
Model used when sampling: Poisson
Number of simulations: 499
Statistic: 0.1566449
p-value : 0.008 </code></pre>
p-value : 0.014 </code></pre>
</div>
<div class="sourceCode cell-code" id="cb11"><pre class="sourceCode r code-with-copy"><code class="sourceCode r"><span id="cb11-1"><a href="#cb11-1" aria-hidden="true" tabindex="-1"></a><span class="fu">plot</span>(m_test)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output-display">
<p><img src="07-basic_statistics_files/figure-html/MoransI-1.png" class="img-fluid" width="768"></p>
</div>
</div>
<p>The Moran’s statistics is here <span class="math inline">\(I =\)</span> 0.16. When comparing its value to the H0 distribution (built under 499 simulations), the probability of observing such a I value under the null hypothesis, i.e.&nbsp;the distribution of cases is spatially independent, is <span class="math inline">\(p_{value} =\)</span> 0.008. We therefore reject H0 with error risk of <span class="math inline">\(\alpha = 5\%\)</span>. The distribution of cases is therefore autocorrelated across districts in Cambodia.</p>
<p>The Moran’s statistics is here <span class="math inline">\(I =\)</span> 0.16. When comparing its value to the H0 distribution (built under 499 simulations), the probability of observing such a I value under the null hypothesis, i.e.&nbsp;the distribution of cases is spatially independent, is <span class="math inline">\(p_{value} =\)</span> 0.014. We therefore reject H0 with error risk of <span class="math inline">\(\alpha = 5\%\)</span>. The distribution of cases is therefore autocorrelated across districts in Cambodia.</p>
</section>
<section id="the-local-morans-i-lisa-test" class="level4" data-number="6.2.2.2">
<h4 data-number="6.2.2.2" class="anchored" data-anchor-id="the-local-morans-i-lisa-test"><span class="header-section-number">6.2.2.2</span> The Local Moran’s I LISA test</h4>
......@@ -710,7 +720,7 @@ Kulldorf test
<span id="cb30-7"><a href="#cb30-7" aria-hidden="true" tabindex="-1"></a><span class="fu">print</span>(df_secondary_clusters)</span></code><button title="Copy to Clipboard" class="code-copy-button"><i class="bi"></i></button></pre></div>
<div class="cell-output cell-output-stdout">
<pre class="code-out"><code> SMR number.of.cases expected.cases p.value
1 3.767698 16 4.246625 0.008</code></pre>
1 3.767698 16 4.246625 0.014</code></pre>
</div>
</div>
<p>We only have one secondary cluster composed of one district.</p>
......@@ -754,7 +764,7 @@ To go further …
</div>
<div class="callout-body-container callout-body">
<p>In this example, the expected number of cases was defined using the population count but note that standardization over other variables as age could also be implemented with the <code>strata</code> parameter in the <code>kulldorff()</code> function.</p>
<p>In addition, this cluster analysis was performed solely using the spatial scan but you should keep in mind that this method of cluster detection can be implemented for spatio-temporal data as well where the cluster definition is an abnormal number of cases in a delimited spatial area and during a given period of time. The windows of observation are therefore defined for a different center, radius and time-period. You should look at the function <code>scan_ep_poisson()</code> function in the package <code>scanstatistic</code> <span class="citation" data-cites="scanstatistics">(<a href="references.html#ref-scanstatistics" role="doc-biblioref">Allévius 2018</a>)</span> for this analysis.</p>
<p>In addition, this cluster analysis was performed solely using the spatial scan but you should keep in mind that this method of cluster detection can be implemented for spatio-temporal data as well where the cluster definition is an abnormal number of cases in a delimited spatial area and during a given period of time. The windows of observation are therefore defined for a different center, radius and time-period. You should take a look at the function <code>scan_ep_poisson()</code> function in the package <code>scanstatistic</code> <span class="citation" data-cites="scanstatistics">(<a href="references.html#ref-scanstatistics" role="doc-biblioref">Allévius 2018</a>)</span> for this analysis.</p>
</div>
</div>
......@@ -915,4 +925,4 @@ window.document.addEventListener("DOMContentLoaded", function (event) {
<script src="site_libs/quarto-html/zenscroll-min.js"></script>
</body></html>
</body></html>
\ No newline at end of file
public/07-basic_statistics_files/figure-html/LocalMoransI_plt-1.png

43.2 KiB | W: | H:

public/07-basic_statistics_files/figure-html/LocalMoransI_plt-1.png

43.3 KiB | W: | H:

public/07-basic_statistics_files/figure-html/LocalMoransI_plt-1.png
public/07-basic_statistics_files/figure-html/LocalMoransI_plt-1.png
public/07-basic_statistics_files/figure-html/LocalMoransI_plt-1.png
public/07-basic_statistics_files/figure-html/LocalMoransI_plt-1.png
  • 2-up
  • Swipe
  • Onion skin
public/07-basic_statistics_files/figure-html/MoransI-1.png

15.4 KiB | W: | H:

public/07-basic_statistics_files/figure-html/MoransI-1.png

17.2 KiB | W: | H:

public/07-basic_statistics_files/figure-html/MoransI-1.png
public/07-basic_statistics_files/figure-html/MoransI-1.png
public/07-basic_statistics_files/figure-html/MoransI-1.png
public/07-basic_statistics_files/figure-html/MoransI-1.png
  • 2-up
  • Swipe
  • Onion skin
public/07-basic_statistics_files/figure-html/cases_visualization-1.png

266 KiB | W: | H:

public/07-basic_statistics_files/figure-html/cases_visualization-1.png

41.6 KiB | W: | H:

public/07-basic_statistics_files/figure-html/cases_visualization-1.png
public/07-basic_statistics_files/figure-html/cases_visualization-1.png
public/07-basic_statistics_files/figure-html/cases_visualization-1.png
public/07-basic_statistics_files/figure-html/cases_visualization-1.png
  • 2-up
  • Swipe
  • Onion skin
public/07-basic_statistics_files/figure-html/distribution-1.png

66.2 KiB | W: | H:

public/07-basic_statistics_files/figure-html/distribution-1.png

20.4 KiB | W: | H:

public/07-basic_statistics_files/figure-html/distribution-1.png
public/07-basic_statistics_files/figure-html/distribution-1.png
public/07-basic_statistics_files/figure-html/distribution-1.png
public/07-basic_statistics_files/figure-html/distribution-1.png
  • 2-up
  • Swipe
  • Onion skin
public/07-basic_statistics_files/figure-html/inc_visualization-1.png

349 KiB | W: | H:

public/07-basic_statistics_files/figure-html/inc_visualization-1.png

52.2 KiB | W: | H:

public/07-basic_statistics_files/figure-html/inc_visualization-1.png
public/07-basic_statistics_files/figure-html/inc_visualization-1.png
public/07-basic_statistics_files/figure-html/inc_visualization-1.png
public/07-basic_statistics_files/figure-html/inc_visualization-1.png
  • 2-up
  • Swipe
  • Onion skin
public/07-basic_statistics_files/figure-html/kd_test-1.png

15.6 KiB | W: | H:

public/07-basic_statistics_files/figure-html/kd_test-1.png

15.8 KiB | W: | H:

public/07-basic_statistics_files/figure-html/kd_test-1.png
public/07-basic_statistics_files/figure-html/kd_test-1.png
public/07-basic_statistics_files/figure-html/kd_test-1.png
public/07-basic_statistics_files/figure-html/kd_test-1.png
  • 2-up
  • Swipe
  • Onion skin
public/07-basic_statistics_files/figure-html/plt_clusters-1.png

287 KiB | W: | H:

public/07-basic_statistics_files/figure-html/plt_clusters-1.png

43.4 KiB | W: | H:

public/07-basic_statistics_files/figure-html/plt_clusters-1.png
public/07-basic_statistics_files/figure-html/plt_clusters-1.png
public/07-basic_statistics_files/figure-html/plt_clusters-1.png
public/07-basic_statistics_files/figure-html/plt_clusters-1.png
  • 2-up
  • Swipe
  • Onion skin
public/img/Stat_Confounders.jpg

210 KiB

public/img/Stat_order_effects.png

367 KiB

This diff is collapsed.
This diff is collapsed.
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment