Go vector or go home

September 21, 2011
By

My programming experience progressed mostly along the lines of: C, C++, shell, Java, Java, Ruby, Python, Java, Java. Only recently have I started exploring the likes of Haskell, Erlang and R. Well that evolution bit me a little while back when I tried ...

Read more »

digest 0.5.1

September 21, 2011
By

A new version of the digest package (which generates hash function summaries for arbitrary (and possibly nested) R objects using any of the standard md5, sha-1, sha-256 or crc32 algorithms) is now on CRAN. Bryan Lewis, who is doing very stuff with ...

Read more »

Strangeloop 2011 Day 2

September 21, 2011
By
Strangeloop 2011 Day 2

I’m headed back home from Strangeloop 2011 this morning. Once again I booked an early flight so was up at 4:45 to get to the airport (when will I learn?) The conference was a smashing success as far as I am concerned. It was extremely well run and the talks were full of solid content.

Read more »

Handbook of Markov chain Monte Carlo

September 21, 2011
By
Handbook of Markov chain Monte Carlo

At JSM, John Kimmel gave me a copy of the Handbook of Markov chain Monte Carlo, as I had not (yet?!) received it. This handbook is edited by Steve Brooks, Andrew Gelman, Galin Jones, and Xiao-Li Meng, all first-class jedis of the MCMC galaxy. I had not had a chance to get a look at

Read more »

More facebook and google plus on the Graph Gallery

September 21, 2011
By
More facebook and google plus on the Graph Gallery

Following up on yesterday's post about facebook like box, I've added some more social things into the gallery. The main page gains a google plus "plus one" button, and each graph page now has a +1 button, a facebook like button, and a facebook comm...

Read more »

Simple plot using R

September 21, 2011
By
Simple plot using R

As a task for my Financial eco assignment I had to plot a simple time series of the overnight MIBOR(Mumbai interbank offer rates) for the past one year . The job could very well have been done easily in MS-Excel but I choose to plot it in R instea...

Read more »

Project Euler: problem 3

September 21, 2011
By
Project Euler: problem 3

The prime factors of 13195 are 5, 7, 13 and 29.What is the largest prime factor of the number 600851475143 ?This one was quite easy, and much easier in R as it turns out.The GNU Multi-Precision Library (GMP) is available as a package in R. So the only ...

Read more »

Variogram fit with RPanel

September 21, 2011
By
Variogram fit with RPanel

During the UseR 2011 conference I saw lots of examples of the use of RPanel to create a GUI in R. Yesterday, because I was a bit bored of the work I was doing I started thinking about this and I decided to try this package.My objective was to create a new panel with all the main setting for...

Read more »

A Note on Antoniak’s Approximation for Dirichlet Processes

September 21, 2011
By
A Note on Antoniak’s Approximation for Dirichlet Processes

Antoniak's 1974 article titled Mixtures of Dirichlet Processes with Applications to Bayesian Nonparametric Problems (Annals of Statistics 2(6):1152-1174) is a fundamental work for most modern developments in this area. The article gives two expressions for the expected number of distinct values in a sample of size n, drawn from a Dirichlet process-distributed probability distribution with

Read more »

Solvency 2 WordCloud

September 21, 2011
By

