Mumbai, March 24-26, 2011 – R for Finance and Advanced Portfolio Optimization

February 7, 2011
By

(This article was first published on Rmetrics blogs, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on his blog: Rmetrics blogs. 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, Eclipse, git, hadoop, Web...

Read more »

R Tutorial Series: Two-Way ANOVA with Interactions and Simple Main Effects

February 7, 2011
By
R Tutorial Series: Two-Way ANOVA with Interactions and Simple Main Effects

When an interaction is present in a two-way ANOVA, we typically choose to ignore the main effects and elect to investigate the simple main effects when making pairwise comparisons. This tutorial will demonstrate how to conduct pairwise comparisons when...

Read more »

R Tutorial Series: Two-Way ANOVA with Interactions and Simple Main Effects

February 7, 2011
By
R Tutorial Series: Two-Way ANOVA with Interactions and Simple Main Effects

When an interaction is present in a two-way ANOVA, we typically choose to ignore the main effects and elect to investigate the simple main effects when making pairwise comparisons. This tutorial will demonstrate how to conduct pairwise comparisons when...

Read more »

R: Functions and environments and a debugging utility, oh my!

February 7, 2011
By

The Mark Fredrickson blog has a superb post on R functions and environments that's well worth checking out.He also includes a handy function for debugging:> fnpeek + env + if (is.null(name)) {+ return(ls(envir = env))+ }+ ...

Read more »

Reproducing the BMA exercise of Fernández, Ley and Steel (2001) in R

February 7, 2011
By
Reproducing the BMA exercise of Fernández, Ley and Steel (2001) in R

In their paper Model uncertainty in cross-country growth regressions (Journal of Applied Econometrics 2001), Fernández, Ley and Steel (FLS) demonstrate the use of Bayesian Model Averaging (BMA) for a cross-section economic growth data set. This tutor...

Read more »

Open data might be a false good opportunity…

February 7, 2011
By
Open data might be a false good opportunity…

I am always surprised to see many people on Twitter tweeting about #opendata, e.g. @data4all, @usdatagov, @datapublicatwit, @ProPublica or @open3 among so many others... Initially, I was also very enthousiastic, but I have to admit that open data a...

Read more »

Simple example:How to use foreach and doSNOW packages for parallel computation.

February 6, 2011
By

update************************************************************************************************I checked whether this example was run collectly or not in Windows XP(32bit) only ! ************************************************************************************************In R language, the members at Revolution R provide foreach and doSNOW packages for parallel computation. these packages allow us to compute things in parallel. So, we start to install these packages.install.packages("foreach")install.packages("doSNOW")Created by Pretty R at inside-R.orgIn...

Read more »

Simple example:How to use foreach and doSNOW packages for parallel computation.

February 6, 2011
By

update************************************************************************************************ I checked whether this example was run collectly or not in Windows XP(32bit) only !  ************************************************************************************************ In R language, the members at Revolution R provide foreach and doSNOW packages for parallel computation. these packages allow us to compute things in parallel. So, we start to install these packages. install.packages("foreach")install.packages("doSNOW") Created by Pretty R at inside-R.org In...

Read more »

Rhythms of Equality and Inequality

February 6, 2011
By
Rhythms of Equality and Inequality

Today I unveil my very first statistical YouTube video! I will do anything to keep you statisfied, and if that means YouTube, then so be it. But first, some exposition: In Panama, 10 percent of the population owned 45 percent of the income in 2000, whereas the bottom 10 percent owned only 0.6 percent. How

Read more »

Latent Gaussian Models im Zürich [day 2]

February 6, 2011
By
Latent Gaussian Models im Zürich [day 2]

The second day at the Latent Gaussian Models workshop in Zürich was equally interesting. Among the morning talks, let me mention Daniel Bové who gave a talk connected with the hyper-g prior paper he wrote with Leo Held (commented in an earlier post) and the duo of Janine Illian and Daniel Simpson who gave enthusiastic

Read more »

Boxplots and Beyond – Part II: Asymmetry

Boxplots and Beyond – Part II: Asymmetry

In my last post, I discussed boxplots in their simplest forms, illustrating some of the useful options available with the boxplot command in the open-source statistical software package R.  As I noted in that post, the basic boxplot is both useful...

Read more »

Clustering NHL Skaters

February 6, 2011
By
Clustering NHL Skaters

I have been sitting on this post for some time now and wanted to get it out there.  The goal is to simply show how easy it is to pull live data from the web into R, massage it, and perform some analytics on it.  I am not sure how useful this analysis really is

Read more »

Twitter Analysis using R

February 6, 2011
By
Twitter Analysis using R

One of the things that normally slow me down when I am learning a new tool outside working hours is the lack of an interesting project/task that forces me to investigate more about the sort of activities required to finish the project successfully. On ...

Read more »

Peeking inside R functions

February 6, 2011
By

R, like all good programming languages, treats functions as first class objects. Users can create functions, pass them as arguments, and have them returned as the result of other computations. You may be familiar with passing functions as arguments if you have used the apply family of functions (i.e. apply, sapply, lapply, mapply). For example, to get get...

Read more »

“R” scripts for Metatrader ….. The first steps of many for proper trading

February 5, 2011
By
“R” scripts for Metatrader ….. The first steps of many for proper trading

I have designed and developed Automated Trading Systems (ATS) for few years now. Since trading live, I have been fairly profitable (that is, I achieved my goals). However, I had the unsatisfactory feeling that I was missing some information to increase the level of trust in my systems … I was missing the proper tools

Read more »

Weight Loss Predictor

February 5, 2011
By
Weight Loss Predictor

Got for 2010 Xmas a very cool book called the "4 Hour Body"(thanks Jose Santos) written by Tim Ferriss who write a previous favorite of mine about productivity, the 4 hour work week. Its an interesting book, because it has a scientific approach, it ...

Read more »

Duck typing with quantmod

February 4, 2011
By
Duck typing with quantmod

This is a short example of using duck typing in a guard statement in the futile.paradigm. We are implementing a …Continue reading »

Read more »

R: Colors

February 4, 2011
By

"It ain't easy being green. ~ Kermit T. F. Matt Blackwell at the SSSB has made it easy to access all the Craylola(tm) colors in R.And in case you're not familiar with the way R handles color, here are a few resources:* The best color chart for R.* Colo...

Read more »

Latent Gaussian Models in Zürich [day 1]

February 4, 2011
By
Latent Gaussian Models in Zürich [day 1]

An interesting first day (for me) at the Latent Gaussian Models workshop in Zürich. The workshop is obviously centred at the INLA approach, with Havard Rue giving a short course on Wednesday then a wide ranging tour of the applications and extensions of INLA this afternoon. Thanks to his efforts in making the method completely

Read more »

Post-hoc Pairwise Comparisons of Two-way ANOVA

February 4, 2011
By
Post-hoc Pairwise Comparisons of Two-way ANOVA

I read this post today by John Quick. I was a little taken back when he used a pairwise t-test for post hoc analysis. In a contradiction the t-test did not show differences in the treatment means when the ANOVA model did. This is because the pairwise.t.test does not take into account the two-way anova,

Read more »

The R-Files: Dirk Eddelbuettel

February 4, 2011
By
The R-Files: Dirk Eddelbuettel

"The R-Files" is an occasional series from Revolution Analytics, where we profile prominent members of the R Community. Name: Dirk Eddelbuettel Background: Ph.D. (EHESS, France), Quantitative Analyst Nationality: Canadian Years Using R: About 15 Known for: RQuantlib, Rcpp/RInside, R packaging for Debian/Ubuntu, Task Views for Finance and HPC, CRANberries Dirk Eddelbuettel is an active member of the R community...

Read more »

Assessing Climate Trends: Eyeball versus Regression

February 4, 2011
By
Assessing Climate Trends: Eyeball versus Regression

In a previous post, I showed the Lower Stratospheric Temperature Anomaly (TLS) Trends (link).  A reader submitted the following comment: “The lower stratosphere temperature profile is essentially flat from ca. 1995 to the present. This approximately mirrors the temperature trend … Continue reading →

Read more »

Research position in forecasting renewable energy

February 4, 2011
By

I don’t normally post job ads except when they are within my own research group. But this one is close to my research interests, and I’d like to help the institution find someone good for the role, so I’m making an exception. It is a position for a post-doctoral researcher at the Centre for Energy

Read more »

Le Monde puzzle [#4]

February 4, 2011
By
Le Monde puzzle [#4]

A fairly simple puzzle in this weekend Le Monde magazine: given five points on a line such that their pairwise distances are 1,2,4,…,14,18,20, find the respective positions of the five points over the line and deduce the missing distances. Without loss of generality, we can set the first point at 0 and the fifth point

Read more »

Speed up your R code with C++

February 3, 2011
By
Speed up your R code with C++

Hi again, Recently, Julyan blogged about allocating memory first before modifying R objects. That’s a very useful trick that applies to most programming languages. Tonight I want to blog about something a bit more complicated and more specific to R, but which can lead to massive speed-ups: interfacing C/C++ within R codes. The rationale behind

Read more »

Japan Intentional or Accidental Pursuit of Deflation

February 3, 2011
By
Japan Intentional or Accidental Pursuit of Deflation

Japan’s intentional or accidental pursuit of deflation has caused an imbalance far greater than Bernanke’s pursuit of inflation.  Japanese policymakers have allowed Yen appreciation versus all other currencies.  It appears that they recog...

Read more »

Regular expressions, an example

February 3, 2011
By

Why regular expressions are your friend. This is written in Stata but applies to any language where regular expressions exist.Original version if length("`qx'")==3 { /*ex: 5q0*/ ...

Read more »

Mixed Models – Part 1

February 3, 2011
By
Mixed Models – Part 1

Very brief. Have been exploring mixed models in R using nlme::lme. Am looking forward to understanding them more, they’re going to be used more and more in years to come I’ve no doubt of that. Here are some scripts, very rough, for diagnostics when running simple 2 levels, or models with 1 grouping variable. CLICK

Read more »

R in production systems

February 2, 2011
By
R in production systems

R is great for prototyping models.  Not so great if those models have to run a business.  Here’s some tips to help with that: Validate, alert, and monitor Sink Use 64-bit Linux Write your own functions tryCatch Validate, alert, and monitor:  Sooner or later something is going to go wrong with your model.  Maybe some

Read more »