A blog by Rob J Hyndman 

Twitter Gplus RSS

Blog aggregators

Published on 15 May 2012

A very use­ful way of keep­ing up with blogs in a par­tic­u­lar area is to sub­scribe to a blog aggre­ga­tor. These will syn­di­cate posts from a large num­ber of blogs and pro­vide links back to the orig­i­nal sources. So you only need to sub­scribe once to get all the good stuff in that area.

There are now sev­eral blog aggre­ga­tors avail­able that might be of inter­est to read­ers here. And this blog is now syn­di­cated on sev­eral other sites includ­ing those listed below. (more…)

 
1 Comment  comments 

Global Energy Forecasting Competition

Published on 14 May 2012

Fore­cast­ing com­pe­ti­tions are a great way to test new meth­ods and obtain a real­is­tic eval­u­a­tion of how good they are. So I’m delighted that the IEEE is orga­niz­ing an energy fore­cast­ing com­pe­ti­tion as out­lined by Tao Hong below. (more…)

 
No Comments  comments 

Seeking help

Published on 8 May 2012

Every day I receive emails, or com­ments on this blog, ask­ing for help with R, fore­cast­ing, LaTeX, pos­si­ble research top­ics, how to install soft­ware, or some other thing I’m sup­posed to know some­thing about. Unfor­tu­nately, I can­not pro­vide a one-​​man help ser­vice to the rest of the world. I used to reply to all the requests explain­ing where to go for help, but I stopped reply­ing a while ago as it took too much time to do even that.

If you want help, please ask at either stats​.stack​ex​change​.com (for R or sta­tis­tics ques­tions) or tex​.stack​ex​change​.com (for LaTeX questions).

Unless you are one of my stu­dents, the only ques­tions I will answer are ones that con­cern my R pack­ages or research papers. And even then, I won’t reply if the answer is in the help files. I write those help files for a rea­son, so please read them.

I’m sorry I can’t do more, but if I did every­thing peo­ple ask me to do, I’d never write any papers or pro­duce any R pack­ages, and I think that’s a bet­ter use of my time.

 
2 Comments  comments 

Measuring time series characteristics

Published on 2 May 2012

A few years ago, I was work­ing on a project where we mea­sured var­i­ous char­ac­ter­is­tics of a time series and used the infor­ma­tion to deter­mine what fore­cast­ing method to apply or how to clus­ter the time series into mean­ing­ful groups. The two main papers to come out of that project were:

  1. Wang, Smith and Hyn­d­man (2006) Characteristic-​​​​based clus­ter­ing for time series data. Data Min­ing and Knowl­edge Dis­cov­ery, 13(3), 335–364.
  2. Wang, Smith-​​Miles and Hyn­d­man (2009) “Rule induc­tion for fore­cast­ing method selec­tion: meta-​​​​learning the char­ac­ter­is­tics of uni­vari­ate time series”, Neu­ro­com­puting, 72, 2581–2594.

I’ve since had a lot of requests for the code which one of my coau­thors has been help­fully email­ing to any­one who asked. But to make it eas­ier, we thought it might be help­ful if I post some updated code here. This is not the same as the R code we used in the paper, as I’ve improved it in sev­eral ways (so it will give dif­fer­ent results). If you just want the code, skip to the bot­tom of the post. (more…)

 
16 Comments  comments 

LaTeX templates

Published on 9 April 2012

Some of the most pop­u­lar pages on this site are my LaTeX tem­plates: for a cur­ricu­lum vitae, a beamer poster, a beamer talk, Monash Uni­ver­sity work­ing paper and a Monash Uni­ver­sity the­sis. Almost all new LaTeX users begin with tem­plates, so it is sur­pris­ing that there aren’t more good tem­plates around to get peo­ple started.

Now there is a great new web­site for LaTeX tem­plates: www​.latex​tem​plates​.com. There are some nice tem­plates for let­ters, lab reports, cal­en­dars, the­ses, assign­ments, essays, and CVs.  The tem­plates are well-​​structured with lots of com­ments to make it easy to under­stand how they work, and to make mod­i­fi­ca­tions. Even expe­ri­enced LaTeX­ers will prob­a­bly learn some new tricks and new pack­ages from brows­ing the templates.

 
Tags:
3 Comments  comments 

Google scholar metrics

Published on 2 April 2012

Google has pro­duced another great tool for researchers, this time pro­vid­ing some met­rics on jour­nal cita­tions. Google Scholar Met­rics allows you to search on jour­nals rather than arti­cles, and to see the aver­age or median h-​​index for each journal.

