Monthly Archives: April 2014

Adding Annotation to R Objects

April 1, 2014
By
Adding Annotation to R Objects

When you take a photograph, you can include the date in the image, so you remember when you created it.  (In fact, under EXIF format, it’s stored in the image file anyway, even if it doesn’t appear in the picture.)  Wouldn’t it be nice to make annotations in the objects you create under R? For

Read more »

Stata Fully Mapped into R

April 1, 2014
By
Stata Fully Mapped into R

Hello all of you Stata loving statistical analysts out there!  I have great news.  I am finally nearly done with the package I have been working on which provides the mechanism for Stata users to seamlessly move from Stata to R though use of ...

Read more »

Melbourne’s Weather and Cross Correlations

April 1, 2014
By
Melbourne’s Weather and Cross Correlations

During a lunchtime discussion among recent GCaP class attendees, the topic of weather came up and I casually mentioned that the weather in Melbourne, Australia, can be very changeable because the continent is so old that there is very little geographical relief to moderate the prevailing winds coming from the west. In general, Melbourne...

Read more »

Mapping the March 2014 California Earthquake with ggmap

April 1, 2014
By
Mapping the March 2014 California Earthquake with ggmap

I had no intention to blog this, but @jayjacobs convinced me otherwise. I was curious about the recent (end of March, 2014) California earthquake “storm” and did a quick plot for “fun” and personal use using ggmap/ggplot. I used data from the Southern California Earthquake Center (that I cleaned up a bit and that you

Read more »

You don’t need to understand pointers to program using R

April 1, 2014
By
You don’t need to understand pointers to program using R

R is a statistical analysis package based on writing short scripts or programs (versus being based on GUIs like spreadsheets or directed workflow editors). I say “writing short scripts” because R’s programming language (itself called S) is a bit of an oddity that you really wouldn’t be using except it gives you access to superior Related posts:

Read more »

A look at R vectorization through the Collatz Conjecture

April 1, 2014
By
A look at R vectorization through the Collatz Conjecture

by Seth Mottaghinejad, Analytic Consultant for Revolution Analytics You may have heard before that R is a vectorized language, but what do we mean by that? One way to read that is to say that many functions in R can operate efficiently on vectors (in addition to singletons). Here are some examples: > log(1) # input and output are...

Read more »

Do Not Play With Mr. Penney

April 1, 2014
By
Do Not Play With Mr. Penney

Facts do not speak (Henry Poincare) Mr. Penney is my best friend. He is maths teacher and loves playing. Yesterday we were in his office at the university when he suggested me a game: When you toss a coin three times, you can obtain eight different sequences of tails and heads: TTT, TTH, THT, HTT, THH,

Read more »

IV Estimates via GMM with Clustering in R

April 1, 2014
By
IV Estimates via GMM with Clustering in R

In econometrics, generalized method of moments (GMM) is one estimation methodology that can be used to calculate instrumental variable (IV) estimates. Performing this calculation in R, for a linear IV model, is trivial. One simply uses the gmm() function in the excellent gmm package like an lm() or ivreg() function. The gmm() function will estimate

Read more »

From Random Walks to Personalized PageRank

April 1, 2014
By
From Random Walks to Personalized PageRank

In graph theory (and its applications) it is often required to model how information spreads within a given graph. This is interesting for many applications, such as attack prediction, sybil detection, and recommender systems - just to name a...

Read more »

Daylight Saving Effect on S&P500 and FTSE100

April 1, 2014
By
Daylight Saving Effect on S&P500 and FTSE100

Does the transition to and from Daylight Saving Time (DST) have a (significant) effect on the stock market? In a recent blog post on The UK Stock Market Almanac, the author found that the average return of the FTSE100 index for the days following the start of British Summer Time (BST) was -0.07% during the

Read more »