Posts Tagged ‘ R ’

another viral math puzzle

May 24, 2015
By
another viral math puzzle

After the Singapore Maths Olympiad birthday problem that went viral, here is a Vietnamese primary school puzzle that made the frontline in The Guardian. The question is: Fill the empty slots with all integers from 1 to 9 for the equality to hold. In other words, find a,b,c,d,e,f,g,h,i such that a+13xb:c+d+12xe–f-11+gxh:i-10=66. With presumably the operation […]

Read more »

My favorite R bug

May 23, 2015
By
My favorite R bug

In this note am going to recount “my favorite R bug.” It isn’t a bug in R. It is a bug in some code I wrote in R. I call it my favorite bug, as it is easy to commit and (thanks to R’s overly helpful nature) takes longer than it should to find. The … Continue reading My favorite R bug → Related posts: My Favorite Graphs Random Test/Train…

Read more »

Parametric Inference: Likelihood Ratio Test Problem 2

May 23, 2015
By
Parametric Inference: Likelihood Ratio Test Problem 2

More on Likelihood Ratio Test, the following problem is originally from Casella and Berger (2001), exercise 8.12.ProblemFor samples of size $n=1,4,16,64,100$ from a normal population with mean $\mu$ and known variance $\sigma^2$, plot the power functio...

Read more »

Simulation-based power analysis using proportional odds logistic regression

May 22, 2015
By
Simulation-based power analysis using proportional odds logistic regression

Consider planning a clinicial trial where patients are randomized in permuted blocks of size four to either a 'control' or 'treatment' group. The outcome is measured on an 11-point ordinal scale (e.g., the numerical rating scale for pain). It may be reasonable to evaluate the results of this trial using a proportional odds cumulative logit […]

Read more »

How Predictable is the English Premier League?

May 19, 2015
By
How Predictable is the English Premier League?

The reason why football is so exciting is uncertainty. The outcome of any match or league is unknown, and you get to watch the action unfold without knowing what’s going to happen. Watching matches where you know the score is never exciting. This weekend the English Premier League season will conclude with little fanfare. Bar […]

Read more »

Posterior predictive output with Stan

May 19, 2015
By
Posterior predictive output with Stan

I continue my Stan experiments with another insurance example. Here I am particular interested in the posterior predictive distribution from only three data points. Or, to put it differently I have a customer of three years and I'd like to predict the ...

Read more »

New in forecast 6.0

May 15, 2015
By
New in forecast 6.0

This week I uploaded a new version of the forecast package to CRAN. As there were a lot of changes, I decided to increase the version number to 6.0. The changes are all outlined in the ChangeLog file as usual. I will highlight some of the more important changes since v5.0 here. ETS One of […]

Read more »

the Flatland paradox

May 12, 2015
By
the Flatland paradox

Pierre Druilhet arXived a note a few days ago about the Flatland paradox (due to Stone, 1976) and his arguments against the flat prior. The paradox in this highly artificial setting is as follows:  Consider a sequence θ of N independent draws from {a,b,1/a,1/b} such that N and θ are unknown; a draw followed by its […]

Read more »

terrible graph of the day

May 12, 2015
By
terrible graph of the day

A truly terrible graph in Le Monde about overweight and obesity in the EU countries (and Switzerland). The circle presentation makes no logical sense. Countries are ordered by 2030 overweight percentages, which implies the order differs for men and women. (With a neat sexist differentiation between male and female figures.)  The allocation of the (2010) […]

Read more »

Hello Stan!

May 12, 2015
By
Hello Stan!

In my previous post I discussed how Longley-Cook, an actuary at an insurance company in the 1950's, used Bayesian reasoning to estimate the probability for a mid-air collision of two planes.Here I will use the same model to get started with Stan/RStan,...

Read more »


Subscribe

Email:

  Subscribe