A blog by Rob J Hyndman 

Twitter Gplus RSS

Removing white space around R figures

Published on 22 February 2013

When I want to insert fig­ures gen­er­ated in R into a LaTeX doc­u­ment, it looks bet­ter if I first remove the white space around the fig­ure. Unfor­tu­nately, R does not make this easy as the graphs are gen­er­ated to look good on a screen, not in a document.

There are two things that can be done to fix this prob­lem. (more…)

 
7 Comments  comments 

Forecasting conferences

Published on 15 February 2013

This year there are no less than three fore­cast­ing con­fer­ences planned for June and July 2013. As well as the annual Inter­na­tional Sym­po­sium on Fore­cast­ing, there is WIPFOR (Work­shop on Indus­try & Prac­tices for FORe­cast­ing) to be held in Cla­mart (near Paris) in June, and a fore­cast­ing stream at the EURO2013 con­fer­ence in Rome in early July. Some details fol­low, taken from emails sent to me recently. (more…)

 
No Comments  comments 

Hyndsight

Published on 14 February 2013

Orig­i­nally, I wrote this blog for my own PhD stu­dents and I cov­ered issues to do with research. I called it “Research tips” because that is what it was meant to be.

How­ever, over time I’ve started cov­er­ing other things of inter­est to me, and the read­er­ship has grown way beyond what I ever expected. So I decided it was time to acknowl­edge the change of focus with a change of name. Hyn­d­sight is intended to cover my reflec­tions on any­thing to do with sta­tis­tics, fore­cast­ing, research, tech­nol­ogy, or what­ever else I’m think­ing about at the time that is some­how related to my job as a Pro­fes­sor of Statistics.

All the old links should still work as I have set up a redi­rec­tion from researchtips to hyn­d­sight. But if you find some­thing is bro­ken, please let me know.

 
No Comments  comments 

Out-​​of-​​sample one-​​step forecasts

Published on 14 February 2013

It is com­mon to fit a model using train­ing data, and then to eval­u­ate its per­for­mance on a test data set. When the data are time series, it is use­ful to com­pute one-​​step fore­casts on the test data. For some rea­son, this is much more com­monly done by peo­ple trained in machine learn­ing rather than statistics.

If you are using the fore­cast pack­age in R, it is eas­ily done with ETS and ARIMA mod­els. For example:

library(forecast)
fit <- ets(trainingdata)
fit2 <- ets(testdata, model=fit)
onestep <- fitted(fit2)

Note that the sec­ond call to ets does not involve the model being re-​​estimated. Instead, the model obtained in the first call is applied to the test data in the sec­ond call. This works because fit­ted val­ues are one-​​step fore­casts in a time series model.

The same process works for ARIMA mod­els when ets is replaced by Arima or auto.arima. Note that it does not work with the arima func­tion from the stats pack­age. One of the rea­sons I wrote Arima (in the fore­cast pack­age) is to allow this sort of thing to be done.

 
11 Comments  comments 

Statistical consulting in Australia

Published on 11 February 2013

There must be dozens of sta­tis­ti­cal con­sult­ing busi­nesses and orga­ni­za­tions in Aus­tralia, each spe­cial­iz­ing in dif­fer­ent areas.

I do some con­sult­ing work myself, mostly in the fore­cast­ing area, but some­times in other areas of applied sta­tis­tics includ­ing expert wit­ness work in court cases. Email me if you have a project you would like me to take on. How­ever, I often refer poten­tial clients to other sta­tis­ti­cal con­sult­ing groups, as I only have a lim­ited amount of time I can spend on con­sult­ing projects. (more…)

 
1 Comment  comments 

Statistical consulting with Zombal

Published on 9 February 2013

This is a guest post by Bene­dict Noel of Zom­bal. Many sta­tis­ti­cians do a lit­tle bit of con­sult­ing in addi­tion to their main job, and Zom­bal pro­vides a way for peo­ple to find such work. (more…)

 
No Comments  comments 

Batch forecasting in R

Published on 7 January 2013

I some­times get asked about fore­cast­ing many time series auto­mat­i­cally. Here is a recent email, for example:

I have looked but can­not find any info on gen­er­at­ing fore­casts on mul­ti­ple data sets in sequence. I have been using analy­sis ser­vices for sql server to gen­er­ate fit­ted time series but it is too much of a black box (or I don’t know enough to tweak/​manage the inputs). In short, what pack­age should I research that will allow me to load data, gen­er­ate a fore­cast (pre­sum­ably best fit), export the fore­cast then repeat for a few thou­sand items. I have read that R does not like ‘loops’ but not sure if the cur­rent cpu power off­sets that or not. Any guid­ance would be greatly appre­ci­ated. Thank you!!

(more…)

 
8 Comments  comments 

Man vs Wild Data

Published on 21 December 2012

I’m speak­ing on this topic at the Young Sta­tis­ti­cians Con­fer­ence, 7–8 Feb­ru­ary 2013.

If you’re a young sta­tis­ti­cian and live in Aus­tralia, please book in. It promises to be a great cou­ple of days. Early reg­is­tra­tions close on 2 January.

Abstract for my talk:

For 25 years I have been an intre­pid sta­tis­ti­cal con­sul­tant, tack­ling the wild fron­tiers of real data, real prob­lems and real time con­straints. I have faced prob­lems rang­ing from lin­guis­tics to river beds, from mak­ing paper plates to sell­ing pies at the MCG, from tax office audits to sur­veys about the colour pur­ple. Uni­ver­sity edu­ca­tion helps pre­pare you to be a sta­tis­ti­cal con­sul­tant in the same way that Google maps helps pre­pare you to cross the Simp­son Desert. You have some idea of the main fea­tures, but when you get there, noth­ing looks familiar.

I will describe some of my adven­tures, and explain how to bluff your way through igno­rance, work with inad­e­quate tools, and deal with smelly clients. I will tell you the story of the client who wouldn’t give me the data, the client who wouldn’t tell me the prob­lem, and the client who wanted all meet­ings held at ran­dom loca­tions for secu­rity reasons.

Along the way we will learn about the skills that sta­tis­ti­cians need to sur­vive in the wild.

 
No Comments  comments 

forecast package v4.0

Published on 3 December 2012

A few days ago I released ver­sion 4.0 of the fore­cast pack­age for R. There were quite a few changes and new fea­tures, so I thought it deserved a new ver­sion num­ber. I keep a list of changes in the Changelog for the pack­age, but I doubt that many peo­ple look at it. So for the record, here are the most impor­tant changes to the fore­cast pack­age made since v3.0 was released. (more…)

 
22 Comments  comments 

SimpleR tips, tricks and tools

Published on 21 November 2012

I gave this talk last night to the Mel­bourne Users of R Net­work. (more…)

 
10 Comments  comments