RSSAmplifier

Blog

Doing Bayesian Data Analysis

doingbayesiandataanalysis.blogspot.comRSS feed ↗25 posts

Latest posts

Problem in multilevel (hierarchical) multinomial logistic regression

The data The predicted variable is a categorical response , named resp with levels ‘1’, ‘2’, ‘3’, and ‘4’ (nominal labels, not numerical values). The predictor is a categorical/nominal variable named group , with levels ‘A’ through ‘K’. Notice these aspects of the data: The proportion of response ‘2’ equals response ‘3’ within each group, and across all groups. Specifically, in every group, p(‘2’)…

Lecture slides offered by Prof Richard Charnigo

Richard Charnigo, Professor of Biostatistics, College of Public Health, University of Kentucky, has posted lecture slides online for his Bayesian course that used DBDA2. On his website he states, " Here is a zipped folder containing my lecture slides and related materials for the “Bayesian Biostatistics” special topics course that I taught in Spring 2025. The lecture slides largely follow Prof.…

What does the B on the sail mean?

The Bayesian sailor tries not to be daft; at least he can tell the boat's fore from its aft. Retired he likes to go sailing the most but still can discern what is prior and post.

Bayesian survival analysis, using Weibull distribution and censored data

In workshops years ago, I presented some basic survival analysis , using a Weibull distribution and censored data . I was recently asked about this topic, so I thought I'd post my old workshop slides here. Even without my narration, I hope the slides may be useful. Click on the slides to enlarge. (These slides are from 2017, slide numbers 780-811 from a slide deck of 950 slides! It was a long…

From Stan forum: How to make decisions about results

Reposting from the Stan discussion site ... The original post : Hi Everyone, A question on how to handle reviewers when reporting CI. We are doing RL and in our papers when reporting results I always try to put a figure with the whole posterior. We also tend to report in text the median, 89%CI and probability of direction. We use 89% mainly as a way to avoid 95% which tend to encourage “black and…

New videos for Bayesian and frequentist side-by-side

There are new videos for Bayesian and frequentist side-by-side. Eero Liski , a statistician at the Natural Resources Institute Finland, has made tutorial videos that introduce Bayesian and frequentist data analysis, side-by-side. The first of the video series is available here . Thank you, Eero, for making these videos! The videos were composed entirely independently from me, but they feature the…

StanCon 2023

StanCon 2023 is happening June 20-23 (2023). Submit talks, tutorials, or sessions by April 30: We are interested in a broad range of topics ... including: Applications of Bayesian statistics using Stan in all domains Software development to support or complement the Stan ecosystem Methods for Bayesian modeling, relevant to a broad range of users Theoretical insights on common Bayesian methods and…

Another update to DBDA2E programs

A recent post pointed out three changes to DBDA2E programs; now there is one more. You can get the updated versions by downloading the entire new zip file from the bottom of the software page at https://sites.google.com/site/doingbayesiandataanalysis/software-installation The most recent change affects the openGraph() function in the script, DBDA2E-utilities.R . This function for opening graphics…

DBDA2E Programs Updated

Three R scripts within the set of DBDA2E programs have been updated to work properly with R4.0+. You can get the updated versions by downloading the entire new zip file from the bottom of the software page at https://sites.google.com/site/doingbayesiandataanalysis/software-installation The three changes: DBDA2E-utilities.R changed a line that used class() into inherits() .…

ChatGPT and Bayesian poetry

ChatGPT is fun to play with but is (for now at least) terrible at creating poems, including poems about Bayesian statistics. Here are my attempts to have ChatGPT produce poems like those that begin each chapter of DBDA2E. Or in any other style. My prompt: Write a single poetic quatrain about Bayesian statistics. Use dactylic tetrameter and an AABB rhyme scheme. ChatGPT's reply: Bayesian stats have…

Bayesian analysis reporting guidelines now listed on The EQUATOR Network

The Bayesian analysis reporting guidelines (BARG) are now listed on The EQUATOR Network. " The EQUATOR (Enhancing the QUAlity and Transparency Of health Research) Network is an international initiative that seeks to improve the reliability and value of published health research literature by promoting transparent and accurate reporting and wider use of robust reporting guidelines. It is the first…

A novel trend model made possible by Bayesian software

One reason I love Bayesian software (such as JAGS, etc.) is for its ability to express novel models that aren't prepackaged in canned stats packages. In some recent research, I had the opportunity to create a novel trend model and estimate its parameters in JAGS. We had data as graphed in Fig. 1, and I had to think of a model to describe the trends Fig.1. Data to be modeled. The variable on the…

Bayesian analysis reporting guidelines hit 10K downloads

The Bayesian analysis reporting guidelines (BARG) have now, in just under six months, had 10,000 downloads from the publisher's site: I hope that people actually find the BARG to be useful! You can read more about the BARG at the short blog post at Nature:

