Articles by Rasmus Bååth

Bayesian First Aid: Pearson Correlation Test

March 17, 2014 | Rasmus Bååth

Correlation does not imply causation, sure but, as Edward Tufte writes, “it sure is a hint.” The Pearson product-moment correlation coefficient is perhaps one of the most common ways of looking for such hints and this post describes the Bayesian First Aid alternative to the classical Pearson correlation test. Except ... [Read more...]

A Hack to Create Matrices in R, Matlab style

March 7, 2014 | Rasmus Bååth

The Matlab syntax for creating matrices is pretty and convenient. Here is a 2x3 matrix in Matlab syntax where , marks a new column and ; marks a new row:
<div><pre>[<span>1</span>, <span>2</span>, <span>3</span>;
 <span>4</span>, <span>5</span>, <span>6</span>]
</pre></div>
Here is how to create the corresponding matrix in R:
<div><pre>matrix(c(<span>1</span>,<span>4</span>,<span>2</span>,<span>5</span>,<span>3</span>,<span>6</span>), <span>2</span>, <span>3</span>)
</pre></div>
<div><pre><span>##      [,1] [,2] [,3]</span>
<span>## [1,]    1    2    3</span>
<span>## [2,]    4    5    6</span>
</pre></div>
Functional but not as pretty, plus the default is ... [Read more...]

Oldies but Goldies: Statistical Graphics Books

March 1, 2014 | Rasmus Bååth

I just wanted to plug for three classical books on statistical graphics that I really enjoyed reading. The books are old (that is, older than me) but still relevant and together they give a sense of the development of exploratory graphics in general and the graphics system in R specifically ... [Read more...]

Bayesian First Aid: Two Sample t-test

February 24, 2014 | Rasmus Bååth

As spring follows winter once more here down in southern Sweden, the two sample t-test follows the one sample t-test. This is a continuation of the Bayesian First Aid alternative to the one sample t-test where I’ll introduce the two sample alternative. It will be a quite short post ... [Read more...]

A Significantly Improved Significance Test. Not!

February 12, 2014 | Rasmus Bååth

It is my great pleasure to share with you a breakthrough in statistical computing. There are many statistical tests: the t-test, the chi-squared test, the ANOVA, etc. I here present a new test, a test that answers the question researchers are most anxious to figure out, a test of significance, ... [Read more...]

Bayesian First Aid: One Sample and Paired Samples t-test

February 4, 2014 | Rasmus Bååth

Student’s t-test is a staple of statistical analysis. A quick search on Google Scholar for “t-test” results in 170,000 hits in 2013 alone. In comparison, “Bayesian” gives 130,000 hits while “box plot” results in only 12,500 hits. To be honest, if I had to choose I would most of the time prefer a ... [Read more...]

Bayesian First Aid: Binomial Test

January 20, 2014 | Rasmus Bååth

The binomial test is arguably the conceptually simplest of all statistical tests: It has only one parameter and an easy to understand distribution for the data. When introducing null hypothesis significance testing it is puzzling that the binomial test is not the first example of a test but sometimes is ... [Read more...]

Bayesian First Aid

January 10, 2014 | Rasmus Bååth

So I have a secret project. Come closer. I’m developing an R package that implements Bayesian alternatives to the most commonly used statistical tests. Yes you heard me, soon your t.testing days might be over! The package aims at being as easy as possible to pick up and ... [Read more...]

The Mascots of Bayesian Statistics

December 25, 2013 | Rasmus Bååth

Why would Bayesian statistics need a mascot/symbol/logo? Well, why not? I don’t know of any other branch of statistics that has a mascot but many programming languages have. R has an “R”, Python has a python snake, and Go has an adorable little gopher. While Bayesian statistics ... [Read more...]

How Do You Write Your Model Definitions?

October 20, 2013 | Rasmus Bååth

I’m often irritated by that when a statistical method is explained, such as linear regression, it is often characterized by how it can be calculated rather than by what model is assumed and fitted. A typical example of this is that linear regression is often described as a method ... [Read more...]

A Bayesian Twist on Tukey’s Flogs

September 30, 2013 | Rasmus Bååth

In the last post I described flogs, a useful transform on proportions data introduced by John Tukey in his Exploratory Data Analysis. Flogging a proportion (such as, two out of three computers were Macs) consisted of two steps: first we “started” the proportion by adding 1/6 to each of the counts ... [Read more...]

SPSS looked great! 20 years ago…

September 4, 2013 | Rasmus Bååth

For some reason someone dropped a pamphlet advertising SPSS for Windows 3.0 in my mail box at work. This means that the pamphlet, and the advertised version of SPSS, should be at least 20 years old! These days I’m happily using R for everything but if I was going to estimate ... [Read more...]

Bayesian Estimation of Correlation – Now Robust!

August 28, 2013 | Rasmus Bååth

So in the last post I showed how to run the Bayesian counterpart of Pearson’s correlation test by estimating the parameters of a bivariate normal distribution. A problem with assuming normality is that the normal distribution isn’t robust against outliers. Let’s see what happens if we take ... [Read more...]
1 2 3 4

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)