R code and output showing the new functionality:
``` r
## pak::pkg_install("quentingronau/bridgesampling#44")
## see: https://cran.r-project.org/web/packages/bridgesampling/vignettes/bridgesampling_example_stan.html
library(bridgesampling)
### generate data ###
set.seed(12345)
mu <- 0
tau2 <- 0.5
sigma2 <- 1
n <- 20
theta <- rnorm(n, mu, sqrt(tau2))
y <- rnorm(n, theta, sqrt(sigma2))
### set prior parameters ###
mu0 <- 0
tau20 <- 1
alpha <- 1
beta <- 1
stancodeH0 <- 'data {
int<lower=1> n; // number of observations
vector[n] y; // observations
real<lower=0> alpha;
real<lower=0> beta;
real<lower=0> sigma2;
}
parameters {
real<lower=0> tau2; // group-level variance
vector[n] theta; // participant effects
}
model {
target += inv_gamma_lpdf(tau2 | alpha, beta);
target += normal_lpdf(theta | 0, sqrt(tau2));
target += normal_lpdf(y | theta, sqrt(sigma2));
}
'
tf <- withr::local_tempfile(fileext = ".stan")
writeLines(stancodeH0, tf)
mod <- cmdstanr::cmdstan_model(tf, quiet = TRUE, force_recompile = TRUE)
fitH0 <- mod$sample(
data = list(y = y, n = n,
alpha = alpha,
beta = beta,
sigma2 = sigma2),
seed = 202,
chains = 4,
parallel_chains = 4,
iter_warmup = 1000,
iter_sampling = 50000,
refresh = 0
)
#> Running MCMC with 4 parallel chains...
#>
#> Chain 3 finished in 0.8 seconds.
#> Chain 2 finished in 0.8 seconds.
#> Chain 4 finished in 0.8 seconds.
#> Chain 1 finished in 1.1 seconds.
#>
#> All 4 chains finished successfully.
#> Mean chain execution time: 0.9 seconds.
#> Total execution time: 1.2 seconds.
H0.bridge <- bridge_sampler(fitH0, silent = TRUE)
print(H0.bridge)
#> Bridge sampling estimate of the log marginal likelihood: -37.73301
#> Estimate obtained in 8 iteration(s) via method "normal".
#### Expected output:
## Bridge sampling estimate of the log marginal likelihood: -37.53183
## Estimate obtained in 5 iteration(s) via method "normal".
```
Exciting #rstats news for Bayesian model comparison: bridgesampling is finally ready to support cmdstanr, see screenshot. Help us by installing the development version of bridgesampling and letting us know if it works for your model(s): pak::pkg_install("quentingronau/bridgesampling#44")
02.09.2025 09:16 โ ๐ 27 ๐ 9 ๐ฌ 2 ๐ 1
#rstats #statistics
I've released my new open source book, "Powered by Linear Algebra: the role of matrices and vector space in data science," at matloff.github.io/WackyLinearA....
Turns the classic LA course on its head! Still proves the theorems, but with a deep emphasis on applications.
15.08.2025 16:53 โ ๐ 83 ๐ 23 ๐ฌ 8 ๐ 5
Our lab has a list of papers that use statistical sampling algorithms like MCMC to explain human behaviour. Thanks to @lcastillo.bsky.social, you can select by behaviour or algorithm.
If we've missed any, please let us know!
sampling.warwick.ac....
16.05.2025 11:19 โ ๐ 12 ๐ 6 ๐ฌ 0 ๐ 0
Had a great time working with Lucas and Adam on this preprint and the package! Let us know what you think!
21.05.2025 10:33 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
Congrats!๐
13.05.2025 18:38 โ ๐ 1 ๐ 0 ๐ฌ 0 ๐ 0
Ordinal Modeling
5 stars is better than 4 stars, but can we even define how much better it might be? Modeling ordinal outcomes like ratings is a subtle topic; fortunately I have a new chapter that dives directly into that nuance.
HTML: betanalpha.github.io/assets/chapt...
PDF: betanalpha.github.io/assets/chapt...
17.03.2025 13:58 โ ๐ 28 ๐ 6 ๐ฌ 2 ๐ 0
As a Chinese person, itโs so exciting to see people from outside China engaging with the stories in Zhuang Zi! Your drawings are such a creative interpretationโthank you for sharing this!
23.03.2025 22:46 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
New paper with Tong Liu and Arndt Broeder, just accepted in Cognition. We test novel qualitative predictions from sampling-based models of probability estimation in an event ranking task. Results provide evidence for the idea that mental sampling underlies probability judgements.
19.03.2025 21:38 โ ๐ 29 ๐ 9 ๐ฌ 1 ๐ 1
(7/7) I want to express my gratitude to Johanna K. Falbรฉn, @lcastillo.bsky.social, Jake Spicer, Jian-Qiao Zhu, Cheng Stella Qian, Nick Chater, and @asanborn.bsky.social for their irreplaceable contribution to this project!
20.02.2025 18:42 โ ๐ 0 ๐ 0 ๐ฌ 0 ๐ 0
(6/7) In summary, our results suggest:
- ๐๏ธ Adjustment for the assumption of uniform distortions by utility in probability representations;
- ๐ฏ Explicit repeated mental simulation could promote more accurate probability assessments in everyday life.
20.02.2025 18:42 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
(5/7) We analysed the data at both the group and individual levels and found:
- Group level: People are optimistic;
- Individual level: The majority remained unbiased; ๐คฏ
- People are optimistic if they can only do the task once;
- People start from a smaller or more probable value if repeated.
20.02.2025 18:42 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
(4/7) We manipulated the domains (gain, loss, or neutral), the outcome distributions (equally or unequally distributed), the numbers of outcomes (two, six, or eleven), the repetition of the task (one-off or repeatedly), and the task instructions (imagine, predict, judge the probability).
20.02.2025 18:42 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
(3/7) To investigate the mental simulation process, we employed a method called random generation. In this method, participants are asked to imagine playing a gamble and then utter the imagined outcome.
20.02.2025 18:42 โ ๐ 0 ๐ 0 ๐ฌ 1 ๐ 0
(2/7) People often simulate uncertain events in their heads to assess risk, but do the values of the possible outcomes distort these simulations? Prior experimental findings offer conflicting predictions about how utility may bias this mental sampling process.
20.02.2025 18:42 โ ๐ 1 ๐ 0 ๐ฌ 1 ๐ 0
OSF
๐จ A new preprint is out!
How does utility influence mental simulations of risky events? ๐ค๐ฒ
We tested this across 4 experiments & found that most people simulate probabilities accurately, but biases emerge in key conditions!
If you want to learn more, keep reading!
doi.org/10.31234/osf...
20.02.2025 18:42 โ ๐ 6 ๐ 5 ๐ฌ 1 ๐ 0
OSF
New Preprint Out! ๐๐
Can people generate a random sequence if given enough time?
Keep reading if
- You make cognitive models with randomness in them
- You like to explore the world, be creative, choose well
- You want protection from clever agents exploiting patterns in your behavior.
osf.io/awg9j
20.02.2025 11:14 โ ๐ 8 ๐ 4 ๐ฌ 1 ๐ 0
Professor in computational Bayesian modeling at Aalto University, Finland. Bayesian Data Analysis 3rd ed, Regression and Other Stories, and Active Statistics co-author. #mcmc_stan and #arviz developer.
Web page https://users.aalto.fi/~ave/
Professor of Psychological Methods @Phillips-Universtรคt Marburg
Mathematical psychology | Cognitive modeling | Psychometrics | Bayesian statistics
Personal: www.dwheck.de
Team: https://www.uni-marburg.de/de/fb04/team-heck
A career network featuring science jobs in academia and industry.
Visit our platform at www.science.hr
University of Warwick | Department of Psychology @warwickpsych.bsky.social | Language&Learning Group | PhD candidate | Joint action | Communication | Language evolution | My devoted supervisor: @ofeher.bsky.social
PhD Student | University of Warwick | Interests: #language, #gesture, #development, #learning, #openscience
Professor for Cognitive Modelling & Decision Neuroscience (@cmdn-lab.bsky.social) at the University of Hamburg (@uni-hamburg.de). Interested in raising two kids, bouldering, football, and other things (if time permits).
Prof. of Computational Cognitive Science at TU Darmstadt & PI of the Human and Machine Cognition lab at the University of Tรผbingen | hmc-lab.com
Max-Planck-Institut fรผr Bildungsforschung. Research institution dedicated to the study of human development. Located in Berlin. Belongs to the Max Planck Society. Tweets by the Press Office.
https://www.mpib-berlin.mpg.de/imprint
Associate Professor @FuDanUniv | alumnus @IUMediaSchool@ICR_IU
Associate Editor, Cognitive Science (CSJ)
Vice Chair Elect, Information Systems, International Communication Association
https://jingjinghancomm.github.io/index.html
Current PhD Researcher at University of Warwick. Interested in collecting behaviour, collector identity, and individual's perceptions and evaluations of consumer products, and what factors cause these to differ.
Cognitive scientist seeking to reverse engineer the human cognitive toolkit. Asst Prof of Psychology at Stanford. Lab website: https://cogtoolslab.github.io
Professor of Clinical & Health Psychology at Warwick (@warwickpsych.bsky.social). Researching sleep, insomnia, chronic pain and mental health. โ๏ธ
Warwick Sleep and Pain Lab website: https://warwick.ac.uk/fac/sci/psych/research/lifespan/sleeplab/
Professor of Behavioural Science, University of Warwick.
Associate editor, Management Science
Google scholar:
https://scholar.google.com/citations?user=uhMoc_8AAAAJ&hl=en
Strategic Information Network: https://sites.google.com/view/strategicinf
Cognitive Psychology Reader (Assoc. Prof) at Edinburgh Uni - Into causal cognition, active learning, compositionality & generalisation
Your Only Source For Professional Dog Ratings
nonprofit: @15outof10.org โค๏ธโ๐ฉน
links.weratedogs.com
PhD Candidate in Developmental Psychlogy at University of Warwick. Interested in early language development, multimodal communication, and iconicity. She/Her/Hers
Associate Professor of Psychology at the University of Warwick (@warwickpsych.bsky.social). Interested in #gesture, #language, #learning #evolution, #communication, #development, #Rstats, & #openscience.
Personal Webpage: https://suzanneaussems.github.io/
Department of Psychology, University of Cambridge