Slow day at PSY headquarters: Click see wordleWe grabbed the Solvency II directive text from the EC website (© European Union, http://eur-lex.europa.eu/) and ran it through a couple of lines of R code to draw up wordcount frequencies. Then we plotted the text in Wordlehttp://www.wordle.net/show/wrdl/4111834/Solvency_2We're not convinced about the utility of WordClouds, but they look cool....

Read more »

Example 9.6: Model comparison plots (Completed)

September 21, 2011
By
Example 9.6: Model comparison plots (Completed)

We often work in settings where the data set has a lot of missing data-- some missingness in the (many) covariates, some in the main exposure of interest, and still more in the outcome. (Nick describes this as "job security for statisticians").Some ana...

Read more »

Density exploration and Wang-Landau algorithms [with R package]

September 21, 2011
By
Density exploration and Wang-Landau algorithms [with R package]

Hey, Since a new paper that I’ve co-written has appeared on arXiv, here is a quick post summarizing it. The paper is named: An Adaptive Interacting Wang-Landau Algorithm for Automatic Density Exploration and describes improvements over the Wang-Landau algorithm described … Continue reading →

Read more »

Climate Reference Network: package crn 1.0

September 20, 2011
By
Climate Reference Network:  package crn 1.0

I’ve just finished and uploaded another climate data package for R. This one focuses on  CRN the climate Reference Network Here is their home page   The package for now is really simple, but all of the packages  I’m building are getting simpler. In the end ( whenever that is ) I think I’ll end

Read more »

Children height and blood pressure z-scores

September 20, 2011
By
Children height and blood pressure z-scores

Following on from some of my earlier posts, this is purely about, hopefully, saving some other people some time in putting this together. Height z-scores are required to then calculate the blood pressure z-scores. The CDC (Center for Disease Control … Continue reading →

Read more »

Facebook like button in Graph Gallery

September 20, 2011
By
Facebook like button in Graph Gallery

I've added facebook like button in the home page of the R Graph Gallery and on each image page, i.e. this one which I "like".

Read more »

Recession forecasting III: A Better Naive Forecast

September 20, 2011
By
Recession forecasting III: A Better Naive Forecast

In Recession Forecasting Part II, I compared the accuracy of Hussman's recession forecasts to the accuracy of a naive forecast that assumed the current state of the recession variable would continue next month. An anonymous comment...

Read more »

Package ‘intergraph’ (1.1-0) released!

September 20, 2011
By

I just released the first official version of the ‘intergraph’ R package. With the functions provided in the current version (1.1-0) you can convert network data objects between classes ‘igraph’ and ‘network’. The package supports directed and undirected networks, and handles the node, tie, and network (graph) attributes. Mutliplex networks (i.e., with possibly multiple ties

Read more »

StackExchange and CrossValidated: An Epidemiologist’s Review

September 20, 2011
By
StackExchange and CrossValidated: An Epidemiologist’s Review

This seems like as good a day as any to review CrossValidated, and the whole StackExchange constellation of websites. It’s been a month since I joined, exactly, and today I also crossed the 1,000 reputation threshold on the site. So why not give my impressions of it? First, how I got there in the first

Read more »

Use of Classification Trees to Investigate Traits of Invasive Species

September 20, 2011
By
Use of Classification Trees to Investigate Traits of Invasive Species

Which traits make an alien species invasive?Due to what traits an alien species becomes established in a foreign flora?This kind of questions could be analysed by the use of recursive partitioning and classification trees..(the below example also inclu...

Read more »

Cricket All Round Performances

September 19, 2011
By

In cricket a player who can perform well with both the bat and bowl is a great asset for any team and across the history of international cricket there have been a number of cricketers that hall into this bracket. It is difficult to specify a set of criteria to determine whether a player can

Read more »

About commercial publishers

September 19, 2011
By
About commercial publishers

Julien Cornebise has pointed out a recent Guardian article. It is about commercial publishers of academic journals, mainly Elsevier, Springer, and Wiley, with a clear stand from its title: “Academic publishers make Murdoch look like a socialist“! The valuable argument therein is that academic publishers make hefty profits (a 40% margin for Elsevier!)

Read more »

Using jri to connect JAVA to R

September 19, 2011
By

The R package rJava allows R to be accessed in Java programs. The part of the package that allows this is jri. The notes on the rJava site about getting jri to work didn’t help me much getting it to … Continue reading →

Read more »

R 2.14 to be released on October 31; R 2.13 patch on September 13

September 19, 2011
By

The next major release of R has been announced: R 2.14.0 is scheduled for October 31. Details are still coming in about the new features planned for this release, but R core member Luke Tierney has revealed some of the performance improvements expected, and R core member Brian Ripley has spoken of forthcoming low-level support for multi-threaded computing and...

Read more »

Appendable saving in R

September 19, 2011
By

One of the most crucial problems in HPC is that every error you make have much greater impact than in the normal computing — there is nothing more amusing than finding out that few-day simulation broke few minutes before the end because of an unfortunate value thrown by a random generator, typo in result saving code or

Read more »

Three free books for better programming in R (and any other language)

September 19, 2011
By

Like many users and producers of R packages, I have never had any formal training in computer science. I’ve come to to the conclusion that this is a serious omission in a professional researcher’s training. Computer scientists and professional hackers … Continue reading →

Read more »

rgdal + raster + RCurl = My next package

September 18, 2011
By
rgdal + raster + RCurl = My next package

This package has been a long time in the making.  In the end it’s more of a data package than a functional package, but pulling all the pieces together required me to learn some really cool packages: raster ( which I already knew ) rgdal and RCurl.  I’ll provide a littel bit of an overview

Read more »

DTW: dynamic time warping 动态时间规整

September 18, 2011
By

Basically, DTW (dynamic time warping) is an algorithm to output cumulative distance of two time sequences, which is widely used e.g. for classification and clustering.For example, when using k-mean for clustering, we can use DTW as distance function. Here is one of such nice instances (using R: http://www.rdatamining.com/examples/ts-mining)Relevant information from Anshul's email.  A review of DTW http://csdl.ics.hawaii.edu/techreports/08-04/08-04.pdfCode:Python code: https://mlpy.fbk.eu/R...

Read more »

Map the distribution of your sample by geolocating ip addresses or zip codes

September 18, 2011
By
Map the distribution of your sample by geolocating ip addresses or zip codes

Yesterday I wanted to create a map of participants from a study on social media and partisan selective exposure that Sean Westwood and I ran recently, with participants from Amazon’s Mechanical Turk.  We recorded ip addresses for each Turker participant, so … Continue reading →

Read more »

Implementation of the CDC Growth Charts in R

September 17, 2011
By

I implemented in R a function to re-create the CDC Growth Chart, according to the data provided by the CDC.In order to use this function, you need to download the .rar file available at this megaupload link.Mirror: mediafire link.Then unrar the file, a...

Read more »