Compiling rgdal on Mac OS 10.5

August 31, 2012
By

Why do I always forget how to do this? R CMD INSTALL rgdal --configure-args="--with-gdal-config=/Library/Frameworks/GDAL.framework/Versions/Current/unix/bin/gdal-config --with-proj-include=/Library/Frameworks/PROJ.framework/Versions/4/Headers/ --with-proj-lib=/Library/Frameworks/PROJ.framework/Versions/Current/unix/lib/" You will need to adjust the paths based on your version of the GDAL and Proj4 frameworks. read more

Read more »

Russell 2000 Softail Fat Boy

August 31, 2012
By
Russell 2000 Softail Fat Boy

If the Russell 2000 were a motorcycle, maybe it should be a Harley-Davidson Softail Fat Boy.  I have explored the exception case of the Russell 2000 in quite a few posts More Exploration of Crazy RUT Where are the Fat Tails? Crazy RUT but I st...

Read more »

Border bias and weighted kernels

August 31, 2012
By
Border bias and weighted kernels

With Ewen (aka @3wen), not only we have been playing on Twitter this month, we have also been working on kernel estimation for densities of spatial processes. Actually, it is only a part of what he was working on, but that part on kernel estimation has been the opportunity to write a short paper, that can now be downloaded on hal. The problem...

Read more »

Another bunch of R (and JAGS) scripts

August 31, 2012
By
Another bunch of R (and JAGS) scripts

Probably sooner than I expected, I have managed to also upload the codes for the examples in Chapter 5 of the book, which deals with doing Bayesian health economic evaluations. Basically, there are 3 examples, which sort of represent the main clas...

Read more »

PCA or Polluting your Clever Analysis

August 31, 2012
By
PCA or Polluting your Clever Analysis

When I learned about principal component analysis (PCA), I thought it would be really useful in big data analysis, but that's not true if you want to do prediction. I tried PCA in my first competition at kaggle, but it delivered bad results. This post illustrates how PCA can pollute good predictors.When I started examining this problem,...

Read more »

Cluster Multiple Images with ImageJ and R

August 31, 2012
By

30.08.2012 With Bio7 1.6 it is possible to send multiple images from ImageJ to R without the need to open them in the Graphical User Interface of ImageJ for speed improvements. With a simple script written in Java, Groovy or BeanShell a new Bio7 API command can be used (see below) to transfer images and

Read more »

Getting ecology and evolution journal titles from R

August 31, 2012
By

So I want to mine some #altmetrics data for some research I'm thinking about doing. The steps would be: Get journal titles for ecology and evolution journals. Get DOI's for all papers in all the above journal titles. Get altmetrics data on each DO...

Read more »

Follow-Up: Making a Word Cloud for a Search Result from GScholar_Scraper_3.1

August 30, 2012
By
Follow-Up: Making a Word Cloud for a Search Result from GScholar_Scraper_3.1

Here's a short follow-up on how to produce a word cloud for a search result from GScholarScraper_3.1:# File-Name: GScholarScraper_3.1.R# Date: 2012-08-22# Author: Kay Cichini# Email: [email protected]# Purpose: Scrape Google Scholar search result# ...

Read more »

My Course Wish List at CMSE next year

August 30, 2012
By
My Course Wish List at CMSE next year

Here is the list  of courses I wish to teach next year at Chiang Mai School of Economics, not so sure about the demand there! Undergraduate (B.Econ.) ECON 304: Economics Statistics (with R) ECON 408: Research Design in Economics ECON 417: Managerial Economics ECON 419: Economic Theory and Entrepreneurship ECON 443: Industrial Economics ECON 4xx: Introduction to

Read more »

Stan is fast

August 30, 2012
By

10,000 iterations for 4 chains on the (precompiled) efficiently-parameterized 8-schools model: > date () "Thu Aug 30 22:12:53 2012" > fit3 date () "Thu Aug 30 22:12:55 2012" > print (fit3) Inference for Stan model: anon_model. 4 chains: each with iter=10000; warmup=5000; thin=1; 10000 iterations saved. mean se_mean sd 2.5% 25% 50% 75% The post Stan...

Read more »

Spearman’s Rho

August 30, 2012
By

Spearman’s Rho Rank Correlation There are generally three types of correlation that a researcher may encounter: Pearson’s r, Kendall’s Tau, and Spearman’s Rho.  They each have their own uses and applications depending on the da...

Read more »

Three ways of visualizing the growth of Walmart

August 30, 2012
By
Three ways of visualizing the growth of Walmart

It's a wonderful thing when people make interesting data sets available to the public. When Thomas Jones wrote a paper in Econometrics about the growth of US retail giant Walmart, he made the data he collected about every Walmart store opening in history (location and date) available to the public. Since then, several people have used different techniques to...

Read more »

A Stan is Born

August 30, 2012
By

Stan 1.0.0 and RStan 1.0.0 It’s official. The Stan Development Team is happy to announce the first stable versions of Stan and RStan. What is (R)Stan? Stan is an open-source package for obtaining Bayesian inference using the No-U-Turn sampler, a variant of Hamiltonian Monte Carlo. It’s sort of like BUGS, but with a different language The post A...

Read more »

Making matrices with zeros and ones

