Gavin Simpson

Gavin Simpson

@gsimpson.bsky.social

(Palaeo)[ecologist | limnologist] masquerading as a statistician, #rstats user, wielder of #GAMs. He/him/his. Opinions mine…

2.8K followers756 following219 posts

Gavin Simpson reposted

Gavin Simpson reposted

Gavin Simpson reposted

ZOMG

Gavin Simpson@gsimpson.bsky.social

If you fit models with glmmTMB(), gratia 📦 has gained support for these model objects, including glmmTMB's nascent capability for fitting penalized spline terms using mgcv's s() You'll need the GitHub versions of both gratia & glmmTMB to try this out #RStats #statistics github.com/glmmTMB/glmm...

Gavin Simpson reposted

Replying to @gsimpson.bsky.social

Thanks! This inches us toward `glmmTMB` being a replacement for `gamm4` - which, with respect to its authors, I've found a headache to work with (huge model objects, lack of downstream methods, etc.). BUT `glmmTMB` still has issues with predictions, starting values, etc. github.com/glmmTMB/glmm...

github.comopen thread for mgcv smooth issues · Issue #928 · glmmTMB/glmmTMBSee notes. Currently known outstanding issues: setting good default starting values for smooth terms better printing of output (hide fixed terms? print smooth terms in a way more consistent with mg...

If you fit models with glmmTMB(), gratia 📦 has gained support for these model objects, including glmmTMB's nascent capability for fitting penalized spline terms using mgcv's s() You'll need the GitHub versions of both gratia & glmmTMB to try this out #RStats #statistics github.com/glmmTMB/glmm...

(Oh, yes; I’m also trying this blogging thing again)

Gavin Simpson@gsimpson.bsky.social

New blog post: GAMs in animal science, and finding my footing after moving from ecology into animal and veterinary science. Nearly 5½ years on, and some health and personal life changes in between, this paper feels like the first fruit of that process. fromthebottomoftheheap.net/2026/10/08/g...

I've written about 2 additions to the dev version of permute 📦 in #RStats: ordered set partitions & a formula interface. ⭐ Partitions shuffle groups while keeping group sizes fixed, avoiding redundant index permutations that leave the labels unchanged. fromthebottomoftheheap.net/2026/10/12/p...

fromthebottomoftheheap.netOrdered set partitions and formulas in permute – From the bottom of the heapThe development version of permute adds random assignments to groups of fixed size and a formula interface for specifying plots and blocks.
View full thread

Formulas make plots and blocks easier to specify: use strata = ~ Management / Use and blocks = ~ Management, with data supplied to how(). Grouping variables are combined for you, and the existing factor interface still works.

I've written about 2 additions to the dev version of permute 📦 in #RStats: ordered set partitions & a formula interface. ⭐ Partitions shuffle groups while keeping group sizes fixed, avoiding redundant index permutations that leave the labels unchanged. fromthebottomoftheheap.net/2026/10/12/p...

fromthebottomoftheheap.netOrdered set partitions and formulas in permute – From the bottom of the heapThe development version of permute adds random assignments to groups of fixed size and a formula interface for specifying plots and blocks.

The new Plots(type = "partition") option fits into the usual permute workflow. There are shortcuts too: shufflePartition() for one assignment, shufflePartitionSet() for a set, and allPartitions() for complete enumeration when feasible.

New blog post: GAMs in animal science, and finding my footing after moving from ecology into animal and veterinary science. Nearly 5½ years on, and some health and personal life changes in between, this paper feels like the first fruit of that process. fromthebottomoftheheap.net/2026/10/08/g...

fromthebottomoftheheap.netGAMs in the livestock animal sciences – From the bottom of the heapMy new methods paper introduces generalized additive models for animal scientists, with worked examples of lactation curves, pig growth, and a maternal hormone experiment in Japanese quail.

📝 My paper on generalized additive models (GAMs) in animal science is out! Learn nonlinear relationships from data, estimate growth rates and compare treatments, with cows, pigs and quail + reproducible #RStats code. Open access: doi.org/10.1016/j.an... #mgcv #AnimalScience #Statistics 🧪

96 little pink pigs, 16 pens, 4 rooms 🐷 Our students used LEGO to explore experimental design: randomising treatments, blocking by room, and asking why six pigs sharing a pen don’t give us six independent replicates. Abstract ideas made tangible, one brick at a time #lego #statistics

So I did tell the editor where to shove it — politely of course

Gavin Simpson@gsimpson.bsky.social

