add cmdstanr and make stan code more efficient
Not sure which version of rstan you're using. This will work with anything after 2.23. I've added cmdstanr so you can test the latest version of Stan at 2.30.
Your code runs on my machine in ~9s with the updates it takes about 2s.
I just saw the comments in the other issue about not caring about efficiency. I think in this case it's a matter of knowing functions and reading the manual, which I think a naive Stan user is likely to do. Anyway, it's just knowing about the bernoulli_logit_glm function. I hope it's not too "expert".
We can remove that function and call bernoulli_logit (no _glm) to be equivalent to what the Stan user's guide has. I think that may be where a new user would copy code from. https://mc-stan.org/docs/stan-users-guide/logistic-probit-regression.html