August 30, 2012
By

So I was trying to figure out a fast way to make matrices with randomly allocated 0 or 1 in each cell of the matrix. I reached out on Twitter, and got many responses (thanks tweeps!). Here is the solution I came up with. See if you can tell why it...

Read more »

Another Great Google Summer of Code 2012 R Project

August 30, 2012
By
Another Great Google Summer of Code 2012 R Project

Tradeblotter announced the very nice features that will be added to the PerformanceAnalytics package as a result of the Google Summer of Code (GSOC) 2012 project: “…Matthieu commenced to produce dozens of new functions, extend several more existin...

Read more »

Visually weighted regression in R (à la Solomon Hsiang)

August 30, 2012
By
Visually weighted regression in R (à la Solomon Hsiang)

, and also the discussions on the Statistical Modeling, Causal

Read more »

F1 2012 Mid-Season Review

August 30, 2012
By
F1 2012 Mid-Season Review

Rather belatedly, I got around to posting a series of posts summarising the Formula One season to date: F1 2012 Mid-Season Review – Grid/Classification Analysis: for example, how do the drivers’ grid and final classifications compare? F1 2012 Mid-Season Review – Pit Stops: for example, how does pit stop performance across the teams compare? F1

Read more »

Late to the ggplot2 party

August 29, 2012
By

I have resisted learning the popular R graphics package, ggplot2. I dismissed ggplot2 as primarily useful for exploratory graphics and rationalized my avoidance of ggplot2 by assuming that it would require just as many (or more) lines of code as the R base package to whip the default plots into publication-quality figures. The few times

Read more »

Virginia: Comparison of Registered Voter Counts to Census Voting Age Population

August 29, 2012
By
Virginia: Comparison of Registered Voter Counts to Census Voting Age Population

By Earl F Glynn | Franklin Center A comparison of US Census voting age population data in Virginia to voter registration data shows only one locality, Surry County, with about 100% of the voting age population registered to vote. Six other localities have about 95% of their voting age population registered:  Craig County, Isle of

Read more »

Processing Data from a Statistica Worksheet Using R

August 29, 2012
By
Processing Data from a Statistica Worksheet Using R

Context: I work with data from non-profit organizations, and so a big concern in many of my analyses is if and how much people are donating from one year to the next.  One of the  things I normally like to do … Continue reading →

Read more »

R does CSI: Using R to nail break-in suspects

August 29, 2012
By
R does CSI: Using R to nail break-in suspects

You've probably heard (or seen in TV shows) how the unique pattern of rifling in a gunbarrel generates forensic evidence: microscopic scoring on the bullets left at the scene of the crime can be linked to the shooter by matching the marks to the firearm. What you might not know is that the same technique can be applied to...

Read more »

back from down under

August 29, 2012
By
back from down under

After a sunny weekend to unpack and unwind, I am now back to my normal schedule, on my way to Paris-Dauphine for an R (second-chance) exam. Except for confusing my turn signal for my wiper, thanks to two weeks of intensive driving in four Australian states!, things are thus back to “normal”, meaning that I

Read more »

Basic documentation for soilDB package (R) now available

August 29, 2012
By

A proper introduction to the soilDB package is now available here. Installation and basic usage are covered. More detailed, task-specific documentation on aqp and soilDB will be available soon. read more

Read more »

…Now With More Bacon (2008)!

August 29, 2012
By
…Now With More Bacon (2008)!

I’m sure that Carl Bacon sighs deeply when he reads such headlines, but it is clearly appropriate in this case. Perhaps you remember that I proposed a Google Summer of Code project for 2012 around a considerable code contribution to PerformanceAnalytics from Diethelm Wuertz at ETHZ. That code was focused on adding a large number

Read more »

Plotting model fits

August 29, 2012
By
Plotting model fits

We all know that it is important to plot your data and explore the data visually to make sure you understand it. The same is true for your model fits. First, you want to make sure that the model is fitting...

Read more »

R Script to Build Animation of Arctic Sea Ice Extent – Update 12/20/13

August 29, 2012
By
R Script to Build Animation of Arctic Sea Ice Extent – Update 12/20/13

In my previous post I showed an animation of Arctic Sea Ice Extent from the 1980’s through August, 2012 (link).  In this post, I show how to build this Arctic Sea ice Extent  animated chart. Source Data The Arctic Ice … Continue reading →

Read more »

Integrating R into a SAS shop

August 29, 2012
By

I work in an environment dominated by SAS, and I am looking to integrate R into our environment. Why would I want to do such a thing? First, I do not want to get rid of SAS. That would not only take away most of our investment in SAS training and hiring good quality SAS programmers, but...

Read more »

Generate simple HTML slides using deck.js and markdown

August 29, 2012
By

RStudio and knitr are an excellent conbination for generating dynamic reports. But in this blog, I will show you how to generate HTML-style presentaion using R only. OK, I confess that we still need something else: deck.js and markdown and R.utils. ...

Read more »

Facts About R Packages (2)

August 29, 2012
By

R Packages All Well maintained? There are so many R packages, can they all be trusted? or are they well maintained? To answer this question, we just need to take a look of their archive histories. If a package has many versions, we can take that as th...

Read more »