## R: An introduction for psychologists

January 13, 2011
By

Here are the slides from the Introduction to R session Danny Kaye and I ran at the BPS Mathematics, Statistics & Computing section CPS Workshop (13 December 2010, Nottingham Trent University).

## More climate extremes, or simply global warming ?

January 12, 2011
By

In the paper on the heat wave in Paris (mentioned here) I discussed changes in the distribution of temperature (and autocorrelation of the time series). During the workshop on Statistical Methods for Meteorology and Climate Change today (here) I o...

## R Code for googleVis Demo

January 12, 2011
By

# ------------------------------------------------------------------# | PROGRAM NAME: googleVis_R# | DATE: 1/12/11 # | CREATED BY: Matt Bogard# | PROJECT FILE: # |----------------------------------------------------------------# | PURPOSE: ...

## R: Attack of the hair-trigger bees?

January 12, 2011
By

In their book “Complex Adaptive Systems”, authors Miller and Page create a theoretic model for bee attacks, based on the real, flying, honey-making, photogenic stingers. Suppose the hive is threatened by some external creature. Some initial group of guard bees sense the danger and fly off to attack. As they go, they lay down a

## CosmoPMC released

January 12, 2011
By

Martin Kilbinger, an astronomer (cosmologist) with whom we had worked on population Monte Carlo for cosmological inference , has made the PMC C codes available on the CosmoPMC webpage. He has also written a CosmoPMC manual that is now available from arXiv. And he very kindly associated me to

## Initial Work on a Post Not Yet Completed

January 12, 2011
By

