Monthly Archives: December 2010

Book Review: R in a Nutshell

December 29, 2010
By

A brief review of R in a Nutshell by Joseph Adler. This book continues to serve as a useful reference that sits on my desk next to my computer, waiting to tell me the name of that command I've just forgotten.

Read more »

Converting a String to a Variable Name On-The-Fly and Vice-versa in R

December 28, 2010
By

Recently, I had a professor ask me how to take a string and convert it to an R variable name on-the-fly. One possible way is: x <- 42 eval(parse(text = "x")) [1] 42 Now, suppose we want to go the other way. The trick is just as simple: x <- 42 deparse(substitute(x)) [1] "x"

Read more »

Generating stress scenarios: null correlation is not enough

December 28, 2010
By
Generating stress scenarios: null correlation is not enough

In a recent post (here, by @teramonagi), Teramonagi mentioned the use of PCA to model yield curve, i.e. to obtain the three factor, "parallel shift", "twist" and "butterfly". As in Nelson & Siegel, if m is maturity, is the yield of the cu...

Read more »

nlm [unused argument(s) (iter = 1)]

December 28, 2010
By
nlm [unused argument(s) (iter = 1)]

Ashley put the following comment on Chapter 5 of Introducing Monte Carlo Methods with R”: I am reading chapter 5. I try to reproduced the result on page 128. The R codes don’t work on my laptop. When I try to run the following codes on page 128 > for (i in 1:(nlm(like,sta)$it)){ + mmu=rbind(mmu,nlm(like,sta,iter=i)$est)}

Read more »

Travel grants and prizes for R/Finance 2011

December 28, 2010
By

If you've been thinking about heading to Chicago in April for the R/Finance conference, here's another reason to go: posting for the committee, Dirk Eddelbuettel announced last week that thanks to a favourable response from sponsors, the conference organizers can now offer: a competition for best paper, which given the focus of the conference will award for both an...

Read more »

Automatic Simulation Queueing in R

December 28, 2010
By

I spend much of my time writing R code for simulations to compare the supervised classification methods that I have developed with similar classifiers from the literature.  A large challenge is to determine which datasets (whether artificial/simulated or real) are interesting comparisons.  Even if we restricted ourselves to multivariate Gaussian data, there are a large

Read more »

Tools to tidy up R code

December 28, 2010
By
Tools to tidy up R code

Last week we made an impassioned plea for attention to style in formatting R and SAS code.While it's always better to adopt a consistent style and use it whenever you write code, the reality is that sometimes formatting slips (or you end up repurposing...

Read more »

High readings of VIX index during 2 days

December 28, 2010
By
High readings of VIX index during 2 days

During last two sessions (December 23th and 27th), VIX index posted returns (close to close) above 6 %. My question is – what return can we expect next day after such event? As you can see from the graph above, expected return is positive. During 1995-2010 were 53 such events and mean return was 1.02 %

Read more »

Phylogenetic meta-analysis in R using Phylometa

December 28, 2010
By
Phylogenetic meta-analysis in R using Phylometa

Here is some code to run Phylometa from R. Phylometa is a program that conducts phylogenetic meta-analyses. The great advantage of the approach below is that you can easily run Phylometa from R, and manipulate the output from Phylometa in R. Phylometa ...

Read more »

Poster at MCMSki III

December 28, 2010
By
Poster at MCMSki III

Here is the poster presented at MCMSki III next week by Pierre Jacob about our joint paper on parallelisation: Filed under: R, Statistics, Travel Tagged: Adapski, MCMC, MCMSki, Metropolis-Hastings, Monte Carlo Statistical Methods, parallelisation, pos...

Read more »