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: README.md
+28-36Lines changed: 28 additions & 36 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,49 +12,23 @@ This repository reflects the version cited in peer-reviewed publications and is
12
12
13
13
***
14
14
15
+
# 📢 2025 Update – Hierarchical Modelling Toolkit
16
+
17
+
> 📢 **New in 2025:** We released the [Hierarchical Interoception modelling toolbox](https://github.com/embodied-computation-group/Hierarchical-Interoception) alongside the preprint [*Hierarchical Bayesian Modelling of Interoceptive Psychophysics*](https://www.biorxiv.org/content/10.1101/2025.08.27.672360v1). This toolkit delivers turnkey hierarchical Bayesian analyses, normative priors, and power-analysis resources for Heart Rate Discrimination and related tasks. We strongly recommend using it to model data collected with Cardioception.
The Cardioception Python Package - Measuring Interoception with Psychopy - implements two measures of cardiac interoception (cardioception):
20
24
21
25
1. The **Heartbeat counting task** developed by Rainer Schandry<sup>1,2</sup>. This task cardiac measures interoception by asking participants to count their heartbeats for a given period of time. An accuracy score is then derived by comparing the reported number of heartbeats and the true number of heartbeats.
22
-
2. The **Heart Rate Discrimination Task** <sup>3</sup> implementing an adaptive psychophysical measure of cardiac interoception where participants have to estimate the frequency of their heart rate by comparing it to tones that can be faster or slower. By manipulating the difference between the true heart rate and the presented tone using different staircase procedures, the bias (threshold) and precision (slope) of the psychometric function can be estimated either online or offline (see *Analyses* below), together with metacognitive efficiency.
26
+
2. The **Heart Rate Discrimination Task** <sup>3</sup> implementing an adaptive psychophysical measure of cardiac interoception where participants have to estimate the frequency of their heart rate by comparing it to tones that can be faster or slower. By manipulating the difference between the true heart rate and the presented tone using different staircase procedures, the bias (threshold) and precision (slope) of the psychometric function can be estimated either online or offline (see *Legacy analysis resources* below), together with metacognitive efficiency.
23
27
24
28
These tasks can run using minimal experimental settings: a computer and a recording device to monitor the heart rate of the participant. The default version of the task use the [Nonin 3012LP Xpod USB pulse oximeter](https://www.nonin.com/products/xpod/) together with [Nonin 8000SM 'soft-clip' fingertip sensors](https://www.nonin.com/products/8000s/). This sensor can be plugged directly into the stim PC via USB and will work with Cardioception without any additional coding required. The tasks can also integrate easily with other recording devices and experimental settings (ECG, M/EEG, fMRI...).
25
29
26
30
The documentation can be found under the following [link](https://embodied-computation-group.github.io/Cardioception/#).
27
31
28
-
## 📊 Data Analysis
29
-
30
-
### 🎯 Recommended: R Analysis
31
-
32
-
**For comprehensive data analysis, we recommend using our R analysis scripts located in the `R_analysis/` directory.**
33
-
34
-
The R analysis provides:
35
-
-**Individual subject analysis** with reaction time plots and signal detection theory metrics
36
-
-**Group-level hierarchical analysis**
37
-
-**Bayesian analysis** using Stan models
38
-
-**Comprehensive visualization** of results
39
-
40
-
**🚀 Quick Start:**
41
-
-**Individual subject analysis**: See `R_analysis/Example scripts/Example_analysis_simple.Rmd`
42
-
-**Group-level analysis**: See `R_analysis/Example scripts/Example_analysis_Hierarchical.Rmd`
43
-
-**Bayesian analysis**: See `R_analysis/Example scripts/Example_analysis_bayesian.Rmd`
44
-
45
-
For complete documentation and examples, see the [R Analysis README](R_analysis/README.md).
46
-
47
-
### 📈 Python Analysis (Outdated)
48
-
49
-
*Python analysis examples are available but are outdated and may not be maintained. For hierarchical Bayesian modeling, we strongly recommend using the R analysis approach above.*
50
-
51
-
Python users can find examples in the documentation, but these are primarily for reference. The Python analysis includes:
52
-
- Basic preprocessing and reporting functions
53
-
- Template notebooks for data visualization
54
-
- Outdated Bayesian modeling examples
55
-
56
-
**⚠️ Important**: Users interested in hierarchical Bayesian modeling should refer to the R analysis code, which provides more comprehensive and up-to-date implementations.
57
-
58
32
## How to cite?
59
33
60
34
If you are using cardioception in a publication we ask you to cite the following paper:
@@ -167,6 +141,22 @@ call [path to your environment */conda.bat] activate
167
141
pause
168
142
```
169
143
144
+
# Hierarchical Interoception Modelling Toolbox
145
+
146
+
To analyze Heart Rate Discrimination (HRD) and related interoceptive datasets collected with Cardioception, we now recommend the dedicated [Hierarchical Interoception toolbox](https://github.com/embodied-computation-group/Hierarchical-Interoception). The companion preprint [*Hierarchical Bayesian Modelling of Interoceptive Psychophysics*](https://www.biorxiv.org/content/10.1101/2025.08.27.672360v1) details the models, validation, and normative priors included in the release.
147
+
148
+
Key resources provided by the toolbox:
149
+
- Hierarchical psychometric models for HRD and RRST data implemented in Stan/BRMS, with extensive recovery and validation tests.
150
+
- Normative priors and summaries derived from large reference datasets to plug directly into your own analyses.
151
+
- A power-analysis suite (R Markdown + Shiny app) for exploring sample-size/trial requirements under different effect sizes.
152
+
153
+
**Quick start:**
154
+
1. Clone the repository and run `setup.R` to install dependencies.
155
+
2. Open `app & demo/BRMS demo.Rmd` for a full HRD workflow that can be adapted to Cardioception exports.
156
+
3. Launch the Shiny power-analysis app (`app & demo/shiny app.R`) to plan upcoming HRD studies.
157
+
158
+
Please cite the preprint above when reporting results derived from the toolbox, and reference Cardioception for data acquisition.
159
+
170
160
# Tasks
171
161
172
162
## The Heartbeat Counting task
@@ -183,11 +173,13 @@ By default, this task implements the version used in recent publications <sup>3<
183
173
184
174
This task implements an adaptive psychophysical procedure for estimating participants' ability to discriminate their heart rate. On each trial, participants attend to their heartbeat sensations for five seconds and estimate their average heart rate. Immediately following this period, a cardiac feedback stimulus of 5 tones is played at a particular BPM frequency. The frequency is determined as their estimated average BPM plus or minus an intensity value that is updated by an adaptive staircase procedure (up/down or psi).
185
175
186
-
# Analyses
176
+
# Legacy analysis resources
177
+
178
+
The resources below remain available for teams who depend on the historical Cardioception workflows. For new projects, we recommend transitioning to the [Hierarchical Interoception toolbox](https://github.com/embodied-computation-group/Hierarchical-Interoception).
187
179
188
-
## 📊 Recommended: R Analysis
180
+
## 📊 R analysis scripts (maintained legacy)
189
181
190
-
**For comprehensive data analysis, we recommend using our R analysis scripts located in the `R_analysis/` directory.**
182
+
**R-based analyses live in the `R_analysis/` directory and continue to receive maintenance for backwards compatibility.**
191
183
192
184
The R analysis provides:
193
185
-**Individual subject analysis** with reaction time plots and signal detection theory metrics
@@ -202,9 +194,9 @@ The R analysis provides:
202
194
203
195
For complete documentation and examples, see the [R Analysis README](R_analysis/README.md).
204
196
205
-
## 📈 Python Analysis (Outdated)
197
+
## 📈 Python notebooks (archived)
206
198
207
-
*Python analysis examples are available but are outdated and may not be maintained. For hierarchical Bayesian modeling, we strongly recommend using the R analysis approach above.*
199
+
*Python notebooks are provided for reference only and are no longer actively maintained. For hierarchical Bayesian modeling, use the Hierarchical Interoception toolbox or the R analysis scripts above.*
0 commit comments