Following up on a previous post, where I showed that the R function nls() was giving biased estimates in the presence of heteroskedastic, truncated noise. The **nlme** package provides the function gnls() for generalised least squares, but this seemed to involve defining a custom varFunc class to reweight the observations. For more detail on this option, refer to ch. 5 of Pinheiro & Bates (2000). Instead, I show how I formulated the likelihood in the Stan modelling language and estimated the parameter using Hamiltonian Monte Carlo (HMC). Thanks very much to Bob Carpenter for his help in getting this code to work.

Somehow I managed to sign up to give 4 talks at Warwick during the next 3 weeks (!) This Tuesday and next, I will be presenting the 3rd chapter of Mark Huber‘s 2015 book, Perfect Simulation, at the reading group of the same name. This week will focus on Coupling from the Past (Propp & Wilson, 1996) while next week I will present perfect slice sampling (Mira, Møller & Roberts, 2001). A finite sample drawn using CFTP is unbiased, therefore it can be incorporated into pseudo-marginal methods such as the exchange algorithm (Murray, Ghahramani & MacKay, 2006). More about CFTP in a future blog post, no doubt!

This paper by Emily Fox and François Caron has been on arXiv for a while, but a fortnight ago it was read at an ordinary meeting of the RSS. “Sparse graphs using exchangeable random measures” (J. R. Stat. Soc. Series B, 2017) enables simulation and Bayesian analysis of graphs with hundreds of thousands of nodes and over a million edges. This represents a major breakthrough for computationally tractable inference on substantial datasets. My thoughts on the paper and some preliminary experimental results are below.

Now that I have a new MacBook Air, I decided to upgrade my old machine to the latest version of macOS. Updates for Microsoft Office are no longer available for OS 10.9 (Mavericks) or earlier, so this upgrade was long overdue. Installing the 5GB upgrade took about an hour, but since I was upgrading from Mavericks this broke a bunch of installed software. If you are a software developer, I’d advise you to set aside an afternoon to fix this mess.

The following are my thoughts on the paper “Beyond subjective and objective in statistics” by Gelman & Hennig (JRSS A, 2017), which was read at an ordinary meeting of the RSS on Wednesday. Overall, I really liked the paper. From the title and abstract, I was worried that it was either going to be a pointless philosophical argument of Bayes vs. frequentist, or else a statement of the obvious, but it was neither. In fact, the authors argue against tribalism in statistics and attempt to provide some universal guidelines for statistical practice.

Two brilliant slides from Philip Dawid responding to Hennig & Gelman pic.twitter.com/UXaD7CY00X

— Robert Grant (@robertstats) 12 April 2017

Time for a new version of my R package, to fix some compile errors on Solaris. It irks me that the R Core Team insists on supporting a crufty compiler on an obsolete OS, when there is no support for Intel Parallel Studio on Windows. Even Microsoft R Open only supports GCC. I’m hoping that the new Windows Subsystem for Linux (WSL) might finally provide an option for compiling R packages with nVidia CUDA on Windows, but I haven’t had a chance to investigate yet. In the meantime, this post describes how I fixed the compile errors as well as another NOTE that had appeared in CRAN. These changes are available in version 0.4-0 of **bayesImageS**.

I gave a talk last Thursday at the Warwick R Users’ Group (WRUG), a regular meeting that is held during term time in the stats department. Some of this was a rehash of a previous talk I gave at BRAG, updated for the 2011 edition of the National Land Cover Database (NLCD). But I also discussed how to download and import data from MODIS and Landsat 8. My slides are below and the R source code is available from the WRUG homepage.