## Plotting principal component analysis with ggplot #rstats

July 8, 2013
By

This script was almost written on parallel to the sjPlotCorr script because it uses a very similar ggplot-base. However, there’s also a very nice posting over at Martin’s Bio Blog which show alternative approaches on plotting PCAs. Anyway, if you … Weiterlesen →

## analyze the american time use survey (atus) with r

July 8, 2013
By

the american time use survey collects information about how we spend our time.  it's a pretty simple setup: sampled individuals write down everything they do for a single twenty-four hour period, in ten minute intervals.  those diaries are a...

## Estimating ODE’s parameters

July 7, 2013
By

(This article was first published on Just Another R Blog, and kindly contributed to R-bloggers) To leave a comment for the author, please follow the link and comment on their blog: Just Another R Blog. 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,...

## change in weight of cars plot

July 7, 2013
By

Based on last week's faster algorithm I wanted to finish with car weights. Unfortunately a fail again. By now it is a fail of myself, it needs a bit more dedication and grunt than I am willing and able to give for this blog. This week I added...

## Interactive Heatmaps (and Dendrograms) – A Shiny App

July 7, 2013
By

Heatmaps are a great way to visualize data matrices. Heatmap color and organization can be used to  encode information about the data and metadata to help learn about the data at hand. An example of this could be looking at the raw data  or hierarchically clustering samples and variables based on their similarity or differences.

## rgeos: TopologyException – found non-noded intersection between..

July 7, 2013
By

I have been having some issues generating spatial unions and intersections using the rgeos package. The package is extremely powerful, as it serves as an R interface to the powerful GEOS engine. However, when working with shapefiles or polygons, quite often you will come across a whole range of errors, typically around topology exceptions. These occur

## ggmap : Interesting toolbox for spatial analysis

July 7, 2013
By

ggmap is a new tool which enables such visualization by combining the spatial information of static maps from Google Maps, OpenStreetMap, Stamen Maps or CloudMade Maps with the layered grammar of graphics implementation of ggplot2The library is developped by David Kahle and Hadley Wickham and in the latest R/Journal (Volume 5/1, June 2013),...

## RFM Customer Analysis with R Language

July 7, 2013
By

For database marketing or direct marketing people, they are always concerned about two questions before they send out mails or make calls to their customers:- How can they segment the customers in the database to find out who are more likely to response to their mails or buy their products? Which type of customers they

## Variance Swap Replication in R.

July 6, 2013
By

As I was studying volatility derivatives I made some charts that represent some key features of replication. Say variance swap has a payoff function $$f=(\sigma - K_{VOL})$$, which means that $$K_{VOL}$$ will most likely be the forward volatility clos...

## Variance Swap Replcation in R.

July 6, 2013
By

As I was studying volatility derivatives I made some charts that represent some key features of replication. Say variance swap has a payoff function $$f=(\sigma^2 - K_{VOL})$$, which means that $$K_{VOL}$$ will most likely be the forward volatility cl...

## Getting raster histogram in QGIS using SEXTANTE and R

July 6, 2013
By

The issue with the broken histogram creation tool in QGIS annoyed me far too long. Sometimes you just need a quick glance on the histogram of a raster just to make a decision on how to process it or just to assess distribution of classes. But as you kn...

## A Recipe for Trellis/Faceted Plots Using Base R Graphics

July 5, 2013
By

I frequently use lattice and ggplot2 to create trellis/faceted graphics. But, I gave up using these packages in a recent application, where I had initially constructed a complex graphic using the base R plotting functions. When I later decided that I wanted a faceted version, there was a dilema: re-create the complex graphic using lattice

## Veterinary Epidemiologic Research: Modelling Survival Data – Parametric and Frailty Models

July 5, 2013
By
$Veterinary Epidemiologic Research: Modelling Survival Data – Parametric and Frailty Models$

Last post on modelling survival data from Veterinary Epidemiologic Research: parametric analyses. The Cox proportional hazards model described in the last post make no assumption about the shape of the baseline hazard, which is an advantage if you have no idea about what that shape might be. With a parametric survival model, the survival time

## Optimal Pricing for a Simple Monopolist

July 5, 2013
By

# A single price monopolist is a monopolist because it is the only supplier of a particular product. The monopolist therefore has the power to choose a price to sell the product at. # Those who have a willingness to pay which is greater than the ...

## Allocation Models With Bounded Dependent Variables

July 5, 2013
By

