Blog Archives

An xts R Inferno-ism

February 7, 2014
By

Another of the all ye entering here. Issue When subscripting an xts object, columns that don’t exist in the object are silently ignored. Example First, create an xts object: xtx <- xts(cbind(a=1:4, b=11:14, c=21:24), order=Sys.Date() + 1:4) which looks like: > xtx a b c 2014-02-07 1 11 21 2014-02-08 2 12 22 2014-02-09 3 The post

Read more »

From spreadsheet thinking to R thinking

January 7, 2014
By
From spreadsheet thinking to R thinking

Towards the basic R mindset. Previously The post “A first step towards R from spreadsheets” provides an introduction to switching from spreadsheets to R.  It also includes a list of additional posts (like this one) on the transition. Add two columns Figure 1 shows some numbers in two columns and the start of adding those The post From...

Read more »

Blog recap of 2013

December 31, 2013
By

Posts by page views Interview with a forced convert to R from Matlab A first step towards R from spreadsheets Plot ranges of data in R A statistical review of ‘Thinking, Fast and Slow’ by Daniel Kahneman The 3 dots construct in R Translating between R and SQL: the basics An R debugging example R The post Blog...

Read more »

A statistical review of ‘Thinking, Fast and Slow’ by Daniel Kahneman

November 11, 2013
By
A statistical review of ‘Thinking, Fast and Slow’ by Daniel Kahneman

I failed to find Kahneman’s book in the economics section of the bookshop, so I had to ask where it was.  ”Oh, that’s in the psychology section.”  It should have also been in the statistics section. He states that his collaboration with Amos Tversky started with the question: Are humans good intuitive statisticians? The wrong The post A...

Read more »

Translating between R and SQL: the basics

November 8, 2013
By

An introductory comparison of using the two languages. Background R was made especially for data analysis and graphics.  SQL was made especially for databases.  They are allies. The data structure in R that most closely matches a SQL table is a data frame.  The terms rows and columns are used in both. A mashup There The post Translating...

Read more »

The joy of data analysis

October 24, 2013
By
The joy of data analysis

Music and snow. Poke my eyes out Perhaps your immediate response is: “I’d rather poke my eyes out with a burning stick than do data analysis.” There’s a completely different reaction from a lot of people who have experienced data analysis. Music It’s not entirely clear why humans like music so much. Part of it The post The...

Read more »

A first step towards R from spreadsheets

October 16, 2013
By
A first step towards R from spreadsheets

Move your data analysis to a computing environment specifically designed for it. Why R and not spreadsheets? Here are three reasons: complexity graphics money Spreadsheets are easily overwhelmed.  Very complex things can be done in spreadsheets — it is just that complex spreadsheets are inefficient and dangerous. Graphics should be considered vital when doing anything with The post A...

Read more »

An R debugging example

May 21, 2013
By

The steps taken to fix an R problem. Task To prepare for the Portfolio Probe blog post called “Implied alpha and minimum variance”, I tried to update a matrix of daily stock prices using a function I had written for the purpose. Error When I tried to do what I wanted, I got: > univclose130518 The post An...

Read more »

Living it up with computational errors

May 13, 2013
By

How to have a better chance of a good outcome. Making mistakes There’s been a lot of talk recently about data analysis problems with spreadsheets.  If you’ve not stuck your head out of your cave lately, then you can catch some of the discussion by doing an internet search for: Reinhart Rogoff There are several The post Living...

Read more »

Interview with a forced convert from Matlab to R

April 17, 2013
By
Interview with a forced convert from Matlab to R

Here is an interview with Ron Hochreiter, Assistant Professor at WU Vienna University Economics and Business. In 25 words or less tell us what you do (using German words is cheating). I consider myself as a data scientist (teaching and research) with roots in Mathematical Programming, i.e. Optimization under Uncertainty (Stochastic Programming). You were an The post Interview...

Read more »