sisyphus.R

life <- function( luck=10 , ... ) { if ( runif(1) > 1/(luck+1.001) ) { cat( "push stone uphill... " ) } else { cat( "\nstone rolls to bottom\n" ) } life( luck , ... ) } Or maybe you prefer a life with less hard labor, and with more philosophy: life <- function( luck=10 , ... ) { if (runif(1)> 1/(luck+1.001) ){cat("?")}else{cat("\n")} life( luck , ... ) } life() Either way, R replies with wisdom:…

Bayesian Analysis Reporting Guidelines

Just published (open access) in Nature Human Behaviour: Bayesian Analysis Reporting Guidelines Abstract: Previous surveys of the literature have shown that reports of statistical analyses often lack important information, causing lack of transparency and failure of reproducibility. Editors and authors agree that guidelines for reporting should be encouraged. This Review presents a set of Bayesian…

DBDA2E R Scripts Updated for R 4.1

The R scripts that accompany DBDA2E have been updated so they work with R 4.1. Please go to the book's software page at https://sites.google.com/site/doingbayesiandataanalysis/software-installation and scroll down to the bottom of that page to find the link to the zip file for the updated scripts. I changed some scripts that use the R function read.csv() and relied on the old default of casting…

Benchmark Bayes factors for uncertain prior model probability

I've posted a new manuscript titled " Uncertainty of prior and posterior model probability: Implications for interpreting Bayes factors ." Here's a summary and examples to stimulate your interest. Summary: In most applications of Bayesian model comparison or Bayesian hypothesis testing, the results are reported in terms of the Bayes factor only, not in terms of the posterior probabilities of the…

DBDA2E in brms and tidyverse

Solomon Kurz has been re-doing all the examples of DBDA2E with the brms package for ease of specifying models (in Stan) and with the tidyverse suite of packages for data manipulation and graphics . His extensive re-write of DBDA2E can be found here . It's definitely worth a look! He has extensive re-writes of other books, too. I've been meaning to make a post about this for ages, and have finally…

Fixing a new problem in some DBDA2E scripts caused by a change in R 4.0.0

UPDATE: Scripts are now changed to work with R 4.1; see this blog post . The scripts that accompany DBDA2E have worked fine, "out of the box," for years. But recently some scripts have had problems. Why? R has changed. With R 4.0.0, various functions such as read.csv() no longer automatically convert strings to factors. Some DBDA2E scripts assumed the results of those functions contained factors,…

Need help finding corrigenda for DBDA2E

UPDATE: Now solved. Big thanks to Kent Johnson for re-constructing the table of corrigenda! The host of the DBDA2E website (Google Sites), mandated a formatting change. Turns out the automatic reformatting mangled the table of Corrigenda. You can see it here: https://sites.google.com/site/doingbayesiandataanalysis/corrigenda I'd really like a properly formatted version! Did you print or save or…

Teach (and learn) Bayesian and frequentist side by side

Teach (and learn) Bayesian and frequentist side by side: a talk and an app. A talk explaining why that's a good idea: (Talk delivered Saturday May 18, 2019.) The interactive Shiny App with Bayesian and frequentist side by side: click HERE . If you consider the app, especially for teaching, please let me know how it goes.

Shrinkage in hierarchical models: random effects in lmer() with and without correlation

The goal of this post is to illustrate shrinkage of parameter estimates in hierarchical (aka multi-level) models, specifically when using lmer() with and without estimated correlation of parameters. The examples will show how estimates can differ when including correlation of parameters because of shrinkage toward the estimated correlation. Background Data structure for these examples “It all…

Bayesian estimation of severity in police use of force

In research reported in the journal Law and Human Behavior , Brad Celestin and I used Bayesian methods to measure perceived severities of police actions. For each of about two dozen actions, we had lay people rate the action's moral acceptability, appropriateness, punishability, and physical forcefulness. We regressed the ratings on the actions, simultaneously estimating latent scale values of the…

The Statistician&#39;s Error?

I just attended (and gave a talk at) the United States Conference on Teaching Statistics ( USCOTS ). Big thanks to Allan Rossman , who brilliantly MC-ed the conference. • One keynote was about "moving beyond p < .05" in a talk by Ron Wasserstein and Allen Schirm, In their recent editorial in The American Statistician (with Nicole Lazar), a primary recommendation was Don't Say "Statistically…

Bayesian statistics at Princeton University, with a visit to the grave of John Von Neumann

I was very pleased to have had the opportunity to present a talk regarding Bayesian models of ordinal data at Princeton University, on Tuesday, March 5, 2019. An abstract of the talk is here , and the published article on which the talk was based is here . A big thanks to Dr. Ting Qian who orchestrated the visit wonderfully. The lecture hall was packed, with people standing outside the door in the…