Monthly Archives: November 2009

Some sort of update to ggplot2

November 22, 2009
By

Jeroen Ooms writes: Here's a first version of a new web application for exploratory graphical analysis. It attempts to implement the layered graphics from the R package ggplot2 in a user-friendly way. This two-minute demo video demonstrates a ...

Read more »

new R package : highlight

November 22, 2009
By

I finally pushed highlight to CRAN, which should be available in a few days. The package uses the information gathered by the parser package to perform syntax highlighting of R code The main function of the package is highlight, which takes a numb...

Read more »

R examine objects tutorial

November 21, 2009
By
R examine objects tutorial

This article is quick concrete example of how to use the techniques from Survive R to lower the steepness of The R Project for Statistical Computing‘s learning curve (so an apology to all readers who are not interested in R). What follows is for people who already use R and want to achieve more control Related posts:

Read more »

My implementation of Berry and Berry’s hierarchical Bayes algorithm for adverse events

November 20, 2009
By

I've been working on this for quite some time (see here for a little background), so I'm pleased that it looks close to done at least as far as the core algorithm. It uses global variables for now, and I'm sure there are a couple of other bugs lurking, but here it is, after the jump.const.sqrt2pi <-...

Read more »

Mapping Biomes

November 20, 2009
By
Mapping Biomes

Recently (2008) the European Space Agency produced GlobCover (ESA GlobCover Project, led by MEDIAS-France), the highest resolution (300m) global land cover map to date. GlobCover uses 21 primary land cover classes and many more sub-classes. Land cover classification (LCC) schemes divide the earth into biomes. Biomes are the simplest way to classify vegetation which can

Read more »

Working on a drug safety project

November 20, 2009
By

In order to move some of my personal interests along, I have been trying to implement the methodology found in Berry and Berry's article Accounting for Multiplicities in Assessing Drug Safety. This methodology uses the MedDRA hierarchy to improve the p...

Read more »

Tactical asset allocation using blotter

November 18, 2009
By
Tactical asset allocation using blotter

blotter is an R package that tracks the P&L of your trading systems (or simulations), even if your portfolio spans many security types and/or currencies. This post uses blotter to track a simple two-ETF trading system. The contents of this post b...

Read more »

Design of Experiments – Power Calculations

November 18, 2009
By

Prior to conducting an experiment researchers will often undertake power calculations to determine the sample size required in their work to detect a meaningful scientific effect with sufficient power. In R there are functions to calculate either a minimum sample size for a specific power for a test or the power of a test for

Read more »

Confidence we seek…

November 18, 2009
By
Confidence we seek…

Estimating a proportion at first looks elementary. Hail to aymptotics, right? Well, initially it might seem efficient to iuse the fact that . In other words the classical confidence interval relies on the inversion of Wald’s test. A function to ease the computation is the following (not really needed!). waldci<- function(x,n,level){ phat<-sum(x)/n results<-phat + c(-1,1)*qnorm(1-level/2)*sqrt(phat*(1-phat)/n) print(results) } An exact confidence interval is

Read more »

Quantitative link strength for APE cophyloplot

November 17, 2009
By
Quantitative link strength for APE cophyloplot

Just add a third column with link strength to the association matrix plotCophylo2 <- function (x, y, assoc = assoc, use.edge.length = use.edge.length, space = space, length.line = length.line, gap = gap, type = type, return = return, col = col, show.tip.label = show.tip.label, font = font) { if(ncol(assoc)==2) { assoc <- cbind(assoc,rep(1,nrow(assoc))) } res

Read more »