David Lawrence Miller

Professional stuff

I’m a senior statistician at Biomathematics and Statistics Scotland. I work on all kinds of statistical problems. I’m currently getting interested in aphids amongst other stuff. I’ve spent a lot of time thinking about smooth models (in the generalized additive modelling framework) and counting animals, but I’m open to other stuff too.

Note that as of December 2022 I am no longer involved in the development of distance sampling-related projects! Please don’t contact me about them!

Previously: I worked as a research fellow at the Centre for Research into Ecological & Environmental Modelling and the School of Mathematics & Statistics at the University of St Andrews. While there I worked on improving spatial models for cetacean abundance and distribution with funding from the US Navy’s Living Marine Resources programme (see bottom half of page 8 of Summer 2017 LMR News and page 4 onwards of the Summer 2022 LMR News for some info).

Previously, previously: I’ve worked for NOAA’s Northeast Fisheries Science Center (sic) in Woods Hole, MA, the University of Rhode Island and CSIRO in Hobart, Tasmania.

Less professional stuff

I was interviewed by Uses This about how I use a computer to get work done.

I’ve made a few Twitter bots, which you an read about on my bots page.

I wrote an extremely stupid Wordle clone, called Primel which asks you to guess a 5 digit prime number.


Jonah McArthur developed a translation layer between R and Fortran parts of the distance sampling software as a summer research project.

Rick Camp undertook a PhD on spatio-temporal modelling of Hawaiian birds (co-supervised with Steve Buckland and Len Thomas).

Phil Bouchet developed methods, tools and guidelines for quantifying extrapolation in spatial models as part of a postdoc with CREEM.


Not actually in print

From 2008-2011(12) I undertook a PhD at the University of Bath where I investigated smoothing over complex regions under the supervision of Simon Wood. You can download (and even read) my thesis should that interest you. We published a paper in Environmental and Ecological Statistics with some of these results, which is significantly shorter.

In “print”

Camp, RJ, DL Miller, ST Buckland and SJ Kendall. Accounting for spatial habitat and management boundaries when estimating forest bird population distribution and density: Inferences from a soap film smoother. PeerJ DOI (Open Access!)

Delisle, ZJ, DL Miller, & RK Swihart (2023). Modelling density surfaces of intraspecific classes using camera trap distance sampling. Methods in Ecology and Evolution, 14, 1287– 1298. DOI (Open Access!)

Miller, DL, EA Becker, KA Forney, JJ Roberts, A Cañadas, RS Schick. (2022) Estimating uncertainty in density surface models. PeerJ DOI (Open Access!)

Carter, MID, L Boehme, MA Cronin, CD Duck, WJ Grecian, GD Hastie, M Jessopp, J Matthiopoulos, BJ McConnell, DL Miller, CD Morris, SEW Moss, D Thompson, PM Thompson, DJF Russell. (2022) Sympatric seals, satellite tracking and protected areas: habitat-based distribution estimates for conservation and management. Frontiers in Marine Science. DOI (Open Access!)

Jacobson, EK, E Henderson, DL Miller, CS Oedekoven, D Moretti, L Thomas (2022). Quantifying the response of Blainville’s beaked whales to US Naval sonar exercises in Hawaii. Marine Mammal Science. DOI (Open Access!)

Robbins JR, PJ Bouchet, DL Miller, PGH Evans, J Waggitt, A Ford, SA Marley (2022). Shipping in the north-east Atlantic: identifying spatial and temporal patterns of change. Marine Pollution Bulletin. DOI (Open Access!)

Becker EA, KA Forney, DL Miller, J Barlow, LR Bracho, J Urbán Ramírez, JE Moore (2022). Dynamic habitat models reflect interannual movement of cetaceans within the California Current Ecosystem. Frontiers in Marine Science DOI (Open Access!)

Miller DL (2021). Bayesian views of generalized additive modelling. arXiv preprint. github repo with example code

Miller DL, D Fifield, ED Wakefield, DB Sigourney. (2021). Extending density surface models to include multiple and double-observer survey data. PeerJ 9:e12113 DOI (Open Access!)

