Evgenii
Evgenii

Reputation: 37339

How to view warnings for incorrect Stan model in rstan?

Currently, if I make a typo in *.stan file (forget a trailing semicolon for example), and then run the model in R, it just silently quits without showing any error messages:

library(rstan)

fit <- stan(file="mymodel.stan", data=c(1,2))

Is there a way to see compilation errors for my Stan model? Something like

Semicolon missing on line 13

Upvotes: 0

Views: 175

Answers (1)

Ben Goodrich
Ben Goodrich

Reputation: 4990

This answer should not be necessary for much longer into the future, but in the recent past you may need to do

install.packages("rstan", type = "source")

in order to correctly handle the exceptions that are thrown when parsing invalid Stan programs under the Catalina version of the Mac OSX operating system.

Upvotes: 1

Related Questions