## New tutorial on computing Bayes factors in R

I just published a practical guide on computing Bayes factors using various packages in R. Head over to RPubs and check out How to compute Bayes factors using lm, lmer, BayesFactor, brms, and JAGS/stan/pymc3. My first goal is to present solutions to things that I found difficult in the respective packages and which are relatively undocumented. A second goal was to show a side-by-side comparison on whether the packages converge on the same Bayes factor estimates. I hope to keep the document updated. In particular, I’m keeping an eye on the development of, BASand I need to learn how to …

## Software for graphical models

I’m currently writing a paper on a new Bayesian method for scoring Complex Span tasks. I needed some software to make a graphical model of it. Many people have pointed to the Tikz/pgf drawing library for latex, but I did not want to install latex for this simple task. Here I briefly review yEd, Daft, and Libreoffice Draw. yEd I ended up using yEd and produced this graph which contains plates, estimated nodes, deterministic nodes (double-lined), observed nodes (shaded), and categorical nodes (rectangles).yEd is purely graphical editing which is fast to work with and great for tweaking small details. A very handy yEd feature is its …

## Five divided by forty-nine

At a family dinner, my brother told me that he had stumbled upon a curious number. Divide five by forty-nine and take a look at the digits: $$5 / 49 = 0.10204081632653061…$$ Do you see a pattern in the digits? Yes! It’s powers of two: (0.)1, 02, 04, 08, 16, 32, 65, … Huh, 65? Yes! The next number, 128, is a three-digit number and so the first digit “overlaps” the last digit of 64, making it 65. And this continues for the first digits of 256 (28 + 2 = 30), 512, the first two digits of 1024, etc. Then floating …

## I do not recommend hypnosis for brain injury (yet)

I have been overwhelmed with requests following our article about the effect of hypnotic suggestion on working memory performance following acquired brain injury. I present frequent questions and very short answers below. My answers to the questions all originate in the same point: there is insufficient evidence right now to establish whether to use or not to use hypnosis for the treatment of cognitive problems following acquired brain injury. I predict that we should be able to give a recommendation (or refusal) regarding hypnosis following acquired brain injury in 2020. Frequent questions from patients and relatives: Question: I have a …

## Jeg anbefaler ikke hypnose efter erhvervet hjerneskade (endnu)

Jeg får mange henvendelser omkring vores artikel om effekten af hypnotiske suggestioner på arbejdshukommelsen efter erhvervet hjerneskade. Nedenfor giver jeg korte svar på ofte stillede spørgsmål.All svarene bunder i den samme pointe: der er endnu ikke tilstrækkelig evidens til at afgøre, om hypnose kan.- eller ikke kan anbefales som behandling af kognitive problemer efter erhvervet hjerneskade. Jeg forventer, at vi kan anbefale (eller afvise) hypnose efter erhvervet hjerneskade omkring år 2020. Ofte stillede spørgsmål af patienter og pårørende: Spørgsmål: Jeg har en hjerneskade. Hvor kan jeg få hypnose? Svar: Jeg vil ikke anbefale nogen. Jeg arbejder med forskning og der …

## Decimals of PI with consistent colors

I was invited to do a fun task by my office colleague, Hazel Anderson. She researches synesthesia, and she wanted to induce grapheme-color synesthesia by having participants learn pi using digit-color mapping as one available strategy. So she needed something that could a Word document with pi with an arbitrary number of decimal places. Approximately 40 minutes of the pure joy of structured procrastination and:     Here’s the python script to generate this beauty:

## Scientific papers on hypnosis and brain injury

As of writing this, the literature on hypnosis and cognitive aspects of brain injury is easily summarized. I’ll write this up in greater detail in a paper, but I thought that it would be useful to make a few pointers to the relevant literature here so that it is accessible to everyone. There are also a number of case-studies, but I will not include these here since most of them target motor-rehabilitation. Hypnosis as rehabilitation Take-home: There are (large) positive effects of hypnosis on cognition following acquired brain injury. Lindeløv, J. K., Overgaard, R., & Overgaard, M. (2017). Improving working …

## Hypnosis and brain injury: where to find stuff

This post is a continually updated list of important communications on our paper in Brain entitled “Improving working memory performance in brain-injured patients using hypnotic suggestion.” and my comments to each of them. Reports The scientific article in Brain: Argues that targeted hypnotic suggestion improves working memory for people with acquired brain injury. A list of published scientific literature on hypnosis and brain injury. Three papers support the positive effect of hypnosis on cognitive sequelae following acquired brain injury. Oxford University Blog: A summary for the general public. It includes a back-of-the-envelope estimation of how much you should update your belief based on …

## What our paper on hypnosis following brain injury does not show

We just published a paper in Brain entitled “Improving working memory performance in brain-injured patients using hypnotic suggestion.” We argue that for patients with acquired brain injury, hypnotic suggestion which asks the patient to recover an ability to concentrate and remember improves working memory performance. I also reported the study and the results at the Oxford University Press blog, including an estimate of how skeptical you should be. We expect quite some publicity – and perhaps even hype – around the results of this paper. Hype and overinterpretation work for advertising but not for science. In this post, I will try to counter …

## $$\sqrt{2}$$ is superior to Bessel’s correction

… for the estimation of the population standard deviation. That is, if you substitute $$n – 1$$ with $$n – \sqrt{2}$$, you get a much less biased estimate of the population SD. I just stumbled upon this when I desperately (!) looked to frequentist methods because of convergence problems with my bayesian model. The details can be seen in my post on Cross Validated about this curious finding as well as some excellent answers/elaborations. I’m re-posting the simulation results here, just because they’re pretty and I want some content on this blog. Naturally, $$\sqrt{2}$$ doesn’t outperform the analytically correct solution but it is …