Posts Tagged ‘ computing ’

Makefiles for R/LaTeX projects

October 31, 2012
By
Makefiles for R/LaTeX projects

Updated: 21 November 2012 Make is a marvellous tool used by programmers to build software, but it can be used for much more than that. I use make whenever I have a large project involving R files and LaTeX files, which means I use it for almost all of the papers I write, and almost of the consulting reports I produce. If you are using a Mac or Linux, you…

Read more »

LaTeX loops

October 23, 2012
By
LaTeX loops

Today I was writing a report which included 20 figures, with the names demandplot1.pdf, demandplot2.pdf, …, demandplot20.pdf, and all with similar captions. Clearly a loop was required. After all, LaTeX is a programming language, so we should be able to take advantage of its capabilities. I found the forloop package which handled the problem perfectly. My first attempt looked like this: \newcommand{\demandplot}[1]{\begin{figure}\centering \includegraphics[width=\textwidth]{./figs/demandplot#1.pdf} \caption{Hourly demand (GW) for zone #1.} \end{figure}}…

Read more »

COMPSTAT2012

August 28, 2012
By
COMPSTAT2012

This week I’m in Cyprus attending the COMPSTAT2012 conference. There’s been the usual interesting collection of talks, and interactions with other researchers. But I was struck by two side comments in talks this morning that I’d like to mention. Stephen Pollock: Don’t imagine your model is the truth Actually, Stephen said something like “economists (or was it econometricians?) have a bad habit of imagining their models are true”. He gave…

Read more »

Computing log gamma differences

July 14, 2012
By

Statistical computing often involves working with ratios of factorials. These factorials are often too big to fit in a floating point number, and so we work with logarithms. So if we need to compute log(a! / b!), we call software…Read more ›

Read more »

Time Series Data Library now on DataMarket

June 20, 2012
By
Time Series Data Library now on DataMarket

The Time Series Data Library is a collection of about 800 time series that I have maintained since about 1992, and hosted on my personal website. It includes data from a lot of time series textbooks, as well as many other series that I’ve either collected for student projects or helpful people have sent to me. I’ve now moved the collection onto DataMarket which provides much better facilities for maintaining…

Read more »

A course in statistical programming

May 25, 2012
By
A course in statistical programming

Graduate students in statistics often take (or at least have the opportunity to take) a statistical computing course, but often such courses are focused on methods (like numerical linear algebra, the EM algorithm, and MCMC) and not on actual coding. For example, here’s a course in “advanced statistical computing” that I taught at Johns Hopkins […]

Read more »

XeLaTeX with TeXstudio

March 5, 2012
By
XeLaTeX with TeXstudio

XeLaTeX is a replacement for pdfLaTeX that allows you to use the fonts on your computer (rather than only those fonts that come with your tex system). However, TeXstudio is not set up to use XeLaTeX yet. Fortunately, it is not difficult. Go to Options/...

Read more »

Lexical scope and function closures in R

November 23, 2011
By
Lexical scope and function closures in R

Introduction R is different to many “easy to use” statistical software packages – it expects to be given commands at the R command prompt. This can be intimidating for new users, but is at the heart of its power. Most powerful software tools have an underlying scripting language. This is because scriptable tools are typically [...]

Read more »


Subscribe

Email:

  Subscribe