2765 search results for "gis"

Faceting as a preferable alternative to 3-D

October 18, 2012
By
Faceting as a preferable alternative to 3-D

Sometimes, people want to plot things in three dimensions. Others have spoken more eloquently than I could on the potential problems with plotting multiple two-dimensional relationships in a two-dimensional medium with an artificial three-dimensional ...

Read more »

The distribution of ideology in the U.S. House (with plyr)

October 17, 2012
By
The distribution of ideology in the U.S. House (with plyr)

This Gist has a couple of things going on, I’ll just list them: It downloads the entire history of U.S. House DW-NOMINATE scores from voteview.com It evaluates aggregate statistics, with members grouped by party and congress, with easy weighted ...

Read more »

Japanese Government Bond (JGB) Data Since 1974

October 16, 2012
By
Japanese Government Bond (JGB) Data Since 1974

The Ministry of Finance Japan very generously provides data on JGBs back to 1974.  Here is a quick example how to pull it into R and then graph it. From TimelyPortfolio R code in GIST (do raw for copy/paste):

Read more »

Life on the Big International Frontier

October 16, 2012
By
Life on the Big International Frontier

Although I have used the Kenneth French data library extensively in various posts, I have not yet used the international data sets paired with the wonderful paper. Eugene F. Fama and Kenneth R. French (2012) "Size, Value, and Momentum in International...

Read more »

Flag space: a scatter plot of raster images

October 16, 2012
By
Flag space: a scatter plot of raster images

(Click for a bigger version) I’m not sure when plotting raster images in an R scatter plot will end up being useful. It’s not something I expect to need to do in my day-to-day research, and I think in general probably adds more complexity ...

Read more »

Not Much of a Grand Finale. What if We Go To 0?

October 15, 2012
By
Not Much of a Grand Finale. What if We Go To 0?

When I ask the question “What if the US 10 year goes to 0?", most do not know the effect, the catalyst, or if 0 has ever happened before.  The math is fairly simple to do in Excel or with an old-school calculator, but let’s use RQuantLib to do...

Read more »

Gale-Shapley Deferred Acceptance in R

October 15, 2012
By
Gale-Shapley Deferred Acceptance in R

In honor of today’s announcement of the Nobel Prize for Roth and Shapley, I found an illustration of the deferred acceptance algorithm from 1962 in R. Credit for the code goes to the blogger at Letters from London, and I’ve included a Gi...

Read more »

Banking to n degrees

October 15, 2012
By
Banking to n degrees

As often happens, I have learned of a technique just as it is being called into question. In this case, the technique is changing the aspect ratio of a line plot such that the typical slope of each segment is 45° (see), a rule of thumb which has bee...

Read more »

Fixing non positive definite correlation matrices using R

Problem When a correlation or covariance matrix is not positive definite (i.e., in instances when some or all eigenvalues are negative), a cholesky decomposition cannot be performed. Sometimes, these eigenvalues are very small negative numbers and occur due to rounding or due to noise in the data. In simulation studies a known/given correlation has to be imposed on an input...

Read more »

Dark matter benchmarks: All over the map

October 14, 2012
By
Dark matter benchmarks: All over the map

The three benchmark algorithms for predicting the location of dark matter halos are, for the most part, all over the map. Most of the test skies look something like this: There are, however, some skies with rather strong halo signals that get a decent amount of agreement: The Lenstool MLE algorithm is the current state

Read more »