# Monthly Archives: January 2011

## 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