It’s no secret I have been learning R for some time now, and one of the best resources out there is the hashtag rstats on twitter (#rstats).  There is a tremendous community of active users who are always willing to help, but not to mention, you can get a first hand view of some of

## Winners of Mozilla Open Data Competition announced

January 12, 2011
By

The winners of the Mozilla Open Data Visualization competition "How Do People Use Firefox" have been announced. The competition attracted 32 entries, each visualizing an aspect of data collected in the Mozilla Test Pilot program to reveal insights about how people use the popular open-source browser Firefox. I was honoured to be asked to participate in the judging of...

## In The Wild: rApache 1.1.14 Released

January 12, 2011
By

Don’t be scared. Really. It’s just another minor release. After working with one of the venerable developers at metamx, it was discovered that rApache would crash when invoking the .Call functions outside the context of a web request. Get the sour...

## Random variable generation (Pt 3 of 3)

January 12, 2011
By
$Random variable generation (Pt 3 of 3)$

Ratio-of-uniforms This post is based on chapter 1.4.3 of Advanced Markov Chain Monte Carlo.  Previous posts on this book can be found via the  AMCMC tag. The ratio-of-uniforms was initially developed by Kinderman and Monahan (1977) and can be used for generating random numbers from many standard distributions. Essentially we transform the random variable of

## Usage of R functions "table" & "ifelse" when NA’s exist

January 12, 2011
By

Most of the time I came across now and then in help posts questions regarding the mismatching total count of observations after employing the R functions "table" and "ifelse". This usually creates frustration among fresh/part-time practitioners which e...

## Usage of R functions "table" & "ifelse" when NA’s exist

January 12, 2011
By

Most of the time I came across now and then in help posts questions regarding the mismatching total count of observations after employing the R functions "table" and "ifelse". This usually creates frustration among fresh/part-time practitioners which e...

## RProtoBuf 0.2.2

January 12, 2011
By

Thanks to two patches by Murray Stokely, we have a nice new minor release 0.2.2 of RProtoBuf out on CRAN. RProtoBuf provides GNU R bindings for the Google Protobuf data encoding library used and released by Google. The NEWS file entry follows bel...

## Two short Bayesian courses in South’pton

January 12, 2011
By

An announcement for two short-courses on Introduction to  Bayesian Analysis and MCMC, and Hierarchical Modelling of Spatial and Temporal Data by Alan Gelfand (Duke University, USA) and Sujit Sahu (University of Southampton, UK), are to take place in Southampton on June 7-10, this year. Course 1: Introduction to Bayesian Analysis and MCMC. Date: June 7,

## The number 1 novice quant mistake

January 12, 2011
By

It is ever so easy to make blunders when doing quantitative finance.  Very popular with novices is to analyze prices rather than returns. Regression on the prices When you want returns, you should understand log returns versus simple returns. Here we will be randomly generating our “returns” (with R) and we will act as if … Continue reading...

## Create Motion Charts in R with the GoogleVis package

January 11, 2011
By

Hans Rosling popularized Motion Charts -- 2-d scatterplots that animate over time -- with the GapMinder project. Motion Charts were taken to their augmented-reality extreme in this clip from the BBC programme, The Joy of Stats, but now you can create similar (if less audacious) motion charts for yourself with just R and a Flash-enabled browser. First, you'll need...

January 11, 2011
By

## Emacs Starter Kit for the Social Sciences now gets ESS via ELPA

January 11, 2011
By

More starter kit stuff. Up till now, the Emacs Starter Kit for the Social Sciences included ESS, but bundled it with the git repo. A better option would be to have it installed via the package mechanism, like AucTeX is now, but it’s not included. The ELPA system is allows you to specify repositories besides

## Introducing the Lowry Plot

January 11, 2011
By

Here at the Health and Safety Laboratory* we’re big fans of physiologically-based pharmacokinetic (PBPK) models (say that 10 times fast) for predicting concentrations of chemicals around your body based upon an exposure. These models take the form of a big system of ODEs. Because they contain many equations and consequently many parameters (masses of organs

## Data-Driven Journalism

January 11, 2011
By

The December 2010 meeting of the Bay Area R Users Group featured Peter Aldhous, San Francisco bureau chief of New Scientist magazine who will give a presentation on "Data-Driven Journalism". From the WikiLeaks War Diaries, to geographical analyses of ...

## Recreating Gapminder World Map with R & ggplot2

January 11, 2011
By

Gapminder has posted an interesting chart using world development indicators from the World Bank. I thought it would be a good exercise to recreate this chart using R and ggplot2. While playing with the data, not log transforming GDP provides some interesting, and perhaps different, interpretation. The R script and graphics are below. Google Gadget Version library(ggplot2)

## just for fun: Recovery.gov data snooping

January 11, 2011
By

Okay, so this isn't ecology related at all, but I like exploring data sets. So here goes...Propublica has some awesome data sets available at their website: http://www.propublica.org/tools/I played around with their data set on Recovery.gov (see hyperl...

## sab-R-metrics: Subsetting, Conditional Statements, ‘tapply()’, and VERY simple ‘for loops’

January 11, 2011
By

In my last sab-R-metrics post, I went over some basics of calling data and creating vectors or new data from those. Here, I want to extend that to full subsets of data and go on to use some of the basic functions in R so that we can begin plotting in the next tutorial.Before I begin, I...

## sab-R-metrics: Subsetting, Conditional Statements, ‘tapply()’, and VERY simple ‘for loops’

January 11, 2011
By

In my last sab-R-metrics post, I went over some basics of calling data and creating vectors or new data from those. Here, I want to extend that to full subsets of data and go on to use some of the basic functions in R so that we can begin plotting in the next tutorial.Before I begin, I...

## Emacs Starter Kit for the Social Sciences: Now Easier to Install

January 11, 2011
By

New in nerdery this week, it’s now a bit easier to install the Emacs Starter Kit for the Social Sciences that I put together (based on lots of great work by Phil Hagelberg and, more recently, Eric Schulte). In the past, the fact that AucTeX was both necessary and had to be compiled locally made

## Maps with R, part… n+1

January 11, 2011
By

Following the idea posted on James Cheshire's blog (here), I have tried to play a little bit with R and Google. And it works ! Consider for instance life expectancy at birth (that can be found - and downloaded - here). Using the following code, it ...

## Cursed numbers ?

January 11, 2011
By

In Lost, Hugo “Hurley” Reyes played the numbers 4, 8, 15, 16, 23 and 42 at the lottery, and ended up winning the \$114-million jackpot. And over the ensuing weeks, everyone around him seems to suffer increasingly bad luck: Hurley’s grandfathe...

## table() in R

January 11, 2011
By

The table function in R is very useful, especially when working with survey data. Often you may have Likert scales for levels of agreement or satisfaction. table() quickly gives the distribution of answers, which can then be used for (bar)plots.However...

## table() in R

January 11, 2011
By

The table function in R is very useful, especially when working with survey data. Often you may have Likert scales for levels of agreement or satisfaction. table() quickly gives the distribution of answers, which can then be used for (bar)plots.However...