March 7, 2011
By

## Alabama is a foreign country

March 7, 2011
By

Faculty and students of Iowa State University Department of Statistics published online an analysis of the data on 2009 distributions of the US Stimulus funds, aka the Recovery And Reinvestment Act. (The analysis was published in March last year as part of the Design for America competition, but I only recently came across it.) The analyses and associated charts...

## Basic Plots in R

March 7, 2011
By

Here's a tutorial I recorded on producing basic plots in R.I lost the script file I used to create the video to a horrifying black screen of death, but I used the data from the previous post (available here). Hopefully, the video is clear enough that ...

## Visualizing the Language Used by Academics when Protected by Anonymity

March 7, 2011
By

Those in the political science discipline probably remember their first encounter with poliscijobrumors.com. For those outside, you have probably never heard of this particular message board, and you would have no reason to. As the URL suggests, the board specializes in rumor, gossip, back-bitting, mudslinging, and the occasional lucid thread on the political science

## Example 8.29: Risk ratios and odds ratios

March 7, 2011
By

When can you safely think of an odds ratio as being similar to a risk ratio?Many people find odds ratios hard to interpret, and thus would prefer to have risk ratios. In response to this, you can find several papers that purport to convert an odds rat...

## R Tutorial Series: ANOVA Pairwise Comparison Methods

March 7, 2011
By

When we have a statistically significant effect in ANOVA and an independent variable of more than two levels, we typically want to make follow-up comparisons. There are numerous methods for making pairwise comparisons and this tutorial will demonstrate...

## R Tutorial Series: ANOVA Pairwise Comparison Methods

March 7, 2011
By

When we have a statistically significant effect in ANOVA and an independent variable of more than two levels, we typically want to make follow-up comparisons. There are numerous methods for making pairwise comparisons and this tutorial will demonstrate...

## Factor models of variance in finance

March 7, 2011
By

In “What the hell is a variance matrix?” I talked about the basics of variance matrices and highlighted challenges for estimating them in finance.  Here we look more deeply at the most popular estimation technique. Models for variance matrices The types of variance estimates that are used in finance can be classified as: Sample estimate … Continue reading...

March 6, 2011
By

There are situations where we might want to run R on a standalone machine so need to download a (potentially) large number of packages to install on this system. Rather than having to through the pain of searching through CRAN to find the packages and all the dependencies and manually download, it would be nice

## Boxplots & Beyond IV: Beanplots

This post is the last in a series of four on boxplots and some of their extensions.  Previous posts in this series have discussed basic boxplots, modified boxplots based on a robust asymmetry measure, and violin plots, an alternative that essentia...

## Moving from Excel to R

March 5, 2011
By

This first post of the Backtesting in Excel and R series will provide some resources to help smooth the transition from the familiarity and comfort of Excel to the potentially strange and intimidating world of R.I made my voyage from Excel to R more th...

## Moving from Excel to R

March 5, 2011
By

This first post of the Backtesting in Excel and R series will provide some resources to help smooth the transition from the familiarity and comfort of Excel to the potentially strange and intimidating world of R.I made my voyage from Excel to R more th...

March 5, 2011
By

Choropleth Maps are very useful to visualize spatial trends. There have been several blog posts providing detailed instructions on how to create a choropleth map in R using map, spplot and ggplot2. However, I believe that the p...

## Five ways to visualize your pairwise comparisons

March 5, 2011
By

In data analysis it is often nice to look at all pairwise combinations of continuous variables in scatterplots. Up until recently, I have used the function splom in the package lattice, but ggplot2 has superior aesthetics, I think anyway.Here a fe...

## Parallel processing in R for Windows

March 4, 2011
By

The doSMP package (and its companion package, revoIPC), previously bundled only with Revolution R, is now available on CRAN for use with open-source R under the GPL2 license. In short, doSMP makes it easy to do SMP parallel processing on a Windows box with multiple processors. (It works on Mac and Linux too, but it's been relatively easy to...

## New R code for ‘moving’ or ‘running’ correlations

March 4, 2011
By

Someone at the lab asked how to ‘do something like running means, but with correlations’. I couldn’t find any existing code that would make a good example, so I just wrote some myself. It would be nice to do this without looping. If anyone has a clever way to do this, please do let me

March 4, 2011
By

A few days ago Conrad Sanderson released version 1.1.6 of his Armadillo templated C++ library for linear algebra. Accordingly, I made a new release 0.2.14 of RcppArmadillo, our Rcpp-based integration into R which included a few local fixes. However, ...

## A Million Random Digits: review of reviews

March 4, 2011
By

Recently on his blog (here), Robin mentioned an amazing book, called "A Million Random Digits" published by RAND corporation. The book was initially published in 1955, but RAND published a nice (and expensive) second edition. A great thing is that ...

## Death Spiral Warning Graph

March 4, 2011
By

In the death spiral scenario, rates go up while the currency goes down.  Here is the way to watch that.  I’m not saying that death spiral of US Dollar and interest rates occurs, but without significant action to restore confidence in fiscal...

## Yet another R report generator, and more!

March 4, 2011
By

I recently uploaded some code to R-forge related to an R package I’ve been working on, titled yarr. The work was motivated by a desire to embed R code and output within my HTML blog posts! Months ago, I wrote about a potential solution to this using the brew package. yarr is a new, but

## More on logging the outcome

March 4, 2011
By

This one does my head in. I do it fairly regularly, lots of people do, but I find everytime it comes to interpreting the results I have to slow it right down and go step by step. Answer: When you log the outcome, then on the original scale, for all else constant, Y will be

## Video Introduction to R Packages by Rory Winston – Melbourne R Users February 2011

March 3, 2011
By

On February 17th 2011 Rory Winston gave a talk on creating R packages at the Melbourne R Users Group (see Meetup page). Slides from the talk can be downloaded here. For more information about Rory check out his blog The … Continue reading →

## Testing Multiple Linear Restrictions in R

March 3, 2011
By

This video shows a couple of things:1. How to test (multiple) linear restrictions in R.2. How to install a package in R. Here is the code I use in the video (with some extra comments).Here is the data set that I use in the video.

## Converting text files with sed

March 3, 2011
By

Sed is my friend to change fixed-width text files (e.g., from an R screen output) to a comma delimited file using sed 's/ */,/g' file1 >file2.csv Note the two spaces between s/ and */.

## Keep an Eye on the emerging Open-Source Analytics Stack

March 3, 2011
By

This post is contributed by Revolution Analytics CEO Norman Nie, and cross-posted from the Future of Open Source Forum. A lot of attention has been focused recently on Big Data, and rightly so: Big Data is a Big Deal. (See this LinuxInsider article, Big Data, Big Open Source Tools, for a compehensive overview of Big Data issues.) But what,...

## Creating R Packages

March 3, 2011
By

Rory Winston provides a detailed introduction to creating R packages. He provides a simple of, from start to finish, as well as how to incorporate native code into your package.

## 3D Anisotropy parameters

March 3, 2011
By

Hello everyone, I’m trying to create a method for calculating the 5 parameters for the 3D anisotropy in an automatic way. Basically I created a loop for analysing the range of the horizontal variogram in every direction and extrapolating the maximum (for the angle p). Then it computes the vertical variogram in the direction of maximum...