Luke Coffeng sent me this answer to the Stan mailing list , and I thought I should add it here. He said:
"Take GLM as the basis for your regression with robit: just replace the standard error term with e ~ student_t(7, 0, sigma_e) , where sigma_e ~ cauchy(0, 2) or whatever scale you think will be in order (I wouldn’t go beyond 5 anyway as a reverse log (-5.5) covers most of the interval [0.1]. In addition to the t-error scale, you can also specify df t-error as a parameter See below for suggested code.
However, I hope that your data contains more information than the toy example you provided, i.e. several observations per person (as shown below). With just one observation per person / unit, the model is almost impossible to identify.
He then presented the following example:
library(rstan) set.seed(1) x1 <- rnorm(100) x2 <- rnorm(100) z <- 1 + 2*x1 + 3*x2 + 0.1 * rt(100, 7) pr <- 1/(1+exp(-z)) y <- rbinom(100,10,pr) df <- list(N=100, y=y, x1=x1, x2=x2, nu = 7)
Bob Carpenter also briefly commented on the question:
"[...] And yes, you can do the same in a hierarchical setting, but you have to be careful because modeling degrees of freedom can be difficult if the scale approaches infinity when you approach normality."
Asked by Bernd, Luke explained why he wrote y ~ bernoulli_logit(10... in the model code:
“In the code example below, 10 is the size of the sample. You may have noticed that these toys contain multiple observations per element / block (i.e. 10 observations per unit).
The Stan manual also provides extensive information about function arguments and sample statements.