Here you will find daily news and tutorials about R, contributed by over 750 bloggers.
There are many ways to follow us - By e-mail:On Facebook: If you are an R blogger yourself you are invited to add your own R content feed to this site (Non-English R bloggers should add themselves- here)

(This article was first published on » R, and kindly contributed to R-bloggers)

Just few hours before Scots head to the polls, there is not an overwhelming advantage of the anti-independence vote. Actually, the margin is shorter than last time I looked at it, but despite such a growing trend in favor of the “Yes” campaign in the last weeks, the “NO” side has an edge still. To frame this in terms of probabilities that exceeds , I write a short function (replicated here) that will use simulation from the Dirichlet distributions to compute the posterior probability that “No” exceeds “Yes” shown in the lovely chart below.

The data used here to draw the distributions were gathered from a series of polls and available at the wikipedia. The polls employ different methodologies and phrase questions differently. For instance, some surveys ask respondents how they would vote if this referendum were held today, others ask them how they intend to vote on 18th September. By aggregating them, any swing could be the by-product of the random variation to which all polls are subject.

Related

To leave a comment for the author, please follow the link and comment on their blog: » R.