Skip to content

Commit a22063a

Browse files
committed
Prepare v0.9.0-beta release
- Add comprehensive .gitignore for R projects - Add MIT LICENSE file - Add DESCRIPTION file with package metadata - Add setup.R script for easy installation - Add RELEASE_NOTES.md with detailed release information - Update README.md with v0.9.0-beta branding and quick start guide - Add pre-publication warnings and status indicators
1 parent 6bd7da2 commit a22063a

File tree

6 files changed

+248
-8
lines changed

6 files changed

+248
-8
lines changed

.gitignore

Lines changed: 43 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,48 @@
1+
# R specific
12
.Rproj.user
23
.Rhistory
34
.RData
45
.Ruserdata
6+
.Rapp.history
7+
*.Rproj
8+
.Rproj.user/
9+
10+
# OS generated files
11+
.DS_Store
12+
.DS_Store?
13+
._*
14+
.Spotlight-V100
15+
.Trashes
16+
ehthumbs.db
17+
Thumbs.db
18+
19+
# Temporary files
20+
*~
21+
*.tmp
22+
*.temp
23+
*.swp
24+
*.swo
25+
26+
# Stan compiled models
27+
*.rds
28+
*.rda
29+
*.RData
30+
31+
# Large data files (uncomment if needed)
32+
# *.csv
33+
# data/raw_*.csv
34+
35+
# OSF sync folder
536
osf/
6-
results/Fit population/
37+
results/Fit population/
38+
39+
# IDE files
40+
.vscode/
41+
.idea/
42+
43+
# Logs
44+
*.log
45+
46+
# Backup files
47+
*.bak
48+
*.backup

DESCRIPTION

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
Package: Hierarchical-Interoception
2+
Type: Package
3+
Title: Hierarchical Bayesian Modelling of Interoceptive Psychophysics
4+
Version: 0.9.0-beta
5+
Authors@R: c(
6+
person("Arthur S.", "Courtin", role = c("aut", "cre"), email = "arthur.courtin@clin.au.dk"),
7+
person("Jesper Fischer", "Ehmsen", role = "aut"),
8+
person("Leah", "Banellis", role = "aut"),
9+
person("Francesca", "Fardo", role = "aut"),
10+
person("Micah", "Allen", role = "aut")
11+
)
12+
Description: This package provides tools for hierarchical Bayesian modeling of
13+
interoceptive psychophysics data, specifically for Heart Rate Discrimination
14+
Task (HRDT) and Respiratory Resistance Sensitivity Task (RRST). It includes
15+
Stan models, power analysis tools, and educational resources for researchers
16+
working with interoceptive psychophysics.
17+
License: MIT + file LICENSE
18+
URL: https://github.com/[username]/Hierarchical-Interoception
19+
BugReports: https://github.com/[username]/Hierarchical-Interoception/issues
20+
Depends: R (>= 4.0.0)
21+
Imports:
22+
brms,
23+
cmdstanr,
24+
tidyverse,
25+
posterior,
26+
bayesplot,
27+
tidybayes,
28+
rstan,
29+
here,
30+
loo,
31+
shiny,
32+
flextable,
33+
pracma,
34+
furrr
35+
Suggests:
36+
knitr,
37+
rmarkdown,
38+
testthat
39+
VignetteBuilder: knitr
40+
RoxygenNote: 7.2.3
41+
Encoding: UTF-8
42+
LazyData: true

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2025 Arthur S. Courtin, Jesper Fischer Ehmsen, Leah Banellis, Francesca Fardo, Micah Allen
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 33 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# Hierarchical-Interoception
1+
# Hierarchical-Interoception v0.9.0-beta
2+
3+
⚠️ **Pre-publication Release**: This is pre-peer-review research software. The methods and results are under review. Use with appropriate caution for research applications.
24