Wakefield, ED, DL Miller, S Bond, P Carvalho, P Catry, B Dilley, D Fifield, C Gjerdrum, J González-Solís, H Hogan, V Laptikhovsky, J Miller, P Miller, S Pinder, T Pipa, L Thompson, P Thompson, and J Matthiopoulos. (2021). The summer distribution, habitat associations and abundance of seabirds in the sub-polar frontal zone of the Northwest Atlantic. Progress in Oceanography. preprint DOI (Open Access!)

Bravington, MV, DL Miller and S Hedley (2021). Variance propagation for density surface models. Journal of Agricultural, Biological and Environmental Statistics. DOI (Open Access!) arXiv preprint Supplementary code etc (because Springer made a mess of them).

Becker, EA, KA Forney, DL Miller, PC Fiedler, J Barlow, and JE Moore (2020). Habitat-based density estimates for cetaceans in the California Current Ecosystem based on 1991–2018 survey data. NOAA Technical Memo NMFS-SWFSC-638 NOAA Library

Bouchet, P, DL Miller, JR Roberts, L Mannocci, C Harris, L Thomas (2020). dsmextra: Extrapolation assessment tools for density surface models. Methods in Ecology and Evolution website/package DOI (Open Access!)

Camp, RJ, DL Miller, L Thomas, ST Buckland and SJ Kendall (2020). Using density surface models to estimate spatio-temporal changes in population densities and trend. Ecography DOI (Open Access!)

DL Miller, R Glennie, A E Seaton (2020). Understanding the Stochastic Partial Differential Equation Approach to Smoothing. Journal of Agricultural, Biological and Environmental Statistics 25, 1–16. DOI erratum (Open Access!) fully corrected version on arXiv

JFC Wenceslau, F Dias, TA Marques and DL Miller (2019). Density and distribution of western chimpanzees around a bauxite deposit in the Boé Sector, Guinea-Bissau. American Journal of Primatology 81:e23047. PDF DOI

EJ Pedersen, DL Miller, G Simpson and N Ross. Hierarchical Generalized Additive Models: an introduction with mgcv. (2019) PeerJ 7:e6876 DOI (Open Access!)

Miller DL, E Rexstad, L Thomas, L Marshall, JL Laake (2019). Distance Sampling in R. Journal of Statistical Software, 89(1), 1-28. DOI

JM van der Hoop, ML Byron, K Ozolina, JL Johansen, P Domenici, DL Miller and JF Steffensen (2018) Turbulent flow reduces oxygen consumption in the labriform swimming shiner perch, Cymatogaster aggregata. Journal of Experimental Biology 221(11). DOI PDF

R Langrock, T Adam, V Leos-Barajas, S Mews, DL Miller and YP Papastamatiou. (2018) Spline-based nonparametric inference in general state-switching models. Statistica Neerlandica 72(3), 179-200. DOI. PDF

Buckland, ST, DL Miller and E Rexstad (2019). Distance Sampling. Chapter in Quantitative Analyses in Wildlife Science. Eds. L Brennan, B Marcot and A Tri. Book website

Miller, DL and MV Bravington (2017). When can abundance surveys be analysed with “design-based” methods? International Whaling Commission Scientific Committee Report PDF software

Mannocci, L, JR Roberts, DL Miller, P Halpin (2017). Extrapolating cetacean densities beyond surveyed regions to qualitatively assess human impacts on populations in the high seas. Conservation Biology 31: 601-614. DOI. (Open Access!)

Dellabianca, NA, GJ Pierce, AR Rey, G Scioscia, DL Miller, MA Torres, MN Paso Viola, RNP Goodall and ACM Schiavini. (2016) Spatial models of abundance and habitat requirements of Commerson’s and Peale’s dolphin in southern Patagonian waters. PLOS ONE 11(10): e0163441. DOI (Open Access!).

Reiss, PT, DL Miller, P Wu and W Hua (2017). Penalized nonparametric scalar-on-function regression via principal coordinates. Journal of Computational and Graphical Statistics. 26(3), 569-578 DOI Preprint.

