You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: _sources/stats.md.txt
+29-5Lines changed: 29 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -1,10 +1,34 @@
1
1
# Statistical analysis
2
2
3
-
## Using R
3
+
## ⚠️ IMPORTANT: Analysis Approach Update
4
4
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.**
6
6
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)
8
32
9
33
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).
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.
51
75
@@ -64,7 +88,7 @@ examples/templates/*
64
88
| {ref}`hbc_template` | [](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/templates/HeartBeatCounting.ipynb)
65
89
| {ref}`hrd_template` | [](https://colab.research.google.com/github/embodied-computation-group/Cardioception/blob/master/docs/source/examples/templates/HeartRateDiscrimination.ipynb)
66
90
67
-
## Bayesian modelling of psychophysics
91
+
## Bayesian modelling of psychophysics (Deprecated)
68
92
69
93
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...).
<h1>Statistical analysis<aclass="headerlink" href="#statistical-analysis" title="Permalink to this heading">#</a></h1>
483
-
<sectionid="using-r">
484
-
<h2>Using R<aclass="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 <aclass="reference external" href="https://github.com/embodied-computation-group/Cardioception/tree/master/docs/source/examples/R">this folder</a>.</p>
483
+
<sectionid="important-analysis-approach-update">
484
+
<h2>⚠️ IMPORTANT: Analysis Approach Update<aclass="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>
486
486
</section>
487
-
<sectionid="using-python">
488
-
<h2>Using Python<aclass="headerlink" href="#using-python" title="Permalink to this heading">#</a></h2>
487
+
<sectionid="recommended-r-analysis">
488
+
<h2>📊 Recommended: R Analysis<aclass="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 <codeclass="docutils literal notranslate"><spanclass="pre">R_analysis/</span></code> directory.</strong></p>
490
+
<p>The R analysis provides:</p>
491
+
<ulclass="simple">
492
+
<li><p><strong>Individual subject analysis</strong> with reaction time plots and signal detection theory metrics</p></li>
<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
+
<sectionid="quick-start-with-r-analysis">
498
+
<h3>🚀 Quick Start with R Analysis<aclass="headerlink" href="#quick-start-with-r-analysis" title="Permalink to this heading">#</a></h3>
499
+
<olclass="arabic simple">
500
+
<li><p><strong>Individual subject analysis</strong>: See <codeclass="docutils literal notranslate"><spanclass="pre">R_analysis/Example</span><spanclass="pre">scripts/Example_analysis_simple.Rmd</span></code></p></li>
501
+
<li><p><strong>Group-level analysis</strong>: See <codeclass="docutils literal notranslate"><spanclass="pre">R_analysis/Example</span><spanclass="pre">scripts/Example_analysis_Hierarchical.Rmd</span></code></p></li>
502
+
<li><p><strong>Bayesian analysis</strong>: See <codeclass="docutils literal notranslate"><spanclass="pre">R_analysis/Example</span><spanclass="pre">scripts/Example_analysis_bayesian.Rmd</span></code></p></li>
503
+
</ol>
504
+
<p>For complete documentation and examples, see the <aclass="reference internal" href="#../R_analysis/README.md"><spanclass="xref myst">R Analysis README</span></a>.</p>
505
+
</section>
506
+
</section>
507
+
<hrclass="docutils" />
508
+
<sectionid="deprecated-python-analysis">
509
+
<h2>📈 Deprecated: Python Analysis<aclass="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
+
<sectionid="using-python-deprecated">
512
+
<h3>Using Python (Deprecated)<aclass="headerlink" href="#using-python-deprecated" title="Permalink to this heading">#</a></h3>
489
513
<p>If you want to use Python to analyse your data, the package includes two functions (<aclass="reference internal" href="generated/reports/cardioception.reports.preprocessing.html#cardioception.reports.preprocessing" title="cardioception.reports.preprocessing"><spanclass="xref myst py py-func">preprocessing</span></a> and <aclass="reference internal" href="generated/reports/cardioception.reports.report.html#cardioception.reports.report" title="cardioception.reports.report"><spanclass="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>
<h3>Behavioural summary using the preprocessing function<aclass="headerlink" href="#behavioural-summary-using-the-preprocessing-function" title="Permalink to this heading">#</a></h3>
492
517
<p>The reports module includes a <aclass="reference internal" href="generated/reports/cardioception.reports.preprocessing.html#cardioception.reports.preprocessing" title="cardioception.reports.preprocessing"><spanclass="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 <codeclass="docutils literal notranslate"><spanclass="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
522
547
</div>
523
548
</section>
524
549
</section>
525
-
<sectionid="report-templates">
526
-
<h2>Report templates<aclass="headerlink" href="#report-templates" title="Permalink to this heading">#</a></h2>
550
+
<sectionid="report-templates-deprecated">
551
+
<h2>Report templates (Deprecated)<aclass="headerlink" href="#report-templates-deprecated" title="Permalink to this heading">#</a></h2>
527
552
<p>Here, you will find the report templates used to produce the HTML reports when calling the <aclass="reference internal" href="generated/reports/cardioception.reports.report.html#cardioception.reports.report" title="cardioception.reports.report"><spanclass="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 <aclass="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>
<h2>Bayesian modelling of psychophysics (Deprecated)<aclass="headerlink" href="#bayesian-modelling-of-psychophysics-deprecated" title="Permalink to this heading">#</a></h2>
549
574
<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>
550
575
<divclass="toctree-wrapper compound">
551
576
</div>
@@ -614,14 +639,19 @@ <h2>Bayesian modelling of psychophysics<a class="headerlink" href="#bayesian-mod
0 commit comments