Hello,
I’m new to running stan code and seem to be having issues having my model run in R.
Versions:
R 4.6.0
RTools 4.5
rstan 2.32.7
StanHeaders 2.39.1
Rcpp 1.1.2
I’ve tried running a simple model to test whether R can compile the code correctly and I keep on encountering the error:
Error in sink(type = "output") : invalid connection
I’m using this model to check whether it works:
stancode <- 'data {real y_mean;} parameters {real y;} model {y ~ normal(y_mean,1);}'
mod <- stan_model(model_code = stancode, verbose = TRUE)
If anyone could point me towards what I can do to debug the problem, that would be really helpful as I’m needing to start running some larger models soon.
Thanks in advance,
Kieran