## How to load the {rJava} package after the error “JAVA_HOME cannot be determined from the Registry”

August 7, 2012
By

In case you tried loading a package that depends on the {rJava} package (by Simon Urbanek), you might came across the following error: Loading required package: rJava library(rJava) Error : .onLoad failed in loadNamespace() for ‘rJava’, details: call: fun(libname, pkgname) …Read more »

## Customizing ggplot graphs

August 7, 2012
By

There are many things I love about the R package ggplot2. For the most part, they fall into two categories:The "grammar of graphics" approach builds a hierarchical relationship between the data and the graphic, which creates a consistent, int...

## 48 Industries Since 1963

August 7, 2012
By

Please see http://timelyportfolio.blogspot.com/search/label/horizonplot for all horizon plot posts. Once more thanks to Ken French for his data, we can accomplish something I think is fairly amazing.  In 640x800, we can see 250 day rollling return...

## August 6-7 Rainfall on Metro Manila

August 7, 2012
By

Majority of Metro Manila is affected by floods. Looking at the hourly data from PAGASA weather  station located at Bicutan, Taguig, the graph below will gave the viewers of this blog on the rainfall situation in Manila from August 6 (12:00am)-7(11...

## R for Ecologists: Simulating Species-Area Curves (linear vs. nonlinear regression)

August 7, 2012
By

This post is about basic model simulation so we can get a feel for how curves are supposed to look given certain processes assumed by the model. One of the most prevalent patterns in ecology is the species-area (SAR) curve, which … Continue reading →

## Unify R plots with pander

August 7, 2012
By

MotivationR has a great variety of plotting tools (just to mention a few: the base graphics and e.g. lattice and ggplot2 packages building on grid) and most R user has a preference for either of them.I think all of you would agree with me: each package...

## For the Stupid Password Rules at Iowa State

August 7, 2012
By

The Fall semester is coming, which means it is time to log into several stupid systems to be prepared for the new semester. Time and time again I'm annoyed by the bullshit password rules at Iowa State University. I wrote to the IT staff once but no one...

## The New 60/40

August 6, 2012
By

I want to share a brilliant idea and a great example from the You’re Looking at the Wrong Number post at the GestaltU blog. Today, I will focus on the section of this post that outlines simple steps to improve a typical 60/40 stock/bond portfolio by using risk allocation instead of dollar allocation, and targeting

## Careless comparison bites back (again)

August 6, 2012
By

When running stats labs I like to allocate a slightly different subset of data to each student, which acts as an incentive for people to do their own work (rather than copying the same results from a fellow student). We … Continue reading →

## Vim-R-plugin: Installation

August 6, 2012
By

On Ubuntu 12.04, I took to the following steps to install Vim-R-plugin: First I had to install timux: sudo apt-get installl tmux Having already installed vim-pathogen, I used git to clone to install vim-r-plugin and vim-screen plugin, which is also … Continue reading →

## A bunch of R (and JAGS) scripts

August 6, 2012
By

I finally (nearly) got around to prepare the R code to replicate the examples in the book. I divided the examples by chapter and then linked to the R scripts and, for those involving Bayesian analysis, the associated JAGS models.At the moment, the scri...

## Predicting the 100m sprint: results

August 6, 2012
By

Last week, Markus Gesmann used a log-linear model in R to predict the Olympic gold-medal winning 100m sprint time to be 9.68 seconds. The actual time was 9.63 seconds. Not bad! Meanwhile, the New York Times put Usuain Bolt's olympic record in context, comparing him in a virtual race with other gold medal-winners over the past century (via FlowingData).

## A heuristic enhancement of optimisation algorithm

August 6, 2012
By
$x_t = z_t \sqrt{h_t}; z_t \sim \mathcal{N}(0,1)$

The majority of the world’s problem deal with directly or indirectly some kind of optimisation. Instance of optimisation of resources or utility function can be seen our daily life. Here I am talking about standard optimisation problem in statistics, maximum … Continue reading →The post A heuristic enhancement of optimisation algorithm appeared first on Fiddling with...

## Provincial Monthly Rainfall of the Philippines from WORLDCLIM

August 6, 2012
By

Preparing for a future conference on climate change, I downloaded and extracted average monthly rainfall in the Philippines from worldclim.org. Using maptools, raster, and animation package in R, I produced an animation of average monthly rainfall of t...

## Adventures at My First JSM (Joint Statistical Meetings) #JSM2012

August 6, 2012
By

During the past few decades that I have been in graduate school (no, not literally) I have boycotted JSM on the notion that “I am not a statistician.” Ok, I am a renegade statistician, a statistician by training. JSM 2012 was held in San Diego, CA, one of the best places to spend a week during the summer. This...

## Getting started with Sweave & knitr

August 6, 2012
By

Cool woven artwork on the campus of Kansas University. The image is CC by Patrick Emerson I recently started to work with Sweave (by Friedrich Leisch)...

## Crawford-Howell (1998) t-test for case-control comparisons

August 6, 2012
By

Cognitive neuropsychologists (like me) often need to compare a single case to a small control group, but the standard two-sample t-test does not work for this because the case is only one observation. Several different approaches have been proposed and in a new paper just published in Cortex, Crawford and Garthwaite (2012) demonstrate that the Crawford-Howell (1998) t-test...

## It is good to be explicit

August 6, 2012
By

Being careful not to repeat the year 1901 mistake, I set the TZ variable before I run R. I have the same set of data that I convert as follows: dates values date1 date2 and then plot plot( date1, values )plot( date2, values ) To my surprise I end up with the following two...

## Visualize a random forest that classifies digits

August 5, 2012
By

My last post uses random forest proximity to visualize a set of diamond shapes (the random forest is trained to distinguish diamonds from non-diamonds).This time I looked at the digits data set that Kaggle is using as the basis of a competition for "ge...

## Early August flotsam

August 5, 2012
By

Back teaching a couple of subjects and it’s the constant challenge to find enough common ground with students so one can push/pull them to the other side of new concepts. We are not talking about complex hierarchical models using mixed … Continue reading →

August 5, 2012
By

## London Olympics 100m men’s sprint results

August 5, 2012
By

The 100m mean's sprint finals of the 2012 London Olympics are over and Usain Bolt won the gold medal again with a winning time of 9.63s. Time to compare the result with my forecast of 9.68s, posted on 22 July. My simple log-linear model predicted ...

## Counting CRAN Package Depends, Imports and LinkingTo

August 5, 2012
By

The recent update by Søren Højsgaard's to his gRbase package for graphical models made it the 75th package to depend on our Rcpp package for R and C++ integration. So in a lighthearted weekend moment, I tweeted about gRbase being number...

## The R-Podcast Episode 9: Adventures in Data Munging Part 1

August 5, 2012
By

It’s great to be back with a new episode after an eventful break! This episode begins a series on my adventures in data munging, a.k.a data processing. I discuss three issues that demonstrate the flexibility and versatility R brings for recoding messy values, important inconsistent data files, and pinpointing problematic observations and variables. We also

## Animation basics for a vacation

August 5, 2012
By

Since I have a vacation this time I decided to implement some entertaining graphics. I have chosen to animate a Cassini oval.The task is can be accomplished using polar equation:The implementation of the animation is given by the following code:library...

## At A Glance View of the 2012 Olympics Heptathlon Performances

August 4, 2012
By

I spent most of today, err, yesterday, failing to hold back the tears as the medal performances from the Team GB Olympians kept rolling in… So to celebrate one of those wonderful performances, here are a couple of quick sketches of how Jessica Ennis made her medal in the Heptathlon. (The data is cut and

## And Now I Blog Again

August 4, 2012
By

One of my goals for 2012 has been to blog more. Much more. When I first set this goal, I had great aspirations of posting frequently. However, I had a Ph.D. to complete, and quite frankly, it demanded much higher priority. Now that I have submitted my ...

## Getting Started Using R, Part 1: RStudio

August 4, 2012
By

Despite my preference for SAS over R, there are some add-ons to “basic” R that I’ve found that have made my learning process way easier.  While I’m still in my infancy in learning R, I feel like once I found … Continue reading →Getting Started Using R, Part 1: RStudio is an article from randyzwitch.com,...