statistics

MCMC Diagnostics in R with the coda Package

August 29, 2010 | John Myles White

This is a follow up to my recent post introducing the use of JAGS in R through the rjags package. In the comments on that post, Bernd Weiss encouraged me to write a short addendum that describes diagnostic functions that you should use to assess the output from an MCMC ... [Read more...]

Beta translation done!

August 29, 2010 | xi'an

Once my team of four translators had handed back to me all the chapters of the French version of Introducing Monte Carlo Methods with R to me, I had to go over the book to ensure some minimal consistency between the chapters. I started the editing in the plane to ... [Read more...]

Blegging for Data

August 28, 2010 | John Myles White

I’m in the middle of a new project that involves analyzing the packages that are currently on CRAN. As part of my work, I could really benefit from information about which packages are installed on people’s computers. If you’re willing to part with a bit of your ... [Read more...]

ProjectTemplate

August 26, 2010 | John Myles White

Introduction As many people already know, I’ve recently uploaded a new R package called ProjectTemplate to GitHub and CRAN. The ProjectTemplate package provides a function, create.project(), that automatically builds a directory for a new R project with a clean sub-directory structure and automatic data and library loading tools. ... [Read more...]

In Search of Power-laws: WikiLeaks Edition

August 26, 2010 | Drew Conway

Yesterday, a commenter reminded me of the very popular hobby among scientists of searching for power-law distributions in large event data. While the commonality of scale invariance in event data is quite well known—particularly with respect to conflict data—this has not prevented many researchers from seeking and finding ... [Read more...]

What the hell is a variance matrix?

August 25, 2010 | Pat

When I first came to finance, I kept hearing about “risk models”. I wondered, “What the hell is a risk model?” Of course, I didn’t say this out loud — that would have given the game away.  My wife has strict instructions that she is to be the only one ...
[Read more...]

informality, the 2010 edition

August 24, 2010 | jackman

For the last two cycles I’ve done some simple regression analysis of the informal vote.  I saw Possum have his go at it, using a specification that is virtually the same as what I’ve run in the past (2007, 2004). The 2010 edition follows.  As usual, electorate-level informality in House of ... [Read more...]

Tips for the R beginner (a 5 page overview)

August 23, 2010 | Tal Galili

In this post I publish a PDF document titled “A collection of tips for R in Finance”. It is a basic 5 page introduction to R in finances by Arnaud Amsellem (linked in profile). The article offers tips related to the following points: Code Editor Organizing R code Update packages Getting ... [Read more...]

Leveraging the Wisdom of Crowds for Fantasy Football

August 23, 2010 | Drew Conway

WARNING: This has nothing to do with national security, but is nonetheless awesome. This evening I will be participating in that great annual tradition which marks the transition from Summer to Fall: the fantasy football draft. A large part of having a successful fantasy football draft is being able to ... [Read more...]

Abstract word clouds using R

August 23, 2010 | nsaunders

A recent question over at BioStar asked whether abstracts returned from a PubMed search could easily be visualised as “word clouds”, using Wordle. This got me thinking about ways to solve the problem using R. Here’s my first attempt, which demonstrates some functions from the RCurl and XML packages. ... [Read more...]

swing graph

August 21, 2010 | jackman

I’m updating a swing dotplot PDF every 10 minutes as the count progresses (and the cool part is that the updates continue even as I’m flying Heathrow to SFO). [Read more...]

Using JAGS in R with the rjags Package

August 20, 2010 | John Myles White

Get Everything Set Up I’m going to assume that you have access to a machine that will run JAGS. If you don’t, then you should be able to use WinBUGS, which is very easy to get set up. Unfortunately, the details of what follows may not help you ... [Read more...]

A brief introduction to “apply” in R

August 19, 2010 | nsaunders

At any R Q&A site, you’ll frequently see an exchange like this one: Q: How can I use a loop to [...insert task here...] ? A: Don’t. Use one of the apply functions. So, what are these wondrous apply functions and how do they work? I think the ... [Read more...]

R be dragons

August 18, 2010 | Timothée

Hic sunt dracones used to be placed on maps, as a way to denote a dangerous or otherwise unexplored territory. We might as well write it all over R-related material used in introductory classes, because students seems to be really (…)Read the rest of this entry » [Read more...]

Distributions in R

August 18, 2010 | David Smith

One of the R language's most powerful features is its ability to deal with random distributions: not just generating random numbers from various distributions (based on a very powerful pseudo-random number generator), but also calculating densities, probabilities, and quintiles. John Cook provides a handy reference chart listing all of the ... [Read more...]

Twifficiency Scores

August 18, 2010 | John Myles White

Neil Kodner wrote a great post this morning about yesterday’s Twifficiency scores outbreak. He grabbed all the auto-tweeted scores he could find and plotted their distribution. I was struck by the asymmetry of the resulting distribution, which you can see below: Thankfully, Neil handed me the raw data for ... [Read more...]

state-by-state pendulum

August 17, 2010 | jackman

By popular demand (!), my state-by-state pendulum (pendula?) for 2010 is up (big PDF), just in time for the election.  550px wide JPG version is inline, below. This follows the same formatting I used in the 2007 edition. We start with the 2PP ALP vote shares recorded at the last election (incorporating changes ... [Read more...]

Unit Testing in R: The Bare Minimum

August 17, 2010 | John Myles White

Introduction This week I decided to start unit testing my R code, so I taught myself the bare minimum about the RUnit and testthat packages to be able to use them. Here’s what I found necessary to get started writing tests with both packages. RUnit Basic Example I’m ... [Read more...]

Which chart is better?

August 10, 2010 | dan

CHART CRITICS, GRAPHICS CURMUDGEONS, COME ONE COME ALL Once upon a time there was this graph (graph 1). Andrew Gelman went all graphics curmudgeon on it, calling it an “ugly, sloppy bit of data graphics“, so it became this graph (graph 2). Now the question is, which is better: graph 2 or graph 3? ... [Read more...]
1 25 26 27 28 29 41

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)