Near-instant high quality graphs in R

September 5, 2012
By
Near-instant high quality graphs in R

One of the main attractions of R (for me) is the ability to produce high quality graphics that look just the way you want them to. The basic plot functions are generally excellent for exploratory work and for getting to know your data. Most packages have additional functions for appropriate exploratory work or for summarizing

Read more »

BMS 0.3.1 Released

September 5, 2012
By

Version 0.3.1 of the BMS package for Bayesian Model Averaging has been released. This is a maintenance release for compliance with recent CRAN guidelines. The BMS package therefore is again available on CRAN in addition to bms.zeugner.eu. Changes with...

Read more »

Animated Images of Arctic Sea Ice Extent Decline

September 5, 2012
By
Animated Images of Arctic Sea Ice Extent Decline

This post shows how to download and animate a series of Arctic Sea Ice Extent images using R and the animation package. In my previous post, I showed how to download the daily arctic sea ice extent  data and generate … Continue reading →

Read more »

Thalesians, and other events

September 5, 2012
By
Thalesians, and other events

Featured Thalesians, London 2012 September 12. Chia Tan on “Practical Financial Modeling”. Abstract: Financial modelling is not a competition in the mastery of complexity. Rather, the aim is to come up with the simplest models adequate to capture salient market features of traded products. There exists a wide gulf between material covered by traditional books … Continue reading...

Read more »

Kendall’s Tau

September 5, 2012
By

Kendall’s Tau This is an example of Kendall’s Tau rank correlation.  This is similar to Spearman’s Rho in that it is a non-parametric measure of correlation on ranks.  It is an appropriate measure for ordinal data and is fairly straight forward when there are no ties in the ranks. When ties do exist then variations

Read more »

Amazing fMRI plots for everybody!

September 5, 2012
By
Amazing fMRI plots for everybody!

Dear valued customer, it is a well-known scientific truth that research results which are accompanied by a fancy, colorful fMRI scan, are perceived as more believable and more persuasive than simple bar graphs or text results (McCabe & Castel, 2007; Weisberg, Keil, Goodstein, Rawson, & Gray, 2008). Readers even agree more with fictitious and unsubstantiated

Read more »

Interactive web graphs with R – Overview and googleVis tutorial

September 5, 2012
By
Interactive web graphs with R – Overview and googleVis tutorial

Today I feel very lucky, as I have been invited to the Royal Statistical Society conference to give a tutorial on interactive web graphs with R and googleVis. I prepared my slides with RStudio, knitr, pandoc and slidy, similar to my Cambridge R talk. ...

Read more »

Merging Current Stock Quotes with Historical Prices

September 4, 2012
By
Merging Current Stock Quotes with Historical Prices

I got a question last week about going from the backtest to the trading. For example, if our system is based on today’s close, we can approximate the close value by the price at say 3:30pm, determine the signal and still have time enter the trade. It is not perfect, but one of possible solutions.

Read more »

Testing highlight.js with r code

I searched for a javascript plugin to highlighter code, but obviously not any code. I needed to higlight R. Finally I founded highlight.js. Highlights.js is pretty cool for many reasons. I like Highlights.js because: Support R lenguage....

Read more »

How to create random binary matrices in R

September 4, 2012
By

It all started off as a simple question from Scott Chamberlain on Twitter: Make m x n matrix with randomly assigned 0/1 -> apply(m, c(1,2), function(x) sample(c(0,1),1)) -- Better/faster solution? #rstats — Scott Chamberlain (@recology_) August 28, 2012 The goal was to create a matrix with randomly selected binary elements, and a predetermined number of rows and columns, that...

Read more »

BMR: Bayesian Macroeconometrics in R

September 4, 2012
By
BMR: Bayesian Macroeconometrics in R

The recently released BMR package, short for Bayesian Macroeconometrics with R, provides a comprehensive set of powerful routines that estimate Bayesian Vector Autoregression (VAR) and Dynamic Stochastic General Equilibrium (DSGE) models in R. The procedure of estimating both Bayesian VAR and DSGE models can represent a great computational burden. However, BMR removes a lot of

Read more »

omg lol brb txt l8r – Text Message Analysis, 2011-2012

September 3, 2012
By
omg lol brb txt l8r – Text Message Analysis, 2011-2012

IntroductionI will confess, I don't really like texting. I communicate through text messages, because it does afford many conveniences, and occupies a sort of middle ground between actual conversation and email, but that doesn't mean that I like it. E...

Read more »

RStudio is RStupendous

September 3, 2012
By

I am a sucker for beautiful applications (like the ggplot2 web tool mentioned here). The latest R-related application to catch my eye is RStudio. RStudio™ is a free and open source integrated development environment (IDE) for R. You can run it on your desktop (Windows, Mac, or Linux) or even over the web using RStudio

Read more »

Research support specialist position at Ryerson University

September 3, 2012
By

The Ted Rogers School of Management at Ryerson University in Toronto has an opening for a research support specialist to assist with monitoring current research projects and to provide assistance with econometric/statistical analysis and training.Requi...

