Guide to Getting Started with R: 2011 Update

May 4, 2011
By
Guide to Getting Started with R: 2011 Update

In mid-2009, I wrote a post on getting started with R. A lot has happened in the world of R over the last two years. New books, videos, online documentation, blogs and other resources have emerged. New community structures have emerged. As such I've gi...

Read more »

How to learn R

May 3, 2011
By

Over at R community site inside-R.org, Revolution's Joseph Rickert has published a How-To guide with tips for new users on How to Learn R, with links to resources for R books, blogs and courses. Check it out at the link below. Inside-R: How to Learn R

Read more »

Putting Robust Standard Errors into LaTeX Tables: An Extension of mtable

May 3, 2011
By
Putting Robust Standard Errors into LaTeX Tables: An Extension of mtable

I recently discovered the mtable() command in the memisc library and its use with toLatex() to produce nice summary output for lm and glm objects in a nicely formatted table like this:Once you have your linear model objects, all you need is one command...

Read more »

Putting Robust Standard Errors into LaTeX Tables: An Extension of mtable

May 3, 2011
By
Putting Robust Standard Errors into LaTeX Tables: An Extension of mtable

I recently discovered the mtable() command in the memisc library and its use with toLatex() to produce nice summary output for lm and glm objects in a nicely formatted table like this:Once you have your linear model objects, all you need is one command...

Read more »

Fun with twitteR: Osama bin Laden tweets

May 3, 2011
By
Fun with twitteR: Osama bin Laden tweets

I thought it would be fun to play around with the R package twitteR , an R API into Twitter.  I decided to take the most prominent news story of the past few days, Osama bin Laden’s death, to see … Continue reading →

Read more »

Running R on an iPhone/iPad with RStudio

May 3, 2011
By
Running R on an iPhone/iPad with RStudio

This thread has been widely discussed on a lot of forums. To make a long story short, running natively R on an iDevice (meaning iPhone/iPad) is disabled by its OS, unless it is jailbroken. The steps for the installation through Cydia are described in this R wiki, or this post. But there are some limitations,

Read more »

CPI and US 10y Treasury Extreme –> System Idea

May 3, 2011
By
CPI and US 10y Treasury Extreme –> System Idea

When I see extremes, I feel compelled to explore. The US 10y Treasury yield is at an extreme versus the annualized 3 month CPI rate of change. From TimelyPortfolio Of course, I have to try to build a system around the idea.  While this 3 mont...

Read more »

Day #34 Detailing graphs

May 3, 2011
By

Today mostly existed in adding details or changing certain aspects of my graphs. For example, I had to turn around the y-axis on my levelplot, circleplot, … which wasn’t so easy at first. But after a bit of googling I found out I had to rev...

Read more »

Day #32-33 reporting, R and Birt

I’m starting on my real R-Scripts now. We got an assesment for some Reports and they needed my graphs and Veerle’s Reports. So the tasks are: Well distribution plot Quality plate control Surface Plot Heatmap CirclePlot and more to come&#823...

Read more »

To attach() or not attach(): that is the question

May 3, 2011
By
To attach() or not attach(): that is the question

R objects that reside in other R objects can require a lot of typing to access. For example, to refer to a variable x in a dataframe df, one could type df$x. This is no problem when the dataframe and variable names are short, but can become burdensom...

Read more »

Treebase trees from R

May 3, 2011
By
Treebase trees from R

Treebase is a great resource for phylogenetic trees, and has a nice interface for searching for certain types of trees. However, if you want to simply download a lot of trees for analyses (like that in Davies et al.), then you want to be able to access...

Read more »

Kaggle Competition Walkthrough: Introduction

May 3, 2011
By
Kaggle Competition Walkthrough: Introduction

Kaggle is a site for participating in predictive analytics competitions. It is also a great resource for learning how to build powerful predictive models, and the Overfitting competition provides a good introduction to the common tools used by a predic...

Read more »

For happy-R blogging

May 3, 2011
By
For happy-R blogging

You may notice that I don’t have that many posts on my blog, and they are all about R. The paucity of my posts makes me a bit sad, but not much, really… What makes (or better, used to make me) sad is that posts of R code (used to) look awful. However, your code

Read more »

Playing with robots

May 3, 2011
By
Playing with robots

My son would be extremely proud if I tell him I can spend hours building robots. Well, my robots are not as fancy as Dr Tenma's, but they usually do what I ask them to do. For instance, it is extremely simple to build a robot with R, to extract dat...

Read more »

Estimate Gene Diversity

May 3, 2011
By
Estimate Gene Diversity

