I’m trying to run a model on a linux machine. This model worked just fine on my windows machine, so I suppose it is something related with my ubuntu installation. Could someone point me in the right direction here?
Thanks,
Tada
Operating System: ubuntu 16.04 lts
Interface Version: Rstan
Output of writeLines(readLines(file.path(Sys.getenv(“HOME”), “.R/Makevars”))):
Output of devtools::session_info("rstan”):
Error in prep_call_sampler(object) :
the compiled object from C++ code for this model is invalid, possible reasons:
What version of the RStan do you have? There was a problem with error messages being hidden. Try to update your RStan.
I tested this with CmdStan. Here is the error message.
SYNTAX ERROR, MESSAGE(S) FROM PARSER:
No matches for:
rhosqpow(real, int)
Function rhosqpow not found.
error in '/data/data/com.termux/files/home/Stan/egtest.stan' at line 38, column 50
-------------------------------------------------
36: for ( i in 1:(N_sample-1) )
37: for ( j in (i+1):N_sample ) {
38: SIGMA_Dmat[i,j] = etasqexp(-rhosqpow(Dmat[i,j],2));
^
39: SIGMA_Dmat[j,i] = SIGMA_Dmat[i,j];
-------------------------------------------------
edit. This could also be a copy issue in my end. Here is the next error
I must have the latest in CRAN, as I just installed it today through install.packages(‘rstan’). I did install it again though, just in case. The error you find is kind of odd, I have in the code -rhosq*pow, not rhosqpow. Is it parsing like it that to C++ then? Is there fix?
Can you edit your post that has the model to put the Stan code inside a code block? It is the </> icon above the text input window. Otherwise, Discourse is formatting your post with Markdown which causes all sorts of issues in trying to replicate your error.