I have been using rstan for two years and since last week there have been many troubles with the array syntax. Writing arrays as in the latest Stan manual returns syntax check error, as mentioned in Error in declaring variables by `array` in R · Issue #980 · stan-dev/rstan · GitHub
However, scripts that used to work do not work anymore with the latest rstan. Even when syntax check is passed using the previous version of array syntax, e.g. real x[n], rstan still does not work. Errors appear at the first iteration, i.e. after gradient evaluation etc, and are as follows,
terminate called after throwing an instance of ‘std::bad_alloc’
Error in x@mode :
no applicable method for
@ applied to an object of class “NULL”
I’m wondering if this is occurring to anyone else? Any suggestions? Thank you.