Three tips for posting good questions to R-help and Stack Overflow

January 18, 2011
By

As the number of R users and contributed packages increases, activity on the R-help mailing list and the R tag on Stack Overflow also continues to rise. Users with the knowledge to help those asking questions naturally have limited time to ass...

Read more »

Example 8.21: latent class analysis

January 18, 2011
By
Example 8.21: latent class analysis

Latent class analysis is a technique used to classify observations based on patterns of categorical responses. Collins and Lanza's book,"Latent Class and Latent Transition Analysis," provides a readable introduction, while the UCLA ATS center has an o...

Read more »

Workflow and the Emacs Starter Kit for the Social Sciences

January 18, 2011
By

Because the next official release of Emacs will finally have a built-in package management system, I've been able to update the Emacs Starter Kit for the Social Sciences to make it easier to set up. AucTeX is now installed directly as a package, and so...

Read more »

Workflow and the Emacs Starter Kit for the Social Sciences

January 18, 2011
By

Because the next official release of Emacs will finally have a built-in package management system, I’ve been able to update the Emacs Starter Kit for the Social Sciences to make it easier to set up. AucTeX is now installed directly as a package, and so is ESS. While the AucTeX package is official, I host

Read more »

The Clipboard can be Your Friend

January 17, 2011
By
The Clipboard can be Your Friend

One of the features I feel that I don’t leverage enough, particularly for ad-hoc questions, is the clipboard feature  in R. I know there are many ways to use it –  as I have been exposed to a few –  but the example below, even without context, should get you thinking about how awesome R

Read more »

R and Google Visualization API: Fish harvests

January 17, 2011
By
R and Google Visualization API: Fish harvests

I recently gathered fish harvest data from the U.S. National Oceanic and Atmospheric Administarion (NOAA), which I downloaded from Infochimps. The data is fish harvest by weight and value, by species for 21 years, from 1985 to 2005. Here is a link to a google document of the data I used below: https://spreadsheets.google.com/ccc?key=0Aq6aW8n11tS_dFRySXQzYkppLXFaU2F5aC04d19ZS0E&hl=en################# Fish harvest data...

Read more »

R and Google Visualization API: Wikispeedia

January 17, 2011
By
R and Google Visualization API: Wikispeedia

Wikispeedia is a website trying to gather all speed limit signs on Earth.  I recently created a Google Visualization for some of their data, specifically on speed limit signs that change speed throughout the day.Check it out here: http://grou...

Read more »

R Advertised

January 17, 2011
By

The R language is definitely going mainstream:...

Read more »

The Joy of Sweave – A Beginner’s Guide to Reproducible Research with Sweave

January 17, 2011
By
The Joy of Sweave – A Beginner’s Guide to Reproducible Research with Sweave

Just wrapped up the slides for the first version of the The Joy of Sweave – A Beginner’s Guide to Reproducible Research with Sweave which I presented today in our lab. I am making the slides available under a Creative Commons … Continue reading →

Read more »

Valuation of CDO with equal amount

January 17, 2011
By

