I’m hitting an error trying to use rstan::stan_model
, it always fails for me.
From reading previous forum messages, I feel like this might have to do with Mac OSX Catalina (10.15.6), but I’m not sure. I’ve tried everything suggested from previous formum messages, including upgrading to the “develop” version of rstan
.
Here’s output of version
, and the output of what I’m seeing:
version
## _
## platform x86_64-apple-darwin17.0
## arch x86_64
## os darwin17.0
## system x86_64, darwin17.0
## status
## major 4
## minor 0.2
## year 2020
## month 06
## day 22
## svn rev 78730
## language R
## version.string R version 4.0.2 (2020-06-22)
## nickname Taking Off Again
library(rstan)
## Loading required package: StanHeaders
## Loading required package: ggplot2
## rstan (Version 2.21.3, GitRev: 2e1f913d3ca3)
## For execution on a local, multicore CPU with excess RAM we recommend calling
## options(mc.cores = parallel::detectCores()).
## To avoid recompilation of unchanged Stan programs, we recommend calling
## rstan_options(auto_write = TRUE)
stan_code <- '
data {
int<lower=0> N;
vector[N] x;
vector[N] y;
}
parameters {
real alpha;
real beta;
real<lower=0> sigma;
}
model {
y ~ normal(alpha + beta * x, sigma);
}
'
stan_mod <- rstan::stan_model(model_code = stan_code)
## 'config' variable 'CPP' is deprecated
## clang -mmacosx-version-min=10.13 -E
## Warning message:
## In system(paste(CPP, ARGS), ignore.stdout = TRUE, ignore.stderr = TRUE) :
## error in running command
stan_mod
## Error: object 'stan_mod' not found
I can provide any additional system information, if that’s helpful.
Thank you very much for any help.