## R Tutorial Series: Two-Way Omnibus ANOVA

January 17, 2011
By

As with the one-way case, testing the omnibus hypothesis via two-way ANOVA is simple process in R. This tutorial will explore how R can be used to perform a two-way ANOVA to test the difference between two (or more) group means. Tutorial FilesBefore we...

## Introducing Monte Carlo Methods with R [precision]

January 17, 2011
By

Doug Rivers, professor of Political Sciences in Stanford, kindly sent me this email yesterday night: The 2nd displayed equation in section 2.1.2 on p. 44 is garbled (it might be interpreted as saying that U and X have the same distribution). I think you intended: And indeed we should have stated the implicit convention that

## Normal market accidents

January 17, 2011
By

We think of accidents as abnormal events, but there is “normal accident” theory.  We don’t think of accidents happening in markets, but they do.  That’s why it’s called a market crash. For normal accidents to come into play, two conditions need to hold: the system is complex the system is tightly coupled Certainly the financial … Continue reading...

## Méthodes de Monte-Carlo avec R [out]

January 17, 2011
By

The translation of the book Introducing Monte Carlo Methods with R is now published and out! I have received five copies in the mail yesterday, although it was not produced in time for my R class students to get it before the exam today. The book is still indicated on amazon.com as appearing in February,

## Dial-a-statistic! Featuring R and Estonia

January 16, 2011
By

Did you wake up this morning hoping that you would be able to listen to telephone beeps inspired by Estonian web site metrics? I knew you did! First things first: I came up with the slightly crazy idea of using the bleepy sounds that telephones make, called “dual-tone multifrequency” (DTMF) tones, as a tool in

## Climate Charts, Data and RClimate Scripts

January 16, 2011
By

While there are many online climate data resources, the source data files are in numerous data formats, presenting a challenge to climate citizen scientists who want to retrieve and analyze several climate indicators at the same time. I have been &#823...

## Plotting overbought / oversold regions in R

January 16, 2011
By

The good folks at Bespoke Investment Group frequently show charts of so-called overbought or oversold levels; see e.g. here for the most recent global markets snapshot. Classifying markets as overbought or oversold is a popular heuristic. It starts...

## When 1 * x != x

January 16, 2011
By
$When 1 * x != x$

Trying to dimly recall things from my maths degree, it seems that in most contexts the whole point of the number one is that it is a multiplicative identity. That is, for any x in your set, 1 * x is equal to x. It turns out that when you move to floating point numbers,

## Dona eis Python, whap!

January 15, 2011
By

Well, I'm taking the plunge and learning Python. We'll see how this goes. Then I'll try NumPy (and SciPy, if it gets ported), and see of I can get R and Python talking.

## Missing reference in Monte Carlo Statistical Methods

January 15, 2011
By

A few days ago, Peng Yu sent me this email Dear Prof. Robert, The citation Edwards and Sokal (1988) appears on page 326 of your book MCSM2. However, I don’t find in in the Reference section (it would have appear on page 601 if it is in the reference section). I don’t find this error

## A lightweight object browser for R

January 15, 2011
By

Get access to a simple object browser in R so that you can see what variables, data frames, model objects and other junk you have in memory currently. If you don't want to install a full-fledged integrated development environment, this option may be fo...

## Easiest way to start imagining four-dimensional things is by…

January 15, 2011
By

Easiest way to start imagining four-dimensional things is by numbering the corners of a 4-cube. First realize that the eight corners of a cube can be numbered “in binary” 000—001–010–100—110–101–011—111. Just like the four corners of ...

## Easiest way to start imagining four-dimensional things is by…

January 15, 2011
By

Easiest way to start imagining four-dimensional things is by numbering the corners of a 4-cube. First realize that the eight corners of a cube can be numbered “in binary” 000—001–010–100—110–101–011—111. Just like the four corners of ...

## Adding lines or points to an existing barplot

January 15, 2011
By

Sometimes you will need  to add some points to an existing barplot. You might try but you will get a funky looking line/points. It’s a bit squeezed. This happens because bars are not drawn at intervals 1:10, but rather on something else. This “else” can be seen if you save your barplot object. You will

## R Code Documentation Template

January 15, 2011
By

