Monday, December 26, 2022

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 come to stay
They help us make predictions, hooray!
From probabilities and data sets
They estimate and make forecasts

They start with a prior belief
And update it with new relief
The posterior is then retrieved
A revised view, it's not deceived

While this is cute and is on topic, it is not a single quatrain and it is not dactylic tetrameter. And it lucked out with AABB rhyme scheme, because that's all it does. Here I ask for an ABAB rhyme scheme:

Write a single poetic quatrain about Bayesian statistics. Use dactylic tetrameter and be sure to use an ABAB rhyme scheme.

 ChatGPT's reply:

Bayesian stats are here to stay
In fields of science, they convey
A flexible method, one that adapts
To changing evidence, it reacts

It deals with uncertainty and doubt
In a logical way, it sorts it out
It starts with a prior belief
And updates it with new relief

Sound familiar? It's essentially the same as before. 

When I ask ChatGPT to "Write a poem about Bayesian statistics in free verse style" it again replied with pairs of rhyming couplets.

I've found that ChatGPT's current concept of a poem is merely this: every stanza consists of a pair of rhyming couplets (i.e., AABB rhyme scheme), usually but not always with four stressed syllables per line (i.e., tetrameter), and with varying metrical feet (i.e., could be iambic, trochaic, anapestic, dactylic, etc., at random).

To turn the tables, I gave myself a prompt and allowed myself only a few minutes and a single try to respond. Prompt to self: Write a single poetic quatrain about ChatGPT. Use dactylic tetrameter and be sure to use an ABAB rhyme scheme.

Self's reply:

ChatGPT is a wonderous interface
giving us couplets that pique and amuse (sometimes).
I still prefer the delights of a human face
smiling at doggies that play and confuse (but rhyme).


Wednesday, October 12, 2022

Bayesian analysis reporting guidelines now listed on The EQUATOR Network

The Bayesian analysis reporting guidelines (BARG) are now listed on The EQUATOR Network.

 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 coordinated attempt to tackle the problems of inadequate reporting systematically and on a global scale; it advances the work done by individual groups over the last 15 years." (Quoted from this page.)

"The [EQUATOR] Library for health research reporting provides an up-to-date collection of guidelines and policy documents related to health research reporting. These are aimed mainly at authors of research articles, journal editors, peer reviewers and reporting guideline developers." (Quoted from this page.)

The Bayesian analysis reporting guidelines (BARG) are described in an open-access article at Nature Human Behaviour. The BARG provide a thorough set of points to consider when reporting Bayesian data analyses. The points are thoroughly explained, and a summary table is provided.

The BARG are listed at The EQUATOR Network here.

Tuesday, February 15, 2022

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 vertical axis is a rating of emotion (such as sadness, happiness, etc.) in short stories. The horizontal axis is the retelling of the story, such that 0 is the original story, 1 is a retelling of the original, 2 is a retelling of the 1st retelling, and 3 is a retelling of the 2nd retelling. Retellings tend to lose a lot of information but nevertheless retain some info too. Do they retain emotions? Each curve in the graph corresponds to a different original story. I thought the trends in the data looked like the different original stories were converging toward (or diverging from) a common spine, as in Fig. 2:

Fig. 2. Model predictions.

So, I invented a simple trend model to express that idea, and I programmed it in JAGS. Because the ratings were on an ordinal scale, I used an ordered-probit response distribution on a latent scale that followed an underlying linear spine with exponential convergence, as suggested in Fig. 3:

Fig. 3. The model, with latent scale in left panel and rating scale in right panel.

You can read all the details of the model in the HTML document at https://osf.io/nbuxg/ (download the HTML document and then view it in a browser). The published article describing the research is titled Serial reproduction of narratives preserves emotional appraisals by Fritz Breithaupt, Binyan Li, and John K. Kruschke. It can be obtained from https://doi.org/10.1080/02699931.2022.2031906 and the final pre-publication manuscript is at https://osf.io/hwvza/.


Friday, February 11, 2022

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: