Example 7.25: compare draws with distribution

March 5, 2010
By
Example 7.25: compare draws with distribution

In example 7.24, we demonstrated a Metropolis-Hastings algorithm for generating observations from awkward distributions. In such settings it is desirable to assess the quality of draws by comparing them with the target distribution.Recall that the dis...

Read more »

Getting data from an image (introductory post)

March 5, 2010
By
Getting data from an image (introductory post)

Hi there! This blog will be dedicated to data visualization in R. Why? Two reasons. First, when it comes to statistics, I am always starting by some exploratory analyses, mostly with plots. And when I handle large quantities of data, it’s nice to make some graphs to get a grasp about what is going on.

Read more »

Accessing Climate Change Data and a Custom Panel Function for Filled Polygons

March 4, 2010
By
Accessing Climate Change Data and a Custom Panel Function for Filled Polygons

GCS Model Grids Recently finished some collaborative work with Vishal, related to visualizing climate change data for the SEI. This project was funded in part by the California Energy Commission, with additional technical support from the Google Earth Team. One of the final products was an...

Read more »

An email about mixtures

March 4, 2010
By
An email about mixtures

As a coincidence, or not, I received the following email just before starting our mixture estimation workshop (the above is Ben Nevis on Monday, whose skyline really looks like a three component mixture!) and giving a discussion on label switching: I am implementing a Markov-Chain Monte Carlo method for Gibbs sampling from a simple mixture

Read more »

Yet Another plyr Example

March 4, 2010
By
Yet Another plyr Example

another plyr example quantiles (0.05, 0.25, 0.5, 0.75, 0.95) of DSC by temperature bin There are plenty of good examples on how to use functions from the plyr package. Here is one more, demonstrating how to use ddply with a custom function. Note that there...

Read more »

More on the Economist’s special report on big data

March 4, 2010
By

I totally missed this the other day, but there's much more to that special report on the data deluge in The Economist. (Thanks to readers SB and DN for pointing this out.) There's an total of nine articles in the report (you can find them all in the Related Items box on this page), including a section on business...

Read more »

New Le Monde puzzle

March 3, 2010
By
New Le Monde puzzle

When I first read Le Monde puzzle this weekend, I though it was even less exciting than the previous one: find and , such that is a multiple of . The solution is obtained by brute-force checking through an R program: and then the a next solution is (with several values for N). However, while

Read more »

Quality trimming in R using ShortRead and Biostrings

March 3, 2010
By

I wrote an R function to do soft-trimming, right clipping FastQ reads based on quality.This function has the option of leaving out sequences trimmed to extinction and will do left-side fixed trimming as well.#softTrim#trim first position lower than minQuality and all subsequent positions#omit sequences that after trimming are shorter than minLength#left trim to firstBase, (1 implies no left trim)#input:...

Read more »

Quality trimming in R using ShortRead and Biostrings

March 3, 2010
By

I wrote an R function to do soft-trimming, right clipping FastQ reads based on quality.This function has the option of leaving out sequences trimmed to extinction and will do left-side fixed trimming as well.#softTrim#trim first position lower than minQuality and all subsequent positions#omit sequences that after trimming are shorter than minLength#left trim to firstBase, (1 implies no left trim)#input:...

Read more »

Example of plotting a serial position curve in R

March 3, 2010
By
Example of plotting a serial position curve in R

A while ago I wrote a co-wrote chapter for an introductory psychology text book Essential Psychology: A Concise Introduction. This is a book edited and written by members of the department where I work. My contribution was the chapter on huma...

Read more »

R-bloggers (with ~50 blogs) has just crossed the 1000 subscribers mark!

March 3, 2010
By
R-bloggers (with ~50 blogs) has just crossed the 1000 subscribers mark!

I am very happy to discover so many of you readers are interested in the content that bloggers are posting about R. Over the past few months, 50 bloggers have come together in this place to share with all of us what they write about R. If you wish, you can see all of the articles they wrote in...

Read more »

Intelligent Enterprise: You Can Predict that R Will Succeed

March 3, 2010
By

Analyst David Stodder at Intelligent Enterprise also noted the activity around R at the recent Predictive Analytics World conference in San Francisco, and he reviews his impressions in a column today. In fact, he attributes the increasing prominence of predictive analytics to R: Possibly the most important factor influencing the spread of predictive analytics is the growing popularity of...

Read more »

Arrange multiple ggplot2 plots in the same image window

March 3, 2010
By

In a previous tutorial I showed you how to create plots faceted by the level of a third variable using ggplot2. A commenter asked about using faceted plots and viewports and reminded me of this function I found in the ggplot2 Google group. The arrange function below is similar to using par(mfrow=c(r,c)) in base graphics to put more than...

Read more »

Augmented support for complex survey designs in R

March 3, 2010
By
Augmented support for complex survey designs in R

We'll get back to code examples later this week, but wanted to let you know about an R package with updated functionality in the meantime.The appropriate analysis of sample surveys requires incorporation of complex design features, including stratification, clustering, weights, and finite population correction. These can be address in SAS and R for many common models. Section...

Read more »

Analyzing Google’s Winter Olympics Search Traffic with R

March 2, 2010
By
Analyzing Google’s Winter Olympics Search Traffic with R