# *------------------------------------------------------------------# | PROGRAM NAME: # | DATE: # | CREATED BY: # | PROJECT FILE: # *----------------------------------------------------------------# | PURPOSE: # |# *-------...

## Quickly adapt starting values in MCMC using paste()

January 15, 2011
By

Waiting for convergence of MCMC models can take some time, therefore it may be a good idea to use better starting values. Using paste, one can quickly convert any (parameter) vector in the workspace into a R-style vector (with c()). Here's a function t...

## Parsing and plotting time series data

January 15, 2011
By

This morning I came across a post which discusses the differences between scala, ruby and python when trying to analyse time series data. Essentially, there is a text file consisting of times in the format HH:MM and we want to get an idea of its distribution. Tom discusses how this would be a bit clunky

## sab-R-metrics: Beginning with Boxplots, Scatterplots, and Histograms

January 15, 2011
By

Today I decided to begin more with visualizations and less with basic statistical analysis for sabermetrics using R. I'm not really here to teach the ins and outs of regressions and statistical tests, so once I get there, I'm hoping that those who have read this already have a decent understanding of those subjects before implementing them. ...

## sab-R-metrics: Beginning with Boxplots, Scatterplots, and Histograms

January 15, 2011
By

Today I decided to begin more with visualizations and less with basic statistical analysis for sabermetrics using R. I'm not really here to teach the ins and outs of regressions and statistical tests, so once I get there, I'm hoping that those who have read this already have a decent understanding of those subjects before implementing them. ...

## Book Review: Mixed Effects Models and Extensions in Ecology with R

January 14, 2011
By

A brief review of Zuur et al.'s book "Mixed Effects Models and Extensions in Ecology with R".

## Webinar on Portfolio Design, Optimization and Stability Analysis, Jan 26

January 14, 2011
By

We're very excited to host a new webinar from some of the leading researchers in portfolio design: Diethelm Würtz and Mahendra Mehta for the Rmetrics Association. This webinar will give an overview on current and recent developments and tools for portfolio design, optimization and stability analysis with the R/Rmetrics software environment. This webinar will review content available in the...

## Warming in Paris: minimas versus maximas ?

January 14, 2011
By

Recently, I received comments (here and on Twitter) about my previous graphs on the temperature in Paris. I mentioned in a comment (there) that studying extremas (and more generally quantiles or interquantile evolution) is not the same as studying ...

## Bipartite networks and R

January 14, 2011
By

Earlier, I posted about generating networks from abundance distributions that you specify. If this post was interesting, check out Jeff Kilpatrick's website, where he provides code he produced in R and Octave to compare real bipartite networks to ones ...

## Statistical podcast: Random and Pseudorandom

January 14, 2011
By

This morning when I downloaded the latest version of In our time, I was pleased to see that this weeks topic was “Random and Peudorandom.” If you’re not familiar with “In our time”, then I can I definitely recommend the series. Each week three academics and Melvyn Bragg discuss a particular topic from history, science,

## Changing phylogeny tip labels in R

January 14, 2011
By

During the process of molecular systematic research, specimens are given code names and numbers to keep track of data through the pipeline. These can contain a lot of information of relevance to the researcher, but unfortunately are meaningless to others who aren't as involved with the data. On publication, it is necessary to change the names from the code...

## Changing phylogeny tip labels in R

January 14, 2011
By

During the process of molecular systematic research, specimens are given code names and numbers to keep track of data through the pipeline. These can contain a lot of information of relevance to the researcher, but unfortunately are meaningless to others who aren't as involved with the data. On publication, it is necessary to change the names from the code...

## Remove all rows of an R dataframe

January 13, 2011
By

I should have probably figured this out a long time ago, but as I get deeper into programming with R, I am finding the need to remove all rows from a dataframe.  I was making this alot harder than it had to be. your.df<- your.df Replace your.df with, your dataframe and you are good

## Visualizing the Haiti earthquake with R

January 13, 2011
By

Yesterday was the one-year anniversary of the Haiti earthquake, and to put the scale of the event in context San Francisco bureau chief for New Scientist magazine and data journalist Peter Aldhous created a time-lapse animation of all large earthquakes in the last year, beginning with the 7.0-magnitude Haiti event. Peter used USGS data, R and Flash to generate...