Dias, FS, DL Miller, TA Marques, J Marcelino, MC Caldeira, JO Cerdeira, MN Bugalho (2016). Conservation zones promote oak regeneration and shrub diversity in certified Mediterranean oak woodlands. Biological Conservation 195, 226-234. DOI. PDF. Appendix A. Appendix B.

Miller, DL and L Thomas (2015). Mixture models for distance sampling detection functions. PLOS ONE. DOI. (Open Access!)

Miller, DL and SN Wood (2014). Finite area smoothing with generalized distance splines. Environmental and Ecological Statistics DOI. PDF. Appendix. Software implementation as package msg, above.

Winiarski, KJ, ML Burt, EA Rexstad, DL Miller, CL Trocki, PWC Paton and SR McWilliams (2014). Integrating aerial and ship surveys of marine birds into a combined density surface model: A case study of wintering Common Loons. The Condor. 116(2):149–161. DOI. PDF.

Winiarski, KJ, DL Miller, PWC Paton and SR McWilliams (2013). Spatial conservation prioritization of marine bird distribution models to improve guidance for siting of offshore wind energy developments. Biological Conservation 169, 79-88. DOI. PDF. Appendix.

Winiarski, KJ, DL Miller, PWC Paton and SR McWilliams (2013). A spatially-explicit model of wintering common loons: conservation implications. Marine Ecology Progress Series 492:273–283. DOI. PDF. Appendix. git repository with knitr document for the analysis.

Miller, DL, ML Burt, EA Rexstad and L Thomas (2013). Spatial models for distance sampling data: recent developments and future directions. Methods in Ecology and Evolution. DOI (Open Access!). PDF. Appendices: A, B, C, D. Updated Appendix A available here.

Marra, G, DL Miller and L Zanin (2011). Modelling the spatiotemporal distribution of the incidence of resident foreign population. Statistica Neerlandica. 66(2), pp. 133-160. DOI; PDF.

Miller, DL (2004). Installing Debian on your Unmodded Xbox. 2600: The Hacker Quarterly. 21(1) Store link


Sotware stuff can be found on this page.

Course materials

Materials from the courses “Intermediate distance sampling” given at CREEM, University of St Andrews, 2017/2018 and subsequent “Spatial modelling of distance sampling data” courses given online are available on the distance sampling website.

Materials from the course “Spatial models for distance sampling data” given at Duke University, NC, 27-30 October 2015 are available on the distance sampling website or on github.

Materials for an mgcv course I ran with Gavin Simpson, Eric Pedersen and Noam Ross at the Ecological Society of America annual meeting 2016 in Fort Lauderdale, FL are available on the course website.

Materials for a very similar mgcv course I ran at the Marine Mammal Laboratory at NOAA’s Alaska Fisheries Science Center (sic) (based on the above course) in October 2016 in Seattle, WA are available here.


Yes! You can do that in mgcv “Workshop on Ecological and Environmental Statistics” at Lancaster University, September 11-13 2023.

Finding your niche in statistics Plenary at Research Students’ Conference in Probability and Statistics, Sheffield University, 12 September 2023

Combining multiple data sources via GAM-based methods IBAHCM, University of Glasgow, 20 October 2021

Variance Propagation in Multi-stage GAM-based Models Statistics Canada 2021, Montreal (online), 17th July 2021

Variance Propagation for Density Surface Models. Virtual National Centre for Statistical Ecology meeting, UK, 17 June 2021

Accounting for detectability in spatially-explicit abundance models of cetaceans. Mathematical Biology seminar, University of Sheffield, UK, 18 February 2018.

Accounting for detectability in spatially-explicit abundance models of cetaceans. Talk at Matematisk institutt, Universitetet i Bergen, Bergen, Norway, 12 September 2017.

Where the whale-things are: Distribution, detectability and availability modelling for cetacean populations. Talk at the Department of Statistics, Iowa State University, Ames, IA, 13 February 2017. Slide source & data.

Integrating data from multiple sources to improve species distribution models. Talk at the International Statistical Ecology Conference, Seattle, July 2016. (Sources and data)

Recent advances in spatial modelling of distance sampling surveys. Talk at CSIRO Marine Laboratory, Hobart, Tasmania, 19 April 2016.

