Monthly Archives: November 2011

Rdatamarket Tutorial

November 4, 2011
By

The good folks at DataMarket have posted a new tutorial on using the rdatamarket package (covered here in August) to easily download public data sets into R for analysis. The tutorial describes how to install the rdatamarket package, how to extract metadata for data sets, and how to download the data themselves into R. The tutorial also illustrates a...

Read more »

match vs. %in%

November 4, 2011
By

match and %in% are two very commonly-used function in R. So, what's the difference of them?First, how to use them -- (copy from R manual)match returns a vector of the positions of (first) matches of its first argument in its second.%in% is a ...

Read more »

Confidence interval for predictions with GLMs

November 4, 2011
By
Confidence interval for predictions with GLMs

Consider a (simple) Poisson regression . Given a sample where , the goal is to derive a 95% confidence interval for given , where is the prediction. Hence, we want to derive a confidence interval for the prediction, not the potential observation...

Read more »

Confidence interval for predictions with GLMs

November 4, 2011
By
Confidence interval for predictions with GLMs

Consider a (simple) Poisson regression . Given a sample where , the goal is to derive a 95% confidence interval for given , where is the prediction. Hence, we want to derive a confidence interval for the prediction, not the potential observation, i.e. the dot on the graph below > r=glm(dist~speed,data=cars,family=poisson) > P=predict(r,type="response", + newdata=data.frame(speed=seq(-1,35,by=.2))) > plot(cars,xlim=c(0,31),ylim=c(0,170)) > abline(v=30,lty=2)...

Read more »

Factor to class-membership matrix

November 4, 2011
By
Factor to class-membership matrix

Recently on R-bloggers I found a post from chem-bla-ics blog concerning conversion of factors to integer vectors. At the end it stated a problem of conversion of factor variable to class-membership matrix. In comments several nice solutions were p...

Read more »

Help: stemming and stem completion with package tm in R

November 3, 2011
By
Help: stemming and stem completion with package tm in R

I came across a problem below when doing stemming and stem completion with package tm in R. Word “mining” was stemmed to “mine” with stemDocument(), and then completed to “miners”with stemCompletion(). However, I prefer to keep “mining” intact. For stemCompletion(), … Continue reading →

Read more »

Webinar on Portfolio Rebalancing with R and Sybase

November 3, 2011
By

R users in the financial industry may be interested in the following webinar hosted by Revolution Analytics' partner Sybase on November 10: Portfolio Rebalancing Using R and Sybase RAP for Intraday Risk Management With volatility and violent intraday swings becoming the new normal, intraday risk controls are now needed to not only reduce your exposures across multiple asset classes,...

Read more »

By: Super Nerdy Cool » Build multiarch R (32 bit and 64 bit) on Debian/Ubuntu

have the 64 bit version of R compiled from source on my Ubuntu laptop. I recently had a need for R based on 32 bit since a package I

Read more »

Modern Portfolio Optimization Theory: The idea

November 3, 2011
By
Modern Portfolio Optimization Theory: The idea

We were recently given a lecture (by Dr. Susan Thomas) on Harry Markowitz portfolio optimization theory, and I was really fascinating with the noble laureate's story of how he found it difficult to convince his guide about the importance of h...

Read more »

Variability of volatility estimates from daily returns

November 3, 2011
By
Variability of volatility estimates from daily returns

Investment Performance Guy has a post “Periodicity of risk statistcs (and other measures)” in which it is wondered how valid volatility estimates are from a month of daily returns. Here is a quick look.  Figure 1 shows the variability (and a 95% confidence interval) of volatility estimates for the S&P 500 index in January 2011.  … Continue reading...

Read more »