Bank of Japan(BOJ) publish research paper regularly.And, they issued very interesting paper about valuation of CDO recently.(The paper is 金融危機時における資産価格変動の相互依存関係:コピュラに基づく評価 新谷 幸平、山田 哲也、吉羽 要直(sorry,japanese only!))They introduced copula for pricing of CDO,and discussed how different CDO spreads were with using different copula for pricing.I would like to reproduce their result (especially,P23-Table7)The condition of calculation is following thatnumber of debt(NUM.REFDEBT):=100maturity(MATURITY):=5 yearrecovery rate(RECOVERY.RATE):=40%(constant value)probability of default (DEFAULT.PROBABILITY):=5%(in...

Read more »

Valuation of CDO with equal amount

January 17, 2011
By

Bank of Japan(BOJ) publish research paper regularly.And, they issued very interesting paper about valuation of CDO recently.(The paper is 金融危機時における資産価格変動の相互依存関係:コピュラに基づく評価 新谷 幸平、山田 哲也、吉羽 要直(sorry,japanese only!)) They introduced copula for pricing of CDO,and discussed how different CDO spreads were with using different copula for pricing.I would like to reproduce their result (especially,P23-Table7)The condition of calculation is following that number of debt(NUM.REFDEBT):=100 maturity(MATURITY):=5 year recovery rate(RECOVERY.RATE):=40%(constant value) probability of default (DEFAULT.PROBABILITY):=5%(in...

Read more »

Workflow and the Emacs Starter Kit for the Social Sciences

January 17, 2011
By

Because the next official release of Emacs will finally have a built-in package management system, I’ve been able to update the Emacs Starter Kit for the Social Sciences to make it easier to set up. AucTeX is now installed directly as a package, and so is ESS. While the AucTeX package is official, I host...

Read more »

Séminaire à Lyon

January 17, 2011
By
Séminaire à Lyon

Next week, I am going to Lyon to give a seminar in Université Lyon I. I will talk about the recent Rao-Blackwellisation papers we wrote, hopefully managing to make sense with both statisticians and probabilists, unlike in recent talks of mine in probability seminars… The slides are close to those I presented in Wharton last

Read more »

Review: R in a Nutshell by Joseph Adler

January 17, 2011
By
Review: R in a Nutshell by Joseph Adler

Summary: Very comprehensive and very useful, but not good for a beginner. Great book though – definitely has a place on my bookshelf. Reference: Adler, J., 2010, R in a Nutshell, O’Reilly, Sebastopol, CA, 611 pages  O’Reilly Link After reviewing a book about R designed for beginners (see my previous post) I thought I’d step

Read more »

In case you missed it: December Roundup

January 17, 2011
By

In case you missed them, here are some articles from December of particular interest to R users. A Facebook employee created a beautiful visualization of social connections around the world, which made a lot of news on the Web. The creator, Paul Butler, explained how he did it using R. With sponsorship from Revolution Analytics, the R/Finance conference in...

Read more »

Keeping simple things simple

January 17, 2011
By

My friend Jeff deserves a sincere congratulation for finally unveiling his rebranded R consultancy Lemnica. One notable feature of the new website is a section called esoteric R which discusses less frequently-visited corners of the R world. It even b...

Read more »

R Tutorial Series: Two-Way Omnibus ANOVA

January 17, 2011
By
R Tutorial Series: Two-Way Omnibus ANOVA

As with the one-way case, testing the omnibus hypothesis via two-way ANOVA is simple process in R. This tutorial will explore how R can be used to perform a two-way ANOVA to test the difference between two (or more) group means. Tutorial FilesBefore we...

Read more »

R Tutorial Series: Two-Way Omnibus ANOVA

January 17, 2011
By
R Tutorial Series: Two-Way Omnibus ANOVA

As with the one-way case, testing the omnibus hypothesis via two-way ANOVA is simple process in R. This tutorial will explore how R can be used to perform a two-way ANOVA to test the difference between two (or more) group means. Tutorial FilesBefore we...

Read more »

Introducing Monte Carlo Methods with R [precision]

January 17, 2011
By
Introducing Monte Carlo Methods with R [precision]

Doug Rivers, professor of Political Sciences in Stanford, kindly sent me this email yesterday night: The 2nd displayed equation in section 2.1.2 on p. 44 is garbled (it might be interpreted as saying that U and X have the same distribution). I think you intended: And indeed we should have stated the implicit convention that

Read more »

Normal market accidents

January 17, 2011
By
Normal market accidents

We think of accidents as abnormal events, but there is “normal accident” theory.  We don’t think of accidents happening in markets, but they do.  That’s why it’s called a market crash. For normal accidents to come into play, two conditions need to hold: the system is complex the system is tightly coupled Certainly the financial … Continue reading...

Read more »

Méthodes de Monte-Carlo avec R [out]

January 17, 2011
By
Méthodes de Monte-Carlo avec R [out]

The translation of the book Introducing Monte Carlo Methods with R is now published and out! I have received five copies in the mail yesterday, although it was not produced in time for my R class students to get it before the exam today. The book is still indicated on amazon.com as appearing in February,

Read more »

Dial-a-statistic! Featuring R and Estonia

January 16, 2011
By
Dial-a-statistic! Featuring R and Estonia

Did you wake up this morning hoping that you would be able to listen to telephone beeps inspired by Estonian web site metrics? I knew you did! First things first: I came up with the slightly crazy idea of using the bleepy sounds that telephones make, called “dual-tone multifrequency” (DTMF) tones, as a tool in

Read more »

Climate Charts, Data and RClimate Scripts

January 16, 2011
By
Climate Charts, Data and RClimate Scripts

While there are many online climate data resources, the source data files are in numerous data formats, presenting a challenge to climate citizen scientists who want to retrieve and analyze several climate indicators at the same time. I have been &#823...

Read more »

Plotting overbought / oversold regions in R

January 16, 2011
By
Plotting overbought / oversold regions in R

The good folks at Bespoke Investment Group frequently show charts of so-called overbought or oversold levels; see e.g. here for the most recent global markets snapshot. Classifying markets as overbought or oversold is a popular heuristic. It starts...

Read more »

When 1 * x != x

January 16, 2011
By
When 1 * x != x

Trying to dimly recall things from my maths degree, it seems that in most contexts the whole point of the number one is that it is a multiplicative identity. That is, for any x in your set, 1 * x is equal to x. It turns out that when you move to floating point numbers,

Read more »

Dona eis Python, whap!

January 15, 2011
By

Well, I'm taking the plunge and learning Python. We'll see how this goes. Then I'll try NumPy (and SciPy, if it gets ported), and see of I can get R and Python talking.

Read more »

Missing reference in Monte Carlo Statistical Methods

January 15, 2011
By
Missing reference in Monte Carlo Statistical Methods

A few days ago, Peng Yu sent me this email Dear Prof. Robert, The citation Edwards and Sokal (1988) appears on page 326 of your book MCSM2. However, I don’t find in in the Reference section (it would have appear on page 601 if it is in the reference section). I don’t find this error

Read more »

A lightweight object browser for R

January 15, 2011
By

Get access to a simple object browser in R so that you can see what variables, data frames, model objects and other junk you have in memory currently. If you don't want to install a full-fledged integrated development environment, this option may be fo...

Read more »

Easiest way to start imagining four-dimensional things is by…

January 15, 2011
By
Easiest way to start imagining four-dimensional things is by…

Easiest way to start imagining four-dimensional things is by numbering the corners of a 4-cube. First realize that the eight corners of a cube can be numbered “in binary” 000—001–010–100—110–101–011—111. Just like the four corners of ...

Read more »