Time Series Matching with Dynamic Time Warping

January 20, 2012
By
Time Series Matching with Dynamic Time Warping

THIS IS NOT INVESTMENT ADVICE. The information is provided for informational purposes only. In the Time Series Matching post, I used one to one mapping to the compute distance between the query(current pattern) and reference(historical time series). Following chart visualizes this concept. The distance is the sum of vertical lines. An alternative way to map

Read more »

MAT8886 Extremes and sums (of i.i.d. random variables)

January 20, 2012
By
MAT8886 Extremes and sums (of i.i.d. random variables)

Yesterday, we have discussed briefly sums and maximas of i.i.d. random variables using the concept of subexponential distributions. Today, we will introduce the concept of regular variation: a positive function is said to be regularly varying (at i...

Read more »

Object Oriented Programming in R

January 20, 2012
By

As someone who was a Java programmer for many years learning R’s object oriented programming framework has been frustrating to say the least. I like the simplicity of S3 but find it limiting when you wish to write methods that change the underlying data elements. That is, printing, summarizing, and plotting work great because they

Read more »

Hadley Wickham goes behind the scenes on ggplot2

January 20, 2012
By
Hadley Wickham goes behind the scenes on ggplot2

Hadley Wickham, creator of the ggplot2 packages for R (as well as several others) will present a webinar on February 8 going behind the scenes of the popular graphics package. If you've never used ggplot2 before, this will be a great way to learn about the kinds of charts you can create with it; and if you're a regular...

Read more »

R Regression Diagnostics Part 1

January 20, 2012
By
R Regression Diagnostics Part 1

Linear regression can be a fast and powerful tool to model complex phenomena. However, it makes several assumptions about your data, and quickly breaks down when these assumptions, such as the assumption that a linear relationship exists between the predictors and the dependent variable, break down. In this post, I will introduce some diagnostics that you can perform to...

Read more »

Object Oriented Programming in R

January 20, 2012
By

As someone who was a Java programmer for many years learning R’s object oriented programming framework has been frustrating to say the least. I like the simplicity of S3 but find it limiting when you wish to write methods that change the underlyi...

Read more »

Object Oriented Programming in R

January 20, 2012
By

As someone who was a Java programmer for many years learning R’s object oriented programming framework has been frustrating to say the least. I like the simplicity of S3 but find it limiting when you wish to write methods that change the underlyi...

Read more »

Power and Sample Size for Repeated Measures ANOVA with R

January 20, 2012
By
Power and Sample Size for Repeated Measures ANOVA with R

Background One of my colleagues is an academic physical therapist (PT), and he's working on a paper to his colleagues related to power, sample size, and navigating the thicket of trouble that surrounds those two things. We recently got together to walk through some of the issues, and I thought I would share some of the wildlife we observed...

Read more »

Project Euler in R: Problem 24

January 19, 2012
By

I had previously posted solutions in R to Project Euler problem 23 and problem 22.  This is the next problem from Project Euler. The statement of problem 24 is as follows.A permutation is an ordered arrangement of objects....

Read more »

Connect to the Facebook API with R for Windows Users

January 19, 2012
By

Recently there have been some great posts that highlight how easy it is to hook into the Facebook Graph API using R. Crawling Facebook with R started the discussion and Apply R highlighted how easy it was to plot our network. In order to replicate the examples on Windows, most likely you will need to

Read more »

Knitr is Awesome!

January 19, 2012
By

I love TikZ in LaTeX and I use it exclusively when writing figures for my papers. I also use the tikzDevice package to convert all figures I create in R to TikZ code, so the font used in the text and figures is the same (and having your R figures in Ti...

Read more »

Scoping functions in R

January 19, 2012
By

I want to test embedding source code in the blog by using the handy Gist tool provided by GitHub. These two R functions are a good opportunity to test out embedding a Gist on the website. These functions allow for threshold testing within a vector in R...

Read more »

Is your phylogeny informative?

January 19, 2012
By
Is your phylogeny informative?

Yesterday my paper   appeared in early view in Evolution (author’s preprint),1 so I’d like to take this chance to share the back-story and highlight my own view on some of our findings, and the associated package on CRAN.2 I didn’t set out to write this paper.  I set out to write a very different

Read more »

Winning from losing

January 19, 2012
By
Winning from losing

By following twitter’s #rstats hashtag (rss feed), I recently came across a very interesting R-related blog: datanalytics.com. The first post I read from it was about setting up an on-line reading group to go through the excellent “The Elements of … Continue reading →

Read more »

Analyzing Federal Government Bailout Recipients in R

January 19, 2012
By
Analyzing Federal Government Bailout Recipients in R

I was searching for open data recently, and stumbled on Socrata. Socrata has a lot of interesting data sets, and while I was browsing around, I found a data set on federal bailout recipients. Here is the data set. However, data sets on Socrata are not always the most recent versions, so I followed a...

Read more »

An Intro to Ensemble Learning in R

January 19, 2012
By

Introduction This post incorporates parts of yesterday's post about bagging. If you are unfamiliar with bagging, I suggest that you read it before continuing with this article. I would like to give a basic overview of ensemble learning. Ensemble learning involves combining multiple predictions derived by different techniques in order to create a stronger overall prediction....

Read more »

Visualize your Facebook friends network with R

January 19, 2012
By
Visualize your Facebook friends network with R

A few days ago, Romain François explained how to interface with the Facebook Graph API explorer with R. This was a low-level interface, giving the R programmer the ability to the raw data that Facebook can provide about your connections. Now, just four days later, the first application in R (that I know of) based on the Facebook Graph...

Read more »

R: Subsetting a list based on a condition

January 19, 2012
By
R: Subsetting a list based on a condition

Quite a handy couple of lines of code to subset a list in R to just those elements which meet a certain condition. Here’s an example to return only those elements of a list which are a certain class. Thanks to this StackOverflow answer.

Read more »

Analyzing Federal Bailout Recipients in R

January 19, 2012
By
Analyzing Federal Bailout Recipients in R

I was searching for open data recently, and stumbled on Socrata. Socrata has a lot of interesting data sets, and while I was browsing around, I found a data set on federal bailout recipients. Here is the data set. However, data sets on Socrata are not always the most recent versions, so I followed a link to...

Read more »

R in the cloud

January 19, 2012
By

Psychometrics, Qu’est-ce que c’est? Say psychometrics to people and they think IQ tests. Fair enough. I think eRm: 1 2 3 4 5 6 7 # Rasch model with beta.1 restricted to 0 data(raschdat1) res <- RM(raschdat1, sum0 = FALSE) print(res) summary(res) res$W The joy of fitting your first Rasch model in R is unparallelled. Go on try, it. Hmmm, a list of numbers. No idea what they mean? ok. so you take an IQ...

Read more »

Rooks in the cloud

January 19, 2012
By

Ever since R was born (evoked?) geeks have been trying to get it to talk HTML. A list of web interfaces for R is updated on CRAN here. Aims are various. Some seek to replace R with a traditional GUI. Others are more ambitious and open up a glimpse of an architecture that provides live analysis of ever...

Read more »

Intro to Ensemble Learning in R

January 19, 2012
By

Introduction This post incorporates parts of yesterday's post about bagging. If you are unfamiliar with bagging, I suggest that you read it before continuing with this article. I would like to give a basic overview of ensemble learning. Ensemble learning involves combining multiple predictions derived by different techniques in order to create a stronger overall prediction. For example,...

Read more »

GIBBS us a break

January 19, 2012
By

So you want to run R in the cloud so you can set your Gibbs sampling off, forget about it, and not be paranoid about power cuts and reboots. Andrew Gelman hosted a good debate on the pros and cons of R in the cloud on his blog. The consensus seems to be RStudio and EC2. P.S. If...

Read more »

How to search the R-sig-finance archives

January 19, 2012
By
How to search the R-sig-finance archives

A not unusual part of a response on the R-sig-finance mailing list is: “Search the list archives.” In principle that makes sense.  In practice it might not be clear what to do.  Now it should be. The list The R-sig-finance mailing list deals with the intersection of questions about the R language and finance.  It … Continue reading...

Read more »

When can we expect the last damn microarray paper?

January 18, 2012
By
When can we expect the last damn microarray paper?

With bonus R codeIt came as a shock to learn from PubMed that almost 900 papers were published with the word "microarray" in their titles last year alone, just 12 shy of the 2010 count. More alarming, many of these papers were not of the innocuous "Microarray study of gene expression in dog scrotal tissue" variety, but dry...

Read more »

Internet surveys

January 18, 2012
By

I received the following email today: I am preparing a thesis … I need to conduct the widest possible poll, and it occurred to me that perhaps you could guide me toward an internet-based way in which this can be done easily. I have a ten-question questionnaire prepared, that I wish to have an random sample of the population...

Read more »

non-stationary AR(10)

January 18, 2012
By
non-stationary AR(10)

In the revision of Bayesian Core on which Jean-Michel Marin and I worked together most of last week, having missed our CIRM break last summer (!), we have now included an illustration of what happens to an AR(p) time series when the customary stationarity+causality condition on the roots of the associated polynomial is not satisfied. 

Read more »

Look Over My Shoulder with Hangout?

January 18, 2012
By
Look Over My Shoulder with Hangout?

Inspired by the post More Office Hours in 2012 and the survey results, I thought I would offer office hours while blogging/playing in R.  If anyone is interested, please send me an email at kent.russell at timelyportfolio.com, or just look for me ...

Read more »

RInside updated

January 18, 2012
By

The RInside package provides C++ classes that make it easier to embed R in C++ code on many platforms. According to a post from package co-maintainer Dirk Eddelbuettel, the package has just been updated to version 0.2.6 with improved support on Windows, and compatibility with R's standard random number generator. You can download the latest version from CRAN or...

Read more »