Where the whale-things are?. Talk at University of Melbourne, Melbourne, Victoria, 15 April 2016 slide source & data.

Spatial models integrating two survey platforms. Talk at NOAA NEFSC Visual and Passive Acoustic Data Integration Modeling Workshop, Woods Hole, MA, 15 September 2015.

Recent advances in spatial modelling of distance sampling surveys. Talk at The Ecological Society of America Annual Meeting 2015 (session OOS4: Advances in Modeling Wildlife Abundance), Baltimore, MD, 10 August 2015.

useR! 2015 highlights, CREEMcrackers (joint with Rob Schick), University of St Andrews, Scotland, 31 July 2015.

Recent advances in spatial modelling of distance sampling surveys. Talk at Royal Statistical Society Highlands Local Group, Aberdeen, Scotland, 16 July 2015.

Building ecological models bit-by-bit. Talk at useR! 2015, Aalborg, Denmark, 1 July 2015.

Distance sampling and detection function modelling in Distance and Spatial modelling of distance sampling surveys. Two talks at The British Trust for Ornithology, Thetford, UK, 25 June 2015.

Recent advances in spatial modelling of distance sampling survey. Talk at Universidade de Lisboa, Portugal, 11 June 2015.

Density surface models. Talk given to Cornell Lab of Ornithology, Cornell University, 5 September 2014.

Mixture models detection functions. North Carolina State University, 27 August 2014.

Funtimes (and fundates) with lubridate (code). St Andrews R user group talk, July 2014.

Specifying GAMs & GAMMs with mgcv, CREEMcrackers, University of St Andrews, Scotland, July 2014.

Strategies for correlated covariates in distance sampling, International Statistical Ecology Conference, Montpellier, France, July 2014.

Density surface modelling. Talk given to the Marine Geospatial Ecology Lab, Duke University, 11 February 2014.

Functional programming in R. St Andrews R user group talk, December 2013.

Dealing with spatial autocorrelation in DSMs. Informal talk to the Research Unit for Wildlife Population Assessment, July 2013. (code.)

dsm version 2 - what’s new?. Informal talk to the Research Unit for Wildlife Population Assessment, December 2012.

Combatting edge effects in spatial smoothing. International Statistical Ecology Conference, July 2012, Sundvolden, Norway.

Using multidimensional scaling with Duchon splines for reliable finite area smoothing. useR! 2011, Warwick, UK. (also given at: Recent advances in spatial statistics in ecology, University of St Andrews, 2011; ISEC 2010, University of Kent, and more. This is the most recent version.)

Using mixture models for distance sampling detection functions. NCSE Summer meeting 2011, University of Bath, UK. (Again, I’ve given this a bunch of times, this is the most recent version.)


Improved inference in point-transect models: applications to Hawaiian forest birds International Statistical Ecology Conference, June 2018, St Andrews, Scotland. (Joint with Richard Camp, Len Thomas and Stephen Buckland.)

Migrating distance sampling projects from Distance for Windows to the Distance R package International Statistical Ecology Conference, June 2018, St Andrews, Scotland. (Joint with Eric Rexstad, Laura Marshall and Len Thomas.)

Inference in Semi-Parametric Hidden Markov Models using Bayesian P-Splines International Society for Bayesian Analysis, June 2018, Edinburgh, Scotland. (Joint with Vianey Leos-Barajas, Guillermo Basulto-Elias, Jennifer Pohle, Roland Langrock and Alicia Carriquiry.)

Convenient analysis of numerous distance sampling data sets in R International Statistical Ecology Conference, July 2014, Montpellier, France. (Joint with Eric Rexstad and Lindesay Scott-Hayward.)

Spatial density surface estimation from distance sampling surveys International Statistical Ecology Conference, July 2012, Sundvolden, Norway.

Coming soon in Distance International Statistical Ecology Conference, July 2012, Sundvolden, Norway. (Entirely Laura Marshall’s work, but I stood next to it and talked to people so it seems sensible to include it here.)

Contact me!

E-mail: dave [at] ninepointeightone [dot] net

(pseudorandom) Gratuitous picture of myself

some image

(refresh for more silly photos)