For exam­ple, a search on “fore­cast­ing” yields the fol­low­ing results:

(more…)

 
Tags:
2 Comments  comments 

Forecasts and ggplot

Published on 23 March 2012

The fore­cast pack­age uses the base R graph­ics for all plots, but some peo­ple may pre­fer to use the nice graph­ics avail­able using the ggplot2 package.

In the fol­low­ing two posts, Frank Dav­en­port shows how it can be done:

  1. Plot­ting fore­cast() objects in ggplot part 1: Extract­ing the Data
  2. Plot­ting fore­cast() objects in ggplot part 2: Visu­al­ize Obser­va­tions, Fits, and Forecasts

 

 
Tags: ,
2 Comments  comments 

XeLaTeX with TeXstudio

Published on 6 March 2012

XeLa­TeX is a replace­ment for pdfLa­TeX that allows you to use the fonts on your com­puter (rather than only those fonts that come with your tex sys­tem). How­ever, TeXs­tu­dio is not set up to use XeLa­TeX yet.

For­tu­nately, it is not dif­fi­cult. Go to Options/​Commands where all the com­mands used by TeXs­tu­dio are spec­i­fied. You prob­a­bly don’t need stan­dard LaTeX these days, so replace the LaTeX com­mand with the following.

xelatex -interaction=nonstopmode %.tex

Then click OK.

Now the LaTeX but­ton at the top of the screen is mapped to XeLa­TeX rather than stan­dard LaTeX. You can still access pdfLa­TeX via its but­ton for your non-​​XeLaTeX files.

Before any­one com­ments that you need stan­dard LaTeX for when eps graph­ics are used, see Con­vert­ing eps to pdf.

 
Tags: ,
3 Comments  comments 

Data visualization

Published on 5 March 2012

For those who have not read the sem­i­nal works of Tufte and Cleve­land, please hang your heads in shame. To sal­vage some sense of self-​​worth, you can then head over to Solomon Messing’s blog where he is start­ing a series on data visu­al­iza­tion based on the prin­ci­ples devel­oped by Tufte and Cleve­land (with R examples).

The clas­sics are also worth read­ing, and remain rel­e­vant despite the 20 or 30 years that have elapsed since they appeared.

 
1 Comment  comments 

Exponential smoothing and regressors

Published on 28 February 2012

I have thought quite a lot about includ­ing regres­sors (i.e. covari­ates) in expo­nen­tial smooth­ing (ETS) mod­els, and I have done it a cou­ple of times in my pub­lished work. See my 2008 expo­nen­tial smooth­ing book (chap­ter 9) and my 2008 Tourism Man­age­ment paper. How­ever, there are some the­o­ret­i­cal issues with these approaches, which have come to light through the research of Ahmad Farid Osman, one of our PhD stu­dents at Monash Uni­ver­sity. Basi­cally, they are never fore­castable in the sense explained in Sec­tion 10.2 my 2008 book (fore­casta­bil­ity is the ETS equiv­a­lent of invert­ibil­ity in ARIMA models).

Osman has attempted to repair the prob­lem by propos­ing a dif­fer­ent for­mu­la­tion from those in the above ref­er­ences. The only pub­lic descrip­tion of his pro­posed model is given by Osman and King in this pre­sen­ta­tion – sorry, they do have a full paper explain­ing their approach, but it is not pub­licly avail­able.  How­ever, the model is much messier than the for­mu­la­tion we put in our book, and although it avoids the fore­casta­bil­ity issues, I think it is more dif­fi­cult to inter­pret. Still, it’s a good attempt at a tough prob­lem, and there’s noth­ing else around that’s any better.

So don’t expect any code for fit­ting ETS mod­els with regres­sors to appear in the fore­cast pack­age for R any­time soon, and maybe never. Osman may at some stage make his own code available.

Right now, if I have a fore­cast­ing prob­lem where I want to use covari­ates, I tend to use regres­sion with ARMA errors. That’s easy to do using the Arima() or auto.arima() func­tions in the fore­cast pack­age for R. It is even pos­si­ble to han­dle mul­ti­ple sea­son­al­ity in that way with Fourier terms (although that forces the sea­son­al­ity to be unchang­ing over time). More flex­i­ble mod­els are pos­si­ble using the arimax() func­tion in the TSA pack­age.

Of course, there is always the dynamic lin­ear model approach, imple­mented in the dynlm pack­age.

 
Tags: ,
No Comments  comments