Blog Archives

Bayesian First Aid: Poisson Test

September 4, 2014
By
Bayesian First Aid: Poisson Test

As the normal distribution is sort of the default choice when modeling continuous data (but not necessarily the best choice), the Poisson distribution is the default when modeling counts of events. Indeed, when all you know is the number of events during a certain period it is hard to think of any other distribution, whether you are modeling the...

Read more »

drinkR: Estimate your Blood Alcohol Concentration using R and Shiny.

July 30, 2014
By
drinkR: Estimate your Blood Alcohol Concentration using R and Shiny.

Inspired by events that took place at UseR 2014 last month I decided to implement an app that estimates one’s blood alcohol concentration (BAC). Today I present to you drinkR, implemented using R and Shiny, Rstudio’s framework for building web apps using R. So, say that I had a good dinner, drinking a couple of glasses...

Read more »

Chillin’ at UseR! 2014

July 7, 2014
By
Chillin’ at UseR! 2014

This year’s UseR! conference was held at the University of California in Los Angeles. Despite the great weather and a nearby beach, most of the conference was spent in front of projector screens in 18° c (64° f) rooms because there were so many interesting presentations and tutorials going on. I was lucky to present my R package...

Read more »

beepr (former pingr) is on CRAN. It’s easier than ever to make R go beep!

June 30, 2014
By
beepr (former pingr) is on CRAN. It’s easier than ever to make R go beep!

Even though I said it would never happen, my silly package with the sole purpose of playing notification sounds is now on CRAN. Big thanks to the CRAN maintainers for their patience! For instant gratification run the following in R to install beepr and make R produce a notification sound: install.packages("beepr") library(beepr) beep() This package was previously called pingr and included...

Read more »

Bayesian First Aid: Test of Proportions

June 26, 2014
By
Bayesian First Aid: Test of Proportions

Does pill A or pill B save the most lives? Which web design results in the most clicks? Which in vitro fertilization technique results in the largest number of happy babies? A lot of questions out there involves estimating the proportion or relative frequency of success of two or more groups (where success could be a saved life, a...

Read more »

The Most Comprehensive Review of Comic Books Teaching Statistics

June 11, 2014
By
The Most Comprehensive Review of Comic Books Teaching Statistics

As I’m more or less an autodidact when it comes to statistics, I have a weak spot for books that try to introduce statistics in an accessible and pedagogical way. I have therefore collected what I believe are all books that introduces statistics using comics (at least those written in English). What follows are highly subjective reviews of those...

Read more »

Jeffreys’ Substitution Posterior for the Median: A Nice Trick to Non-parametrically Estimate the Median

May 3, 2014
By
Jeffreys’ Substitution Posterior for the Median: A Nice Trick to Non-parametrically Estimate the Median

While reading up on quantile regression I found a really nice hack described in Bayesian Quantile Regression Methods (Lancaster & Jae Jun, 2010). It is called Jeffreys’ substitution posterior for the median, first described by Harold Jeffreys in his Theory of Probability, and is a non-parametric method for approximating the posterior of the median. What makes it...

Read more »

Bayesian First Aid: Pearson Correlation Test

March 17, 2014
By
Bayesian First Aid: Pearson Correlation Test

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 for being based on Bayesian estimation (a good...

Read more »

A Hack to Create Matrices in R, Matlab style

March 7, 2014
By
A Hack to Create Matrices in R, Matlab style

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: Here is how to create the corresponding matrix in R: matrix(c(1,4,2,5,3,6), 2, 3) ## ## 1...

Read more »

Oldies but Goldies: Statistical Graphics Books

March 1, 2014
By
Oldies but Goldies: Statistical Graphics Books

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 as all three books were written at Bell Labs...

Read more »