Monthly Archives: April 2011

Pivot Tables and Medians in R

April 16, 2011
By

Pivot Tables are a useful way of aggregating data into the format that you’re after. In this example, I’m going to be using R to pivot some data and calculate medians for me. This is useful because Excel can calculate medians (the =MEDIAN(values)) function, but what it can’t do is calculate medians for Pivot Tables.

Read more »

Phylometa from R: Randomization via Tip Shuffle

April 16, 2011
By
Phylometa from R: Randomization via Tip Shuffle

I wrote earlier about some code I wrote for running Phylometa (software to do phylogenetic meta-analysis) from R.I have been concerned about what exactly is the right penalty for including phylogeny in a meta-analysis. E.g.: AIC is calculated from Q in...

Read more »

Trackman Position Needs R Knowledge

April 16, 2011
By

Thought some of the R-Blogger readers would be interested in the position linked below. If you're a baseball fan and like working in R, this is a fun company that seems to be getting more and more press. Recently, it was featured in Sports Illustrate...

Read more »

Speeding up agent-based simulations with data frames in R

April 16, 2011
By

In health economics it is common to use agent-based simulations for exploring epidemiological models, prevention policies, and clinical interventions, among other things. In C++ I enjoy using object-oriented design to build these agent-based models. It feels so natural. In R, … Continue reading →

Read more »

Historical Bond Price and Total Returns from 10y Yield Series

April 15, 2011
By
Historical Bond Price and Total Returns from 10y Yield Series

Without access to Barclays or Merrill Bond Indicies to the 1970s or Ned Davis to 1950, studying historical bond returns is very difficult.  Here is a way to derive price and total returns on the 10 year US Treasury back to 1962.  I would like...

Read more »

Introduction to Cointegration and Pairs Trading

April 15, 2011
By
Introduction to Cointegration and Pairs Trading

Introduction Suppose you see two drunks (i.e., two random walks) wandering around. The drunks don’t know each other (they’re independent), so there’s no meaningful relationship between their paths. But suppose instead you have a drunk walking with her dog. This … Continue reading →

Read more »

Friday Function: setInternet2

April 15, 2011
By
Friday Function: setInternet2

Corporate IT networks are a pain for programmers. Ideally, when programming, you want the freedom to download, install and run any software that you want. Unfortunately, in the interests of security, many programmers find themselves a little restricted at the office. (I’m sure that many network admins will protest that the situation works both ways

Read more »

Slides and replay for PMML webinar

April 15, 2011
By

If you missed Wednesday's webinar on Deploying Predictive Analytics with Revolution R, PMML and ADAPA, the presentation slides and the replay (in WMV, reg. req'd) format are now available for download. Here are some additional references, from the closing slide: How Revolution R and ADAPA work together The PMML Package reference White Paper: Deploying Advanced Analytics Using R and...

Read more »

Visualizing tax brackets

April 15, 2011
By
Visualizing tax brackets

With Tax Day fast approaching here in the US, there's been a lot of discussion about tax policy and in particular the tax rates paid by the highest income earners. Like in many countries, here the income tax system is bracketed: Tax Bracket Single Married Filing Jointly 10% Bracket $0 – $8,375 $0 – $16,750 15% Bracket $8,375 –...

Read more »

Rook shipped to CRAN

April 15, 2011
By
Rook shipped to CRAN

I sometimes feel like this picture: alone, left with just my thoughts and a little light to illuminate my work. For my daughter pictured above on the stool, her work is a pen and ink drawing. For me, it’s a finished piece of software to share with t...

Read more »

Sponsors

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)