# Monthly Archives: April 2013

April 29, 2013
By

## austerity in MCMC land (#2)

April 29, 2013
By

After reading the arXiv paper by Korattikara, Chen and Welling, I wondered about the expression of the acceptance step of the Metropolis-Hastings algorithm as a mean of log-likelihoods over the sample. More specifically the long sleepless nights at the hospital led me to ponder the rather silly question of the impact of replacing mean by

## Editing/Adding factor levels in R

April 29, 2013
By

I was trying to change few levels in my factor variable by simply coercing characters on that factor variable but it dint seem to work. data(iris)iris$Species <- rep("Random", 71) ## Warning: invalid factor level, NAs generated iris$Species ## setosa ...

## Citation Patterns in Ecology

April 29, 2013
By

I’m always curious to see who is citing my one paper. Turns out I actually have two papers, and the most cited paper (with 19 citations, which sounds paltry but for me is quite exciting) is certainly not the one … Continue reading →

## Stats in the Court Room Hands on Tutorial

April 29, 2013
By

I got intrigued by the numbers presented in this news article talking about the re-trial in the Amanda Knox case. The defendants, accused and initially convicted of murder, were acquitted in the appeal's instance when the judge ruled that the forensic evidence was insufficiently conclusive. The appeals judge ignored the forensic scientist's advice to retest a DNA sample,...

## Slouching towards simulating investment skill

April 29, 2013
By

When investment skill is simulated, it is often presented as if it is obvious how to do it.  Maybe I’m wrong, but I don’t think it’s obvious. Previously In “Simple tests of predicted returns” we saw that prediction quality need not look like what you would find in a textbook.  For example, there was a … Continue reading...

## How to change the alpha value of colours in R

April 29, 2013
By

Often I like to reduce the alpha value (level of transparency) of colours to identify patterns of over-plotting when displaying lots of data points with R. So, here is a tiny function that allows me to add an alpha value to a given vector of colours, e.g. a RColorBrewer palette, using col2rgb and rgb, which has...

## Using the Golden Section Search Method to Minimize the Sum of Absolute Deviations

$Using the Golden Section Search Method to Minimize the Sum of Absolute Deviations$

Introduction Recently, I introduced the golden search method – a special way to save computation time by modifying the bisection method with the golden ratio, and I illustrated how to minimize a cusped function with this script.  I also wrote an R function to implement this method and an R script on how to apply this

## Qu’on dit les médias cette semaine ?: Timeline de TwitteR

April 28, 2013
By

(This article was first published on Learning Data Science , and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on his blog: Learning Data Science . R-bloggers.com offers daily e-mail updates about R news and tutorials on topics such as: visualization (ggplot2, Boxplots, maps, animation), programming (RStudio, Sweave, LaTeX, SQL,...