The Official Google Blog today includes an analysis of Google's search traffic related to the recently-concluded Winter Olympics, correlating various high-profile events with searches from particular countries. For example, traffic from the United States shows the expected diurnal cycle but with promintent peaks for the opening ceremony and the hockey matches featuring the USA team: It's not specifically stated...

Read more »

MySQL alum Zack Urlocker join’s REvolution’s board

March 2, 2010
By

As you might have heard from this morning's press release, we've just welcomed a new member to REvolution's board of directors: Zack Urlocker. Zack has an impeccable open-source pedigree: until recently, he was responsible for engineering and marketing at MySQL, the wildly successful open-source database company recently acquired by Oracle (via its acquisition of Sun). Zack is also a...

Read more »

ACM Data Mining Camp, March 20

March 2, 2010
By

Following last year's successful unconference on data mining, the Bay Area Association for Computing Machinery (ACM) will again host the 2010 ACM Data Mining Camp on March 20 in San Jose, CA. The event is free and runs from 11:15am - 7:30pm, with an optional 2-hour pre-camp training in the morning. (REvolution Computing is a proud sponsor of this...

Read more »

The Economist reports on the information explosion

March 1, 2010
By

The current edition of The Economist includes a "special report on managing information", targeting the issue of the information explosion / data deluge / whatever you want to call it these days. It includes the usual attributes of the problem: data is being collected faster than we can store it, astronomers are creating petabytes of data daily, the usual....

Read more »

REvolution Computing hiring parallel computing developer

March 1, 2010
By

We're looking for a programmer with experience in high-performance computing and the R system to work on the ParallelR suite and other data-analysis projects. Sound like anyone you know? Check out the details at the link below. REvolution Computing careers: Parallel Computing Developer

Read more »

Example 7.24: Sampling from a pathological distribution

March 1, 2010
By
Example 7.24:  Sampling from a pathological distribution

Evans and Rosenthal consider ways to sample from a distribution with density given by:f(y) = c e^(-y^4)(1+|y|)^3where c is a normalizing constant and y is defined on the whole real line.Use of the probability integral transform (section 1.10.8) is not feasible in this setting, given the complexity of inverting the cumulative density function.The Metropolis--Hastings algorithm is a Markov...

Read more »

Bayes fits the data less closely than maximum likelihood

March 1, 2010
By

Lluis Bermudez writes: I'm from University of Barcelona and I've using "arm" package to obtain posterior estimates of glm parameters. I usually worked with "glm" function, but I need more than a point estimation. The problem is that when using...

Read more »

Bayes fits the data less closely than maximum likelihood

March 1, 2010
By

Lluis Bermudez writes: I'm from University of Barcelona and I've using "arm" package to obtain posterior estimates of glm parameters. I usually worked with "glm" function, but I need more than a point estimation. The problem is that when using...

Read more »

End of the month investment

March 1, 2010
By
End of the month investment

It is know, that the first day of the month provides bullish edge. According to Quantifiable edges not all the months are equal. So, I made a test on S&P500 index, from January, 1980 until February, 2010. It is true, March isn’t the best month to run this strategy. Only 3 months have significant results

Read more »

How to use mcsm

February 27, 2010
By
How to use mcsm

Within the past two days, I received this email Dear Prof.Robert I have just bought your recent book on Introducing Monte Carlo Methods with R.  Although I have checked your web page for the R programs (bits of the code in the book, codes for generating the figures and tec – not the package available

Read more »

Calculating LT50 (median lethal temperature, aka LD50) quickly in R

February 27, 2010
By

Say you’ve got a bunch of survival/mortality data from an experiment. Maybe you exposed batches of snails to various high temperatures for a few hours, and recorded the number alive and dead in each batch at the end. Now you’d like to repor...

Read more »

Be Careful Searching Python Dictionaries!

February 27, 2010
By
Be Careful Searching Python Dictionaries!

For my talk on High Performance Computing in R (which I had to reschedule due to a nasty stomach bug), I used Wikipedia linking data, an adjacency list of articles and the articles to which they link. This data was linked from DataWrangling and was originally created by Henry Haselgrove. The dataset is small on disk, but I needed...

Read more »

An interesting paper

February 27, 2010
By
An interesting paper

Ben Bolker has an interesting paper (outline of a paper) comparing different approaches to estimate GLMM in R environment, which is very helpful to what I am doing right now.The paper pointed out the following options to fit GLMM using R:glmerglmmMLglm...

Read more »

oro.dicom 0.2.4

February 26, 2010
By
oro.dicom 0.2.4

The R package oro.dicom is a major revision, and improvement, on the previous package DICOM.  New features includeIncreased speedUploading only header information (for restricted memory)Reading implicit value representations (VR's)Parsing SequenceItem tags (undefined lengths are allowed)Integration with oro.nifti to convert DICOM to NIfTIProvided below is a straightforward application of the oro.dicom package to an...

Read more »

oro.dicom 0.2.4

February 26, 2010
By
oro.dicom 0.2.4

The R package oro.dicom is a major revision, and improvement, on the previous package DICOM.  New features include Increased speed Uploading only header information (for restricted memory) Reading implicit value representations (VR's) Parsing SequenceItem tags (undefined lengths are allowed) Integration with oro.nifti to convert DICOM to NIfTI Provided below is a straightforward application of the oro.dicom package to an...

Read more »