Disc automatically estimated by sratio/cratio in R 4.0

Hi all,

I upgraded this week to R 4.0.1 after my previous machine quit on me; I had been using 3.6.2. I’m working on a paper using sequential models with continuous parameterization, and when I switched to 4.0.1, something changed in the call between brms and Stan: Stan began to automatically attempt to estimate parameter values for disc. Before the switch, disc was only estimated if I explicitly included it in the model formula. This does not appear to harm anything: Stan attempts to estimate disc and passes all the expected warnings (“chains have not mixed,” “ESS is too low”). However, as my goal is to write accessible code that won’t confuse someone attempting to replicate my results, I have resorted to dropping warnings into my code telling users not to worry about the warnings, the lack of mixing for the mysterious disc on traceplots, etc. I wonder if I’m missing a simple fix, though I haven’t found any discussion of one in the Stan forums or in Buerkner & Vuorre 2018. Is there something I’m missing?

Toy example below. Note that this change with R 4.0 appears to affect both sratio and cratio models.

Thanks in advance!

dat <- data.frame(x = rnorm(500, 0, 1), y = ordered(sample(1:3, 500, replace = T)))
this <- brm(y ~ x, family = cratio, data = dat)
  • Operating System: Windows 10
  • brms Version: 2.13.0 (R 4.0.1, run with RStudio)
1 Like

Are you really sure disc is estimated? It seems more likely that it is just fixed to one and not estimated (but returned in the output as a constant vector of 1s). The warning comes from rstan and may be changed in the future.

1 Like

Thanks for the quick response, Paul. That’s a good point – the estimated error in the summary suggests that no estimation happened at all (it’s 0.00), though an Rhat and the ESSes are still reported (and a traceplot still generated by plot()). In short, however, it sounds like there’s no way to turn off the warnings, remove disc from the summary, or keep it off the traceplots. That wasn’t the case for R 3.6.2, so just wanted to verify I wasn’t missing some new specification to keep it out of the model formula and reporting. It sounds like I’m not missing anything!

1 Like

It looks like I’ve run into this issue when modeling ordinal data with family = cumulative. Like @paul.buerkner said, the disc parameter is fixed to 1 and I got a number of warnings after brm() was done sampling. I don’t have a good recommendation for how this might be changed, but the current behavior is confusing.