Read more »

Installing RStan in Ubuntu

September 3, 2012
By

Based on RStan Getting Started R packages Assuming you have the most up to date version of R, the following packages need to be installed. This assumes you have the c2d4u PPA available. See here for more information. sudo apt-get install r-cran-...

Read more »

Project Euler — problem 19

September 3, 2012
By

I’ve been working overtime last weekend. Although I suffered little from the Monday syndrome, I still need a break. So, I’m back to the Project Euler after days of Olympic data digging. Today, I’m gonna to solve the 19th problem. You are given the following … Continue reading →

Read more »

A look at Bayesian statistics

September 3, 2012
By
A look at Bayesian statistics

An introduction to Bayesian analysis and why you might care. Fight club The subject of statistics is about how to learn.  Given that it is about the unknown, it shouldn’t be surprising that there are deep differences of opinion on how to go about doing it (in spite of the stereotype that statisticians are accountants … Continue reading...

Read more »

Fixing non positive definite correlation matrices using R

September 3, 2012
By

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 occ...

Read more »

Descriptive statistics of some Agile feature characteristics

September 2, 2012
By
Descriptive statistics of some Agile feature characteristics

The purpose of software engineering research is to figure out how software development works so that the software industry can improve its quality/timeliness (i.e., lower costs and improved customer satisfaction). Research is hampered by the fact that companies are not usually willing to make public good quality data about the details of their software development

Read more »

Faster creation of binomial matrices

September 2, 2012
By

Scott Chamberlain blogged about faster creation of binomial matrices the other day, and even referred to our RcppArmadillo package as a possible solution (though claiming he didn't get it to work, tst tst -- that is what the rcpp-devel list is here to help with). The post also fell short of a good aggregated timing comparison for which we love...

Read more »

Bar Charts and Segmented Bar Charts in R

September 2, 2012
By
Bar Charts and Segmented Bar Charts in R

Here are a couple of tutorials I’ve written to help anyone who’s interested in learning how to produce simple bar charts or simple segmented bar charts in R, given that you have

Read more »

Stan

September 2, 2012
By
Stan

Andrew Gelman has announced the release of Stan version 1.0.0 and its R interface RStan.  Stan – named after Stanislaw Ulam, the inventor of the Monte Carlo method – is a new MCMC program that represents a major technological leap … Continue reading →

Read more »

Call for contribution: the RDataMining package – an R package for data mining

September 2, 2012
By
Call for contribution: the RDataMining package – an R package for data mining

Join the RDataMining project to build a comprehensive R package for data mining http://www.rdatamining.com/package We have started the RDataMining project on R-Forge to build an R package for data mining. The package will provide various functionalities for data mining, with … Continue reading →

Read more »

Discrete colors in ggplot

September 1, 2012
By
Discrete colors in ggplot

Have you ever wanted an easy way to generate continuous color pallettes for a discrete factor? I came across a question over on Stackoverflow about how add color to a ggplot figure. I often find myself with lot’s of categories that are discrete when I want a continuous color plot. This can be achieved by writing a quick...

Read more »

New Attribution Functions for PortfolioAnalytics

September 1, 2012
By
New Attribution Functions for PortfolioAnalytics

Another Google Summer of Code (GSoC) project this summer focused on creating functions for doing returns-based performance attribution. I’ve always been a little puzzled about why this functionality wasn’t covered already, but I think that most analysts do this kind of work in Excel. That, of course, has its own perils. But beyond the workflow

Read more »

Getting data on your government

September 1, 2012
By
Getting data on your government

I created an R package a while back to interact with some APIs that serve up data on what our elected represenatives are up to, including the New York Times Congress API, and the Sunlight Labs API. What kinds of things can you do with govdat? Here ...

Read more »

Add Text Annotations to ggplot2 Faceted Plot

August 31, 2012
By
Add Text Annotations to ggplot2 Faceted Plot

In my experience with R learners there are two basic types. The “show me the code and what it does and let me play” type and the “please give me step by step directions” type. I’ve broken the following tutorial … Continue reading →

Read more »

On School Boards and Policy Shocks

August 31, 2012
By
On School Boards and Policy Shocks

The dissertation process has many steps. The prospectus or proposal is one of the last. Awhile ago I was lucky enough to have my dissertation proposal defense and pass!  My project is seeking to understand the linkage between political activity at...

Read more »

Compiling Source Packages on R 2.15.x / Mac OS 10.5.x

August 31, 2012
By

For some reason R is not happy with its 64-bit cousin when installing source packages: * installing *source* package ‘XMLSchema’ ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded *** arch - i386 *** arch - x86_64 /Library/Frameworks/R.framework/Resources/bin/R: line 259: /Library/Frameworks/R.framework/Resources/bin/exec/x86_64/R: Bad CPU type in executable /Library/Frameworks/R.framework/Resources/bin/R: line 259:...

Read more »