(This article was first published on Econometrics Beat: Dave Giles' Blog, and kindly contributed to R-bloggers) My post yesterday, on Allocation Models, drew a comment to the effect that in such models the dependent variables take values that must to be non-negative fractions. Well, as I responded, that’s true sometimes (e.g., in the case of market shares); but not in...

## Meet the Revolution Analytics UK team

July 5, 2013
By

Revolution Analytics has a new office in London to serve our customers in Europe. This press release introduces the team members who are based there: Neil Miller, Managing Director, International: Neil Miller is responsible for Revolution Analytics' business and growth outside the Americas and is based in the U.K. Neil Miller joined the company after 14 years at Accenture...

## ggplot2 Chloropleth of Supreme Court Decisions: A Tutorial

July 4, 2013
By

I don't do much GIS but I like to. It's rather enjoyable and involves a tremendous skill set. Often you will find your self grabbing data sets from some site, scraping, data cleaning and reshaping, and graphing. On the ride … Continue reading →

## Using neural networks for credit scoring: a simple example

July 4, 2013
By

Credit scoring is the practice of analysing a persons background and credit application in order to assess the creditworthiness of the person. One can take numerous approaches on analysing this creditworthiness. In the end it basically comes down to first selecting the correct independent variables (e.g. income, age, gender) that lead to a given level of creditworthiness. In...

## R-ratio vs mean-variance optimization

July 4, 2013
By

I am looking at the following tickers from 2005-01-01 to 2008-01-01. The tickers are GE, F, MSFT, DELL, INTC. I will find the mean-variance weights and the R-ratio weights and then test portfolio performance from 2008-01-01 to 2010-01-01. This is a … Continue reading →

## Creating good looking survival curves – the ‘ggsurv’ function

July 4, 2013
By

This is a guest post by Edwin Thoen Currently I am doing my master thesis on multi-state models. Survival analysis was my favourite course in the masters program, partly because of the great survival package which is maintained by Terry Therneau. The …Read more »

## Fun simulating Wimbledon in R and Python

July 4, 2013
By

R and Python have different strengths. There's little you can do in R you absolutely can't do in Python and vice versa, but there's a lot of stuff that's really annoying in one and nice and simple in the other. I'm sure simulations can be run in R, but it seems frightfully tricky. Recently I wrote a simple Tennis simulator...

## My take on the USA versus Western Europe comparison of GM corn

July 4, 2013
By

A few days ago I came across Jack Heinemann and collaborators’ article (Sustainability and innovation in staple crop production in the US Midwest, Open Access) comparing the agricultural sectors of USA and Western Europe‡. While the article is titled around the word sustainability, the main comparison stems from the use of Genetically Modified crops in

## Update: Extending Commodity time series

July 3, 2013
By

I showed an example of Extending Commodity time series back in 2012. Since then, the web site that I used to get the Thomson Reuters/Jefferies CRB Index data is no longer working. But there are a few alternatives: Thomson Reuters / Jefferies CRB Index. To get data, first select “TRJ/CRB Index-Total Return”, next click “See

## Using R and Integer Programming to find solutions to FlowFree game boards

July 3, 2013
By

Using R and Integer Programming to find solutions to FlowFree game boards What is FlowFree?A popular game (iOS/Android) on a square board with simple rules. As the website states: Connect matching colors with pipes to create a flow. Pair all color...

## Facts and fallacies of the AIC

July 3, 2013
By

Akaike’s Information Criterion (AIC) is a very useful model selection tool, but it is not as well understood as it should be. I frequently read papers, or hear talks, which demonstrate misunderstandings or misuse of this important tool. The following points should clarify some aspects of the AIC, and hopefully reduce its misuse. The AIC is a penalized likelihood,...

## Plan B

July 3, 2013
By

Thank goodness, I think that even if this statistician business turns out badly, I can still make a living with rafting (if only by begging for money, in exchange for looking ridiculous in the swim suit)... As part as my brother's stag do, we went...

## Fun with random effects in loss reserving

July 3, 2013
By

For some time now, I’ve advocated for the view that non-life loss reserving constitutes a categorized linear regression. I’ll emphasize that the idea of a linear regression isn’t remotely novel. Further, the categorization is the de facto approach. I’m merely recognizing it and suggesting instances where a decision may be made about the optimality of

## The R journal – Volume 5/1, June 2013

July 3, 2013
By

The new R Journal is out! Click for a complete table of content with links to all papers.

## The hat trick

July 3, 2013
By

In his book Quantum Computing Since Democritus, Scott Aaronson poses the following question: Suppose that you’re at a party where every guest is given a hat as they walk in. Each hat has either a pineapple or a watermelon on top, picked at random with equal probability. The guests don’t get to see the fruit