Monthly Archives: August 2012

Heatmap tables with ggplot2, sort-of

August 27, 2012
By
Heatmap tables with ggplot2, sort-of

I wrote before about heatmap tables as a better way of producing frequency or other tables, with a solution which works nicely in latex. It is possible to do them much more easily in ggplot2, like this library(Hmisc) library(ggplot2) library(reshape) data(HairEyeColor) P=t(HairEyeColor) Pm=melt(P) ggfluctuation(Pm,type="heatmap")+geom_text(aes(label=Pm$value),colour="white")+ opts(axis.text.x=theme_text(size = 15),axis.text.y=theme_text(size = 15)) Note that ggfluctuation will also take

Read more »

The Art of R Programming – Matloff (2011)

August 27, 2012
By
The Art of R Programming – Matloff (2011)

It’s difficult to write a book on an entire programming language and keep it manageable and concise, but The Art of R Programming does it as well as any text I’ve seen. Matloff covers, in detail and among other things, R data structures, programming idioms, performance enhancements, interfaces with other languages, debugging and graphing. Title:The The post The...

Read more »

garch and long tails

August 27, 2012
By
garch and long tails

How much does garch shorten long tails? Previously Pertinent blog posts include: “A practical introduction to garch modeling” “The distribution of financial returns made simple” “Predictability of kurtosis and skewness in S&P constituents” Induced tails Part of the reason that the distributions of returns have long tails is because of volatility clustering.  It’s not really … Continue reading...

Read more »

Football (Eredivisie) goals

August 27, 2012
By
Football (Eredivisie) goals

The football season has started in Netherlands, so I went and had a look at last year's scores. I did not find downloadable data, at http://www.eredivisiestats.nl/wedstrijden.php I could copy last season's data and paste into a spreadsheet. T...

Read more »

Custom CSS for HTML generated using RStudio

August 26, 2012
By
Custom CSS for HTML generated using RStudio

People have been telling me for a while that the latest version of RStudio, the IDE for R, is a great way to generate reports. I finally got around to trying it out and for once, the hype is justified. Start with this excellent tutorial from Jeremy Anglim. Briefly: the process is not so different

Read more »

Structural Equation Modeling: Separating the General from the Specific (Part II)

August 26, 2012
By
Structural Equation Modeling: Separating the General from the Specific (Part II)

As promised in Halo Effects and Multicollinearity (my last post), I will show how to run a confirmatory factor analysis in R to test our bifactor model.  In addition, I will include a dependent variable and fit a structural equation mode...

Read more »

A Chlorpleth Map of Free and Reduced Price Lunch in R

August 26, 2012
By
A Chlorpleth Map of Free and Reduced Price Lunch in R

Charles Blow has an excellent op-ed in the New York Times about public education this week. The most important point he makes is that the defunding of public education is coming at precisely the time when American school children are most vulnerable:No...

Read more »

Walmart Invasion

August 26, 2012
By
Walmart Invasion

As an invasion biologist, the process of spatial spread is at the heart of what I do. When I came across this dataset of Walmart store openings since 1962 I couldn’t help but see it as an invasion front which looks a lot like a biological invasion or (albeit slow) epidemic. The video shows monthly

Read more »

Kaggle Prospect – Harvard Business Review

August 25, 2012
By

This post is meant for submitting visual analysis for the Harvard Business Review Contest on KaggleI used the subject lines for all the articles and all the years and mapped the articles into one of the following 18 categories  Business Ethics  Business Management  Crisis  Emerging Markets  Financial Performance  Health Care  Information Technology  Labor  Leadership  Management Systems  Marketing Strategy  Regulation  Social Media  Stock Market  Strategic Planning  Supply Chain  United States & World  Women & Management Changes in...

Read more »

Economic geography of the eastern USA circa 1999, median incomes…

August 25, 2012
By
Economic geography of the eastern USA
circa 1999, median incomes…

Economic geography of the eastern USA circa 1999, median incomes by zip code Code and data source to follow in a longer post.

Read more »