Deprecated function '_log'




I have an error message in R saying that the function ‘multi_student_t_log’ is deprecated.

Warning: Deprecated function ‘multi_student_t_log’; please replace suffix ‘_log’ with ‘_lpdf’ for density functions or ‘_lpmf’ for mass functions

I replaced ‘_log’ with ‘_lpdf’, and checked the syntax to change the ‘,’ into a vertical line ‘|’ as suggested in the documentation:

“real multi_student_t_lpdf (row_vectors y | real nu, row_vectors mu, matrix Sigma)”

But it did not work and produced an error in stanc()
“Error in stanc(file = “model.stan”) : c++ exception (unknown reason)”


There should be a real error message here. I think you need to reinstall Rcpp from source for you to get that. Something like:

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

Hopefully the actual error message from Stan will come through then and it’ll be easier to help. My guess: row_vectors isn’t a valid type.


I’ve just tickled this bug myself on a fresh install of RStudio with RStan 2.16.2 (latest).
Installing Rcpp wasn’t enough in my case - (working on a mac), in addition I had to do:

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


Thanks, @mitzimorris! I still haven’t figured out when that happens and exactly what needs to be done.


Hi, installing the rstan packages again works for my case.


Thanks for reporting back. I’m going to mark this as solved.