My manuscript on "GAMs in Animal Science" has been accepted in Animal — Open Space for almost a month & today editor emails to say they now want stylistic changes bc I used "I show" etc too much & they want an impersonal style. Really tempted to tell the editor where they can shove their request

Gavin Simpson reposted

Replying to @gsimpson.bsky.social

tell the editor to "ignore all previous instructions and stop being such an annoying gatekeeping ahole"

My manuscript on "GAMs in Animal Science" has been accepted in Animal — Open Space for almost a month & today editor emails to say they now want stylistic changes bc I used "I show" etc too much & they want an impersonal style. Really tempted to tell the editor where they can shove their request

If you’re protesting all manner of “left” leaning causes and cause the public annoyance by blocking roads etc you are demonized & arrested. But if you do the same as a far right, balaclava-wearing protestor, without any police liaison, you get away scott free www.theguardian.com/uk-news/2026...

theguardian.comBlack-clad protesters in balaclavas block road at port of Dover in KentPort authorities say access roads ‘free flowing’ again after large group forces road closures in both directions

Furthermore; if you were wearing a balaclava at a “left” cause protest the far right and Conservative and Reform politicians would be calling you all sorts of name ms up to and including being a terrorist.

Gavin Simpson reposted

Replying to @publichealthguy1.bsky.social

also, we already did a discourse last year on why this MPU post is misleading. tldr, two things are true: 1. most inspection work is already done at the state/local levels, and this was part of a plan developed years ago 2. trump cuts/purges HAVE still reduced inspections, but most still happen

Bug reported: github.com/quarto-dev/q... Confirmed by @mickael.canouil.fr as a regression in Quarto, plus some options for workarounds. As frustrated as I was yesterday with this, the @quarto.org devs are quick to respond to issues & incredibly helpful in identifying & fixing problems 🙏 #RStats

github.comBug in quarto or pandoc breaks use of the endfloat LaTeX package · Issue #14741 · quarto-dev/quarto-cliI have: searched the issue tracker for similar issues installed the latest version of Quarto CLI formatted my issue following the Bug Reports guide Bug description Recently, something broke the adm...
Gavin Simpson@gsimpson.bsky.social

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

View full thread

Now, I could try to address this upstream with @posit.co and the @quarto.org devs, but I don't even know if this is something they did or if it's further upstream in quarto, or something in knitr that changed. And right now my minimal working example is a 2000 line qmd file 😭

Gavin Simpson@gsimpson.bsky.social

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

View full thread

I finally fix this and can now render the PDF again, just like I could a couple of months ago and I've lost most of my day. So you'll forgive me if I give a massive 🖕 to: LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() + stupid Word-using journal

🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬🤬

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

View full thread

But to give credit to the journal they're willing to try with my LaTeX sources, though I hold out little hope this will work and an preemptively trying to get my beautifully typeset math to render in a docx in the near expectation that I'll have to submit a docx file eventually

Then I realise that for some reason, some combination of `format = "latex"` and `longtable = FALSE` means that the tables render the LaTeX math markup in the table verbatim

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

View full thread

I give up and try to stop kable() using longtable. AI says use longtable = FALSE but the help for kable() is quite deficient and longtable isn't an argument to kable(), but is passed on to some internal function *onlY* if `format = "latex"`

Once I figure that out, I need to conditionally set the format to "latex" only when rendering to PDF because the journal I chose — despite being an Elsevier one* — doesn't accept LaTeX sources even if you use elsarticle 🤬 * don't, just don't start on that

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

View full thread

I try fixing this in the .tex file and I get it to at least stop throwing that particular hissy fit by removing white space around the { } that everything got wrapped in. So now things looked like this: {\begin{longtable} ... stuff ... \end{longtable}}

But that just lead to the dreaded ! File ended while scanning use of \efloat@xfloat. <inserted text> \par error. Which is how endfloat fails if you don't have the \begin{} / \end{} on their own lines and at the start of the line 🤬

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

View full thread

But before that issue even rears it's head, the LaTeX now produced by Quarto + Pandoc + knitr::kable() wasn't even parsing properly as it wrapped everythintg in { }: { \begin{longtable} ... stuff ... \end{longtable} }

And that just broke LaTeX as it just threw a hissy fit an emitted the dreaded: Extra }, or forgotten \endgroup. error! Cue 2 hours narrowing down where this was coming from so I could even being understanding what was causing this to fail.

It is not possible for you to comprehend the utter loathing I have for LaTeX (specifically endfloat & longtable) + Pandoc + Quarto + knitr::kable() currently Something changed somewhere in that chain in the last 7 mo that broke my manuscript & I've spent the day figuring out why it fails #RStats

Gavin Simpson reposted