Skip to content

Commit e581906

Browse files
committed
Deploying to gh-pages from @ 914f383 🚀
1 parent 73f97d6 commit e581906

File tree

5 files changed

+73
-19
lines changed

5 files changed

+73
-19
lines changed

.doctrees/environment.pickle

1.42 KB
Binary file not shown.

.doctrees/stats.doctree

7.36 KB
Binary file not shown.

_sources/stats.md.txt

Lines changed: 29 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,34 @@
11
# Statistical analysis
22

3-
## Using R
3+
## ⚠️ IMPORTANT: Analysis Approach Update
44

5-
If you want to use R to analyse your data, you can find R/Stan scripts with example notebooks in [this folder](https://github.com/embodied-computation-group/Cardioception/tree/master/docs/source/examples/R).
5+
**The Python analysis tutorials are deprecated. We recommend using the R analysis scripts for all Cardioception data analysis.**
66

7-
## Using Python
7+
## 📊 Recommended: R Analysis
8+
9+
**For comprehensive data analysis, please use our R analysis scripts located in the `R_analysis/` directory.**
10+
11+
The R analysis provides:
12+
- **Individual subject analysis** with reaction time plots and signal detection theory metrics
13+
- **Group-level hierarchical analysis**
14+
- **Bayesian analysis** using Stan models
15+
- **Comprehensive visualization** of results
16+
17+
### 🚀 Quick Start with R Analysis
18+
19+
1. **Individual subject analysis**: See `R_analysis/Example scripts/Example_analysis_simple.Rmd`
20+
2. **Group-level analysis**: See `R_analysis/Example scripts/Example_analysis_Hierarchical.Rmd`
21+
3. **Bayesian analysis**: See `R_analysis/Example scripts/Example_analysis_bayesian.Rmd`
22+
23+
For complete documentation and examples, see the [R Analysis README](../R_analysis/README.md).
24+
25+
---
26+
27+
## 📈 Deprecated: Python Analysis
28+
29+
*The following Python analysis methods are deprecated and may not be maintained. We recommend using the R analysis approach above.*
30+
31+
### Using Python (Deprecated)
832

933
If you want to use Python to analyse your data, the package includes two functions ([preprocessing](cardioception.reports.preprocessing) and [report](cardioception.reports.report)) that can help automate the analysis of large datasets obtained with the Heart Rate Discrimination task. We also provide notebooks detailing specific parts of the data analysis and Bayesian modelling of psychophysics (see below).
1034

@@ -45,7 +69,7 @@ for f in data_folder.iterdir():
4569
results_df = report(result_path=f, report_path=Path(data_folder, "reports"))
4670
```
4771

48-
## Report templates
72+
## Report templates (Deprecated)
4973

5074
Here, you will find the report templates used to produce the HTML reports when calling the [report function](cardioception.reports.report) function. We provide one for the Heart Rate Discrimination task and one for the Heart Beat Counting task. You can navigate the notebooks by clicking on the links or run them interactively in [Google Colab](https://colab.research.google.com/) using the badges, and upload your data. Visualizing the data this way is recommended to assess the quality of the PPG recording or the general performance of the participant during the tasks.
5175

@@ -64,7 +88,7 @@ examples/templates/*
6488
| {ref}`hbc_template` | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/templates/HeartBeatCounting.ipynb)
6589
| {ref}`hrd_template` | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/templates/HeartRateDiscrimination.ipynb)
6690

67-
## Bayesian modelling of psychophysics
91+
## Bayesian modelling of psychophysics (Deprecated)
6892

6993
These notebooks provide a more detailled introduction to the Bayesian modelling of the psychometric functions to estimate threshold and slope offline (as opposed to the online estimation performed by the Psi staircase). The models are implemented in PyMC, the code can easily be adapted to fit different modelling needs (e.g. group comparison, repeated measure...).
7094

searchindex.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

stats.html

Lines changed: 43 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -480,13 +480,38 @@
480480

481481
<section class="tex2jax_ignore mathjax_ignore" id="statistical-analysis">
482482
<h1>Statistical analysis<a class="headerlink" href="#statistical-analysis" title="Permalink to this heading">#</a></h1>
483-
<section id="using-r">
484-
<h2>Using R<a class="headerlink" href="#using-r" title="Permalink to this heading">#</a></h2>
485-
<p>If you want to use R to analyse your data, you can find R/Stan scripts with example notebooks in <a class="reference external" href="https://github.com/embodied-computation-group/Cardioception/tree/master/docs/source/examples/R">this folder</a>.</p>
483+
<section id="important-analysis-approach-update">
484+
<h2>⚠️ IMPORTANT: Analysis Approach Update<a class="headerlink" href="#important-analysis-approach-update" title="Permalink to this heading">#</a></h2>
485+
<p><strong>The Python analysis tutorials are deprecated. We recommend using the R analysis scripts for all Cardioception data analysis.</strong></p>
486486
</section>
487-
<section id="using-python">
488-
<h2>Using Python<a class="headerlink" href="#using-python" title="Permalink to this heading">#</a></h2>
487+
<section id="recommended-r-analysis">
488+
<h2>📊 Recommended: R Analysis<a class="headerlink" href="#recommended-r-analysis" title="Permalink to this heading">#</a></h2>
489+
<p><strong>For comprehensive data analysis, please use our R analysis scripts located in the <code class="docutils literal notranslate"><span class="pre">R_analysis/</span></code> directory.</strong></p>
490+
<p>The R analysis provides:</p>
491+
<ul class="simple">
492+
<li><p><strong>Individual subject analysis</strong> with reaction time plots and signal detection theory metrics</p></li>
493+
<li><p><strong>Group-level hierarchical analysis</strong></p></li>
494+
<li><p><strong>Bayesian analysis</strong> using Stan models</p></li>
495+
<li><p><strong>Comprehensive visualization</strong> of results</p></li>
496+
</ul>
497+
<section id="quick-start-with-r-analysis">
498+
<h3>🚀 Quick Start with R Analysis<a class="headerlink" href="#quick-start-with-r-analysis" title="Permalink to this heading">#</a></h3>
499+
<ol class="arabic simple">
500+
<li><p><strong>Individual subject analysis</strong>: See <code class="docutils literal notranslate"><span class="pre">R_analysis/Example</span> <span class="pre">scripts/Example_analysis_simple.Rmd</span></code></p></li>
501+
<li><p><strong>Group-level analysis</strong>: See <code class="docutils literal notranslate"><span class="pre">R_analysis/Example</span> <span class="pre">scripts/Example_analysis_Hierarchical.Rmd</span></code></p></li>
502+
<li><p><strong>Bayesian analysis</strong>: See <code class="docutils literal notranslate"><span class="pre">R_analysis/Example</span> <span class="pre">scripts/Example_analysis_bayesian.Rmd</span></code></p></li>
503+
</ol>
504+
<p>For complete documentation and examples, see the <a class="reference internal" href="#../R_analysis/README.md"><span class="xref myst">R Analysis README</span></a>.</p>
505+
</section>
506+
</section>
507+
<hr class="docutils" />
508+
<section id="deprecated-python-analysis">
509+
<h2>📈 Deprecated: Python Analysis<a class="headerlink" href="#deprecated-python-analysis" title="Permalink to this heading">#</a></h2>
510+
<p><em>The following Python analysis methods are deprecated and may not be maintained. We recommend using the R analysis approach above.</em></p>
511+
<section id="using-python-deprecated">
512+
<h3>Using Python (Deprecated)<a class="headerlink" href="#using-python-deprecated" title="Permalink to this heading">#</a></h3>
489513
<p>If you want to use Python to analyse your data, the package includes two functions (<a class="reference internal" href="generated/reports/cardioception.reports.preprocessing.html#cardioception.reports.preprocessing" title="cardioception.reports.preprocessing"><span class="xref myst py py-func">preprocessing</span></a> and <a class="reference internal" href="generated/reports/cardioception.reports.report.html#cardioception.reports.report" title="cardioception.reports.report"><span class="xref myst py py-func">report</span></a>) that can help automate the analysis of large datasets obtained with the Heart Rate Discrimination task. We also provide notebooks detailing specific parts of the data analysis and Bayesian modelling of psychophysics (see below).</p>
514+
</section>
490515
<section id="behavioural-summary-using-the-preprocessing-function">
491516
<h3>Behavioural summary using the preprocessing function<a class="headerlink" href="#behavioural-summary-using-the-preprocessing-function" title="Permalink to this heading">#</a></h3>
492517
<p>The reports module includes a <a class="reference internal" href="generated/reports/cardioception.reports.preprocessing.html#cardioception.reports.preprocessing" title="cardioception.reports.preprocessing"><span class="xref myst py py-func">preprocessing function</span></a> that automates the analysis and extraction of behavioural variables from the main outputs saved by the task. The function only requires the <code class="docutils literal notranslate"><span class="pre">final.txt</span></code> data frame (either the Pandas data frame or simply a path to the file) that is saved in each subject folder and will return a summary data frame containing the response time, the psychometric parameter estimated by the Psi algorithm and Bayesian inference as well as SDT measures and metacognitive efficiency (meta-d prime). This approach is the most straightforward to extract relevant parameters using default settings that will fit most users’ needs.</p>
@@ -522,8 +547,8 @@ <h3>HTML reports using the report function<a class="headerlink" href="#html-repo
522547
</div>
523548
</section>
524549
</section>
525-
<section id="report-templates">
526-
<h2>Report templates<a class="headerlink" href="#report-templates" title="Permalink to this heading">#</a></h2>
550+
<section id="report-templates-deprecated">
551+
<h2>Report templates (Deprecated)<a class="headerlink" href="#report-templates-deprecated" title="Permalink to this heading">#</a></h2>
527552
<p>Here, you will find the report templates used to produce the HTML reports when calling the <a class="reference internal" href="generated/reports/cardioception.reports.report.html#cardioception.reports.report" title="cardioception.reports.report"><span class="xref myst py py-func">report function</span></a> function. We provide one for the Heart Rate Discrimination task and one for the Heart Beat Counting task. You can navigate the notebooks by clicking on the links or run them interactively in <a class="reference external" href="https://colab.research.google.com/">Google Colab</a> using the badges, and upload your data. Visualizing the data this way is recommended to assess the quality of the PPG recording or the general performance of the participant during the tasks.</p>
528553
<div class="toctree-wrapper compound">
529554
</div>
@@ -544,8 +569,8 @@ <h2>Report templates<a class="headerlink" href="#report-templates" title="Permal
544569
</table>
545570
</div>
546571
</section>
547-
<section id="bayesian-modelling-of-psychophysics">
548-
<h2>Bayesian modelling of psychophysics<a class="headerlink" href="#bayesian-modelling-of-psychophysics" title="Permalink to this heading">#</a></h2>
572+
<section id="bayesian-modelling-of-psychophysics-deprecated">
573+
<h2>Bayesian modelling of psychophysics (Deprecated)<a class="headerlink" href="#bayesian-modelling-of-psychophysics-deprecated" title="Permalink to this heading">#</a></h2>
549574
<p>These notebooks provide a more detailled introduction to the Bayesian modelling of the psychometric functions to estimate threshold and slope offline (as opposed to the online estimation performed by the Psi staircase). The models are implemented in PyMC, the code can easily be adapted to fit different modelling needs (e.g. group comparison, repeated measure…).</p>
550575
<div class="toctree-wrapper compound">
551576
</div>
@@ -614,14 +639,19 @@ <h2>Bayesian modelling of psychophysics<a class="headerlink" href="#bayesian-mod
614639
</div>
615640
<nav class="bd-toc-nav page-toc" aria-labelledby="pst-page-navigation-heading-2">
616641
<ul class="visible nav section-nav flex-column">
617-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#using-r">Using R</a></li>
618-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#using-python">Using Python</a><ul class="nav section-nav flex-column">
642+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#important-analysis-approach-update">⚠️ IMPORTANT: Analysis Approach Update</a></li>
643+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#recommended-r-analysis">📊 Recommended: R Analysis</a><ul class="nav section-nav flex-column">
644+
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#quick-start-with-r-analysis">🚀 Quick Start with R Analysis</a></li>
645+
</ul>
646+
</li>
647+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#deprecated-python-analysis">📈 Deprecated: Python Analysis</a><ul class="nav section-nav flex-column">
648+
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#using-python-deprecated">Using Python (Deprecated)</a></li>
619649
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#behavioural-summary-using-the-preprocessing-function">Behavioural summary using the preprocessing function</a></li>
620650
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#html-reports-using-the-report-function">HTML reports using the report function</a></li>
621651
</ul>
622652
</li>
623-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#report-templates">Report templates</a></li>
624-
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#bayesian-modelling-of-psychophysics">Bayesian modelling of psychophysics</a></li>
653+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#report-templates-deprecated">Report templates (Deprecated)</a></li>
654+
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#bayesian-modelling-of-psychophysics-deprecated">Bayesian modelling of psychophysics (Deprecated)</a></li>
625655
</ul>
626656
</nav></div>
627657

0 commit comments

Comments
 (0)