# Monthly Archives: January 2013

## My template for controlling publication quality figures

January 28, 2013
By

The following is a template that I usually start with when producing figures for publication. It allows me to control:The overall size of the figure (in inches) (WIDTH, HEIGHT)The layout of figure subplots (using the layout() function) (LO)The resoluti...

## The components garch model in the rugarch package

January 28, 2013
By

How to fit and use the components model. Previously Related posts are: A practical introduction to garch modeling Variability of garch estimates garch estimation on impossibly long series Variance targeting in garch estimation The model The components model (created by Engle and Lee) generally works better than the more common garch(1,1) model.  Some hints about … Continue reading...

## I thought R was a letter…intro/installation

January 27, 2013
By

I will make a confession. This past summer, I didn’t spend my spare time watching relentlessly addicting TV shows nor clubbing in San Francisco. Instead, I checked out figures. No, not the sort of figures you’re probably thinking about. The ones that are included in research papers and have the potential to be beautiful works of

## The Geometric Distribution

January 27, 2013
By

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

## European Fishing

January 27, 2013
By

I am playing around with Eurostat data and ggplot2 a bit more. As I progress it seems the plotting gets more easy, the data pre-processing a bit more simple and the surprises on the data stay.Eurostat dataThe data used are fish_fleet (number of ships) and fish_pr (production=catch+aquaculture). After a bit of year selection, 1992 and later, I decided to...

## A slightly different introduction to R, part II

January 27, 2013
By

In part I, we looked at importing data into R and simple ways to manipulate data frames. Once we’ve gotten our data safely into R, the first thing we want to do is probably to make some plots. Below, we’ll make some simple plots of the made-up comb gnome data. If you want to play

## Regression tree using Gini’s index

January 27, 2013
By
$Y$

In order to illustrate the construction of regression tree (using the CART methodology), consider the following simulated dataset, > set.seed(1) > n=200 > X1=runif(n) > X2=runif(n) > P=.8*(X1<.3)*(X2<.5)+ + .2*(X1<.3)*(X2>.5)+ + .8*(X1>.3)*(X1<.85)*(X2<.3)+ + .2*(X1>.3)*(X1<.85)*(X2>.3)+ + .8*(X1>.85)*(X2<.7)+ + .2*(X1>.85)*(X2>.7) > Y=rbinom(n,size=1,P) > B=data.frame(Y,X1,X2) with one dichotomos varible (the variable of interest, ), and two continuous ones (the explanatory ones  and ). > tail(B) Y...

## Tracking Number of Historical Clusters

January 26, 2013
By

In the prior post, Optimal number of clusters, we looked at methods of selecting number of clusters. Today, I want to continue with clustering theme and show historical Number of Clusters time series using these methods. In particular, I will look at the following methods of selecting optimal number of clusters: Minimum number of clusters

## ggplot2 multiple boxplots with metadata

January 26, 2013
By

Recently I was asked for an advice of how to plot values with an additional attached condition separating the boxplots. This turns out to be ugly in base graphics, but amazingly simple in ggplot2.

## Learning R using a Chemical Reaction Engineering Book: Part 3

January 26, 2013
By
$Learning R using a Chemical Reaction Engineering Book: Part 3$

In case you missed previous parts, the links to them are listed below. Part 1 Part 2 In this part, I tried to recreate the examples in section A.2.3 of the computational appendix in the reaction engineering book (by Rawlings and … Continue reading →