I provide here an R function to estimate gene diversity of diallelic sites (e.g. SNPs), given allele frequencies at each segregating site. The function takes three input parameters: maf: a numeric value (or vector) representing minor allele frequency at each site. Default is 0.5 nreads: size of each resampling experiment. Default is 10000. nreplicates: Number

Read more »

Loops, Conditionals and Variables: A Basic Simulation in R

May 3, 2011
By
Loops, Conditionals and Variables: A Basic Simulation in R

In this post, I’m going to go over some basics of using conditionals and loops in R. I’ll expand on the example I use here in future posts. The conditionals and loops will be used to create some dummy eye movement data. Background Before I get into the actual code itself, I should probably explain

Read more »

R and the Data Science Toolkit

May 2, 2011
By
R and the Data Science Toolkit

I recently decided to present a talk to the Denver R Users Group (DRUG) on how to make an R package (May 17). There were only two problems: (1) I’ve never made a package and (2) I had nothing in mind … Continue reading →

Read more »

Another review of Introducing … R

May 2, 2011
By
Another review of Introducing … R

The March 2011 issue of JASA contains a review of Introducing Monte Carlo Methods with R by Hedibert Lopes. As in the previous review, the poor quality of the figures is (rightly) pointed out by Hedie. However, the main message of the review remains very positive and, furthermore, Hedie advertises the ‘Og itself in the

Read more »

Commodity Index Estimators

May 2, 2011
By
Commodity Index Estimators

In this post I will show my first try at a commodity index substitute.  Regular readers know my frustration with proprietary data as I try to demonstrate various techniques to users who might not have the resources to pay for the data.  I hav...

Read more »

Ecological SEMs and Composite Variables: What, Why, and How

May 2, 2011
By
Ecological SEMs and Composite Variables: What, Why, and How

I’m a HUGE fan of Structural Equation Modeling. Heck, I’ve even begun teaching short SEM workshops. (seriously, if you want, email me and we’ll talk). For those of you unfamiliar with the technique, it’s awesome for three main reasons. It’s a method of teasing apart direct and indirect interactions in your data. It allows you

Read more »

First Answer to My Own Question-Combine LSPM and Mahalanobis

May 2, 2011
By
First Answer to My Own Question-Combine LSPM and Mahalanobis

I first wanted to thank http://www.fosstrading.com for the very kind and unexpected mention over the weekend.  You will notice almost all of my code contains some credit to Foss Trading for the examples and great packages.  I hate that I coul...

Read more »

ARMA Models for Trading, Part III

May 2, 2011
By
ARMA Models for Trading, Part III

In the last post I showed how to pick the parameters for the ARMA model. The next step is to determine the position at the close. One way to do that is by a one day ahead prediction, if the prediction comes negative (remember the series we are operating on is the daily returns) then

Read more »

Commodities vs. commodity stocks

May 2, 2011
By
Commodities vs. commodity stocks

Introducing R in the Enterprise

May 2, 2011
By
Introducing R in the Enterprise

We've introduced R in the organization!It is running along with the heavy weights of statistical analysis like SAS, SPSS, Matlab. Here's what we did and how we did it...HOW DID IT START?I started learning R last year and loved its simplicity and power....

Read more »

Introducing R in the Enterprise

May 2, 2011
By
Introducing R in the Enterprise

We've introduced R in the organization!It is running along with the heavy weights of statistical analysis like SAS, SPSS, Matlab. Here's what we did and how we did it...HOW DID IT START?I started learning R last year and loved its simplicity and power....

Read more »

Review of the R Cookbook

May 2, 2011
By

While we were at R/Finance in Chicago over the weekend (more on that later), it was a great pleasure to meet in person Paul Teetor, author of the R Cookbook (published by O'Reilly). If you haven't picked it up yet, I recommend checking it out: if you already have a basic familiarity of the R syntax, but want to...

Read more »

R/Finance conference in Chicago – April 29, 2011 to April 30, 2011

May 2, 2011
By

This was my first year to attend the R/Finance conference that focuses on the use R programming in applied finance.  I was unable to get out there until mid-morning on Friday, so I missed Jeff Ryan’s tutorial on Automated Trading … Continue reading →

Read more »

Oscar awards: good actor versus good actress

May 2, 2011
By
Oscar awards: good actor versus good actress

I am not a big fan of those ceremonies, where some actors pretend that they are extremely happy to be there, and then some win a trophy, some don't, and those who win start to cry, and those who did not get a trophy try to pretend that they are not...

Read more »

Unicode symbols in R

May 2, 2011
By
Unicode symbols in R

A friend asked me this morning if there was a way to plot a symbol in R (as a plotting character) representing a half-filled circle. I didn't know, but I figured this out (perhaps it's demonstrated elsewhere -- the ability to use Unicode symbols was added in 2008 or so -- but I didn't stumble across it). First, looking...

Read more »