35
This repository is the companion of our pre-print "Hierarchical Bayesian Modelling of Interoceptive Psychophysics" (https://doi.org/10.1101/2025.08.27.672360).
46

@@ -11,12 +13,36 @@ One of these is a R markdown file demonstrating how to implement and interpet th
1113
Another is a shiny app which researchers can use to explore the results of our power analysis, e.g. to justify sample size of future studies.
1214

1315
## Table of Contents
14-
1. [Structure of the repository](#structure-of-the-repository)
15-
2. [Using the BRMS Demo](#using-the-brms-demo)
16-
3. [Shiny App Deployment and Usage](#shiny-app-deployment-and-usage)
17-
3. [Dependencies](#dependencies)
18-
3. [Citation](#citation)
19-
3. [Contact](#contact)
16+
1. [Quick Start](#quick-start)
17+
2. [Structure of the repository](#structure-of-the-repository)
18+
3. [Using the BRMS Demo](#using-the-brms-demo)
19+
4. [Shiny App Deployment and Usage](#shiny-app-deployment-and-usage)
20+
5. [Dependencies](#dependencies)
21+
6. [Citation](#citation)
22+
7. [Contact](#contact)
23+
24+
## Quick Start
25+
26+
1. **Clone the repository**:
27+
```bash
28+
git clone https://github.com/[username]/Hierarchical-Interoception.git
29+
cd Hierarchical-Interoception
30+
```
31+
32+
2. **Set up the environment**:
33+
```r
34+
# Run the setup script
35+
source("setup.R")
36+
```
37+
38+
3. **Try the BRMS demo**:
39+
- Open `app & demo/BRMS demo.Rmd`
40+
- Run the code to see a complete analysis workflow
41+
42+
4. **Explore power analysis**:
43+
```r
44+
shiny::runApp("app & demo/shiny app.R")
45+
```
2046

2147
## Structure of the repository
2248

RELEASE_NOTES.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Release Notes
2+
3+
## v0.9.0-beta (2025-01-XX)
4+
5+
### Pre-publication Release
6+
7+
⚠️ **Important**: This is pre-peer-review research software. The methods and results are under review. Use with appropriate caution for research applications.
8+
9+
### What's New
10+
11+
This is the initial release of the Hierarchical-Interoception toolkit, providing comprehensive tools for hierarchical Bayesian modeling of interoceptive psychophysics data.
12+
13+
### Features
14+
15+
- **Hierarchical Psychometric Models**: Complete Stan implementations for HRDT and RRST data
16+
- **Parameter Recovery Validation**: Extensive validation of model parameter recovery
17+
- **Power Analysis Tools**: Interactive Shiny app for power analysis exploration
18+
- **Educational Resources**: Complete BRMS demo with step-by-step workflow
19+
- **Population Fitting**: Tools for deriving normative priors from large datasets
20+
- **Model Comparison**: LOO-based model comparison between different psychometric functions
21+
22+
### Components
23+
24+
- **Stan Models**: Population fitting, power analysis, and parameter recovery models
25+
- **Analysis Scripts**: Complete analysis pipeline from data preparation to visualization
26+
- **Shiny App**: Interactive power analysis explorer with three main panels
27+
- **BRMS Demo**: Educational R Markdown with complete workflow example
28+
- **Raw Data**: HRDT and RRST datasets for analysis and validation
29+
30+
### Getting Started
31+
32+
1. Clone the repository
33+
2. Run `source("setup.R")` to install dependencies
34+
3. Follow the BRMS demo for basic usage
35+
4. Use the Shiny app for power analysis exploration
36+
37+
### Dependencies
38+
39+
- R (>= 4.0.0)
40+
- Stan/CmdStan via cmdstanr
41+
- brms, tidyverse, posterior, bayesplot, tidybayes
42+
- shiny, flextable, here, loo, pracma, furrr
43+
44+
### Known Issues
45+
46+
- Some large RData files may cause slow repository cloning
47+
- Stan compilation required on first use
48+
- Path resolution may vary across operating systems
49+
50+
### Citation
51+
52+
If you use this software in your research, please cite:
53+
54+
```
55+
Courtin, A.S., Fischer Ehmsen, J., Banellis, L., Fardo, F., & Allen, M. (2025).
56+
Hierarchical Bayesian Modelling of Interoceptive Psychophysics.
57+
bioRxiv. https://doi.org/10.1101/2025.08.27.672360
58+
```
59+
60+
### Roadmap
61+
62+
- **v1.0.0**: Planned after peer review acceptance
63+
- **v0.9.1+**: Bug fixes and minor improvements before v1.0.0
64+
65+
### Support
66+
67+
For questions or issues, please:
68+
1. Check the README.md for usage instructions
69+
2. Open an issue on the GitHub repository
70+
3. Contact the authors directly
71+
72+
---
73+
74+
*This software is released under the MIT License. See LICENSE file for details.*

setup.R

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Hierarchical-Interoception Setup Script
2+
# This script helps set up the environment for using this research software
3+
4+
cat("Setting up Hierarchical-Interoception v0.9.0-beta...\n")
5+
6+
# Check if renv is available, if not install it
7+
if (!require("renv", quietly = TRUE)) {
8+
cat("Installing renv for dependency management...\n")
9+
install.packages("renv")
10+
}
11+
12+
# Initialize renv if not already done
13+
if (!file.exists("renv.lock")) {
14+
cat("Initializing renv...\n")
15+
renv::init()
16+
}
17+
18+
# Restore dependencies
19+
cat("Installing/updating dependencies...\n")
20+
renv::restore()
21+
22+
# Check for cmdstanr and Stan installation
23+
if (require("cmdstanr", quietly = TRUE)) {
24+
cat("Checking Stan installation...\n")
25+
if (!cmdstanr::cmdstan_version()) {
26+
cat("Installing CmdStan...\n")
27+
cmdstanr::install_cmdstan()
28+
}
29+
} else {
30+
cat("Warning: cmdstanr not available. Please install manually.\n")
31+
}
32+
33+
cat("Setup complete! You can now use the Hierarchical-Interoception tools.\n")
34+
cat("Start with the BRMS demo: app & demo/BRMS demo.Rmd\n")
35+
cat("Or run the Shiny app: shiny::runApp('app & demo/shiny app.R')\n")

0 commit comments

Comments
 (0)