Anarchy Golf! And that’s your Sunday gone.

October 29, 2011
By
Anarchy Golf! And that’s your Sunday gone.

I like to follow good practice when I program. I want my code to be readable, properly indented, modular and re-usable. And I want my variables to have descriptive names. There’s nothing that I hate moderately dislike more than arbitrary … Continue reading →

Read more »

Plotting gain chart

October 29, 2011
By
Plotting gain chart

Gain chart is a popular method to visually inspect model performance in binary prediction. It presents the percentage of captured positive responses as a function of selected percentage of a sample. It is easy to obtain it using ROCR package plott...

Read more »

SabreR

October 29, 2011
By

SabreR just released an update. It is another software package that can estimate multivariate multilevel model (other options are aML, MCMCglmm, etc.). They seem to also have a book dedicated to the software, which be worth checking out.It will be grea...

Read more »

Migrating from SPSS/Excel to R, Part 3: Preparing your Data

October 29, 2011
By
Migrating from SPSS/Excel to R, Part 3: Preparing your Data

In this post, I describe how to prepare your data for migrating between SPSS/Excel and R. This is the third …Continue reading »

Read more »

Dennis Ritchie 1941-2011

October 28, 2011
By
Dennis Ritchie 1941-2011

I just got the “news” that Dennis Ritchie died, although this happened on October 12… The announcement was surprisingly missing from my information channels and certainly got little media coverage, compared with Steve Jobs‘ demise. (I did miss the obituaries in the New York Times and in the Guardian. The Economist has the most appropriate

Read more »

Comparison of ave, ddply and data.table

October 28, 2011
By
Comparison of ave, ddply and data.table

This is a copy of a post by me on the R-statistics blog. Fortran and C programmers often say that interpreted languages like R are nice and all, but lack in terms of speed. How fast something works in R… See more ›

Read more »

New R User Group in Dublin, Ireland

October 28, 2011
By

There have been several requests to an R User Group in Ireland, so thanks to Kevin O'Brien for stepping up to co-ordinate the Dublin-R group. Kevin invites all R users in the area to the first meeting on November 17: The Dublin R users group will be holding a series of monthly meetings. On the agenda is the development...

Read more »

My little presentation on getting web data through R

October 28, 2011
By
My little presentation on getting web data through R

With examples from rOpenSci R packages. p.s. I am no expert at this...Web data from R View more presentations from schamber

Read more »

R-TreeBASE Tutorial

October 28, 2011
By
R-TreeBASE Tutorial

My treebase package is now up on the CRAN repository. (Source code is up, the binaries should appear soon). Here’s a few introductory examples to illustrate some of the functionality of the package. Thanks in part to new data deposition … Continue reading →

Read more »

Copulas made easy

October 28, 2011
By
Copulas made easy

Everyday, a poor soul tries to understand copulas by reading the corresponding Wikipedia page, and gives up in despair. The incomprehensible mess that one finds there gives the impression that copulas are about as accessible as tensor theory, which is a shame, because they are actually a very nice tool. The only prerequisite is knowing

Read more »

R versus SAS/SPSS in corporations

October 28, 2011
By
R versus SAS/SPSS in corporations

A recent question on one of the LinkedIn groups about the advantages of using R over commercial tools like SAS or IBM SPSS Modeller drew lots of comments for R. We like R a lot and we use it extensively, but I also wanted to balance the discussion. R is great, but looking at commercial organizations near...

Read more »

R versus SAS/SPSS in corporations

October 28, 2011
By
R versus SAS/SPSS in corporations

A recent question on one of the LinkedIn groups about the advantages of using R over commercial tools like SAS or IBM SPSS Modeller drew lots of comments for R. We like R a lot and we use it...

Read more »

Creating an R package, using developer/productivity tools

October 27, 2011
By
Creating an R package, using developer/productivity tools

Couple of R programming (mainly infrastructure/workflow) related topics discussed at the Los Angeles R users group in a tutorial/demo-like form (targeted mainly to beginners) by Szilard Pafka and Jeroen Ooms: how easy it is to create a simple package for … Continue reading →

Read more »

Building diversified portfolios with R

October 27, 2011
By
Building diversified portfolios with R

A common approach to reducing risk associated with financial portfolios is diversification. A portfolio made of components that are all highly correlated with each other -- a portfolio composed solely of financial stocks, for example -- is risky, because if there's a wide-spread crisis that affects the banking sector, all components of the portfolio will tank at once, together....

Read more »

Predictability of stock returns : Using acf()

October 27, 2011
By
Predictability of stock returns : Using acf()

In my previous post, I employed a rather crude and non-parametric approach to see if I could predict the direction of stock returns using the function runs.test(). Lets go a step further and try modelling this with a parametric econometric approach. The company that I choose for the study is INFOSYS (NSE code INFY). Lets start...

Read more »

Copy all the files in a directory to a new directory using R

October 27, 2011
By

Someone asked me how to move a directory full of files from one place to another using R.  The easiest way I've found is as follows (where "oldpath" is the existing directory and "newpath" is the new directory):file.copy(list.files(oldpath),newpath) Tags: R

Read more »

Copy all the files in a directory to a new directory using R

October 27, 2011
By
Copy all the files in a directory to a new directory using R

Someone asked me how to move a directory full of files from one place to another using R.  The easiest way I've found is as follows (where "oldpath" is the existing directory and "newpath" is the new directory):file.copy(list.files(oldpath),newpath)

Read more »

A New Dimension to Principal Components Analysis

October 27, 2011
By
A New Dimension to Principal Components Analysis

In general, the standard practice for correcting for population stratification in genetic studies is to use principal components analysis (PCA) to categorize samples along different ethnic axes.  Price et al. published on this in 20...

Read more »

The Most Diversified or The Least Correlated Efficient Frontier

October 27, 2011
By
The Most Diversified or The Least Correlated Efficient Frontier

The “Minimum Correlation Algorithm” is a term I stumbled at the CSS Analytics blog. This is an Interesting Risk Measure that in my interpretation means: minimizing Average Portfolio Correlation with each Asset Class for a given level of return. One might try to use Correlation instead of Covariance matrix in mean-variance optimization, but this approach,

Read more »

RStudio Update

October 27, 2011
By
RStudio Update

With R 2.14 slated to be released next week we wanted to encourage everyone planning to upgrade to also update to the latest release of RStudio (v0.94.110). For R 2.14 users this release includes tweaks related to compatibility with the R 2.14 graphics engine as well as compatibility with the new parallel package. There are

Read more »

Two new rOpenSci R packages are on CRAN

October 27, 2011
By
Two new rOpenSci R packages are on CRAN

Carl Boettiger, a graduate student at UC Davis, just got two packages on CRAN.  One is treebase, which which handshakes with the Treebase API.  The other is rfishbase, which connects with the Fishbase, although I believe just scrapes XML cont...

Read more »

Computing on the Language

October 27, 2011
By

And now for something a bit more esoteric…. I recently wrote a function to deal with a strange problem. Writing the function ended up being a fun challenge related to computing on the R language itself. Here’s the problem: Write a function that tak...

Read more »

Introduction to “Numerical Methods and Optimization in Finance”

October 27, 2011
By
Introduction to “Numerical Methods and Optimization in Finance”

The book is by Manfred Gilli, Dietmar Maringer and Enrico Schumann.  I haven’t actually seen the book, so my judgement of it is mainly by the cover (and knowing the first two authors). The parts of the book closest to my heart are optimization, particularly portfolio optimization, and particularly particularly portfolio optimization via heuristic algorithms.  … Continue reading...

Read more »

R Cookbook with examples

October 27, 2011
By
R Cookbook with examples

An R Cookbook can be found at http://code.ca-net.org/R%20Cookbook. It is a short web document presenting dozens of examples on - Accessing Database with packages RSQLite, RMySQL, RdbiPgSQL and RODBC; - Reading and Writing Data; - Date/Time variable; - Graphics; - … Continue reading →

Read more »

Copy all the files in a directory to a new directory using R

October 27, 2011
By

Someone asked me how to move a directory full of files from one place to another using R.  The easiest way I've found is as follows (where "oldpath" is the existing directory and "newpath" is the new directory):   file.copy(list.files(oldpath),newpath)   Tags:  R

Read more »

Shoe Consumption in the U.S. – GGPlot2 #1

October 26, 2011
By
Shoe Consumption in the U.S. – GGPlot2 #1

  This is the first in a series of blog posts in which I use the R package GGPlot2 to examine real world data. In this post, I construct a line graph of U.S. shoe consumption from 1995 to 2007. A recent survey conducted by Shop Smart magazine found that the average woman in the

Read more »

Netflix Post-mortem – How to detect Bubbles

October 26, 2011
By
Netflix Post-mortem – How to detect Bubbles

Bubbles. I’m no expert in behavioral economics, but bubbles seem to be well understood (after they occur) although they seem hard to detect (at least in the eyes of outsiders and late bubble participants). This post won’t tell you how to avoid bubbles, but might give you some insight. I came across Minsky’s explanation of

Read more »

Mixed-Effects Models in R with Quantum Forest

October 26, 2011
By

For anyone who wants to estimate linear or nonlinear mixed-effects models (aka random-effects models, hierarchical models or multilevel models) using the R language, the Quantum Forest blog has several recent posts that will be of interest. Written by Luis Apiolaza from the School of Forestry at the University of Canterbury in New Zealand, the blog includes a number of...

Read more »

What do your rules look like? editrules 1.8-x answers with the help of igraph

October 26, 2011
By
What do your rules look like? editrules 1.8-x answers with the help of igraph

We (Edwin de Jonge and me) have recently updated our editrules package. The most important new features include (beta) support for categorical data. However, in this post I'm going to show some visualizations we included, made possible by Gabor Csardi's … Continue reading →

Read more »