logreg icon indicating copy to clipboard operation
logreg copied to clipboard

add cmdstanr and make stan code more efficient

Open spinkney opened this issue 3 years ago • 1 comments

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.

spinkney avatar Jul 07 '22 17:07 spinkney

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

spinkney avatar Jul 07 '22 17:07 spinkney