Monthly Archives: October 2012

NSCB Sexy Statistics (Unemployment)

October 25, 2012
By
NSCB Sexy Statistics (Unemployment)

Recently, my friend posted on her Facebook account about the article published by the National Statistical Coordination Board (NSCB) about poverty and unemployment in the country.  Looking at the report I saw a lot of tables, so I thought why not ...

Read more »

How fat are your tails?

October 25, 2012
By
How fat are your tails?

Lately I’ve been thinking about how to measure the fatness of the tails of a distribution. After some searching, I came across the Pareto Tail Index method. This seems to be used mostly in economics. It works by finding the decay rate of the tail. It’s complicated, both in formula and in it’s R implementation

Read more »

Congressional ideology by state

October 25, 2012
By
Congressional ideology by state

In a recent post, I illustrated how to add a background geom to your ggplot. While that code worked, and the plot looked fine, it was pointed out to me that I was missing an important aspect of plot layering with ggplot2. Namely, it is not, as I previ...

Read more »

R function: generate a panel data.table or data.frame to fill with data

October 25, 2012
By

I have started to work with R and STATA together. I like running regressions in STATA, but I do graphs and setting up the dataset in R. R clearly has a strong comparative advantage here compared to STATA. I was writing a function that will give me a (balanced) panel-structure in R. It then simply

Read more »

Rcpp modules more flexible

October 25, 2012
By

Rcpp modules just got more flexible (as of revision 3838 of Rcpp, to become 0.9.16 in the future).modules have allowed exposing C++ classes for some time now, but developpers had to declare custom wrap and as specializations if they wanted their classes to be used as return type or argument type of a C++ function or method....

Read more »

Nonnegative Matrix Factorization and Recommendor Systems

October 24, 2012
By
Nonnegative Matrix Factorization and Recommendor Systems

Albert Au Yeung provides a very nice tutorial on non-negative matrix factorization and an implementation in python. This is based very loosely on his approach. Suppose we have the following matrix of users and ratings on movies:If we use the information above to form a matrix R it can be decomposed into two matrices...

Read more »

Quick notes from Strata NYC 2012

October 24, 2012
By

The O'Reilly Strata conferences are always great fun to attend, and this latest installment in New York City is no exception. This one is super-busy though; the conference has been sold out for weeks -- and not just marketing-sold-out, it's fire-department-sold out. It's non-stop conversations and presentations, and it's tough to move through the hallways in between. Nonetheless, I...

Read more »

R for Ecologists: Permutation Analysis – t-tests

October 24, 2012
By
R for Ecologists: Permutation Analysis – t-tests

You’ve carefully designed your experiment, you’ve meticulously collected your data, and you have a hypothesis to test. Unfortunately, your data is typical of ecology data: small sample sizes, messy, and non-normal. Your ideal test, the t-test, won’t work because of the … Continue reading →

Read more »

Plotting the debate "Winner"

October 24, 2012
By
Plotting the debate "Winner"

As a Political Scientist, it could not be more gauche to talk about the Presidential debate in terms of a winner and a loser, but the occasion provides the opportunity to show how to do (at least) three really useful things: Directly load price and v...

Read more »

Displaying Your Data in Google Earth Using R2G2

October 24, 2012
By
Displaying Your Data in Google Earth Using R2G2

Have you ever wanted to easily visualize your ecology data in Google Earth? R2G2 is a new package for R, available via R CRAN and formally described in this Molecular Ecology Resources article, which provides a user-friendly bridge between R and the Google Earth interface. Here, we will provide a brief introduction to...

Read more »