我有很多困难,让Rstan工作在我的OSX设置。关于背景信息,我的系统如下:
每次我通过run在R中运行stan模型时,我都会得到以下错误(不管我运行的模型是什么,所以stan代码已经检查了语法错误)
Error in compileCode(f, code, language = language, verbose = verbose) :
Compilation ERROR, function(s)/method(s) not created! In file included from file32b7b27a829.cpp:465:
In file included from /usr/local/lib/R/3.2/site-library/rstan/include/rstan/rstaninc.hpp:3:
In file included from /usr/local/lib/R/3.2/site-library/rstan/include/rstan/stan_fit.hpp:75:
In file included from /usr/local/include/stan/services/mcmc/run_markov_chain.hpp:5:
/usr/local/include/stan/io/mcmc_writer.hpp:138:23: error: no member named 'is_recording' in 'rstan::rstan_sample_writer'
if (!recorder.is_recording())
~~~~~~~~ ^
/usr/local/include/stan/io/mcmc_writer.hpp:155:9: note: in instantiation of function template specialization 'stan::io::mcmc_writer<model32b75b587019_FamaFrench_COV_estimate_namespace::model32b75b587019_FamaFrench_COV_estimate, rstan::rstan_sample_writer, stan::interface_callbacks::writer::csv, stan::interface_callbacks::writer::messages>::write_adapt_finish<rstan::rstan_sample_writer>' requested here
write_adapt_finish(sampl
In addition: Warning message:
running command '/usr/local/Cellar/r/3.2.2_1/R.framework/Resources/bin/R CMD SHLIB file32b7b27a829.cpp 2> file32b7b27a829.cpp.err.txt' had status 1
>其他相关信息
我可以在PyStan中成功地运行一个测试程序。这似乎在很大程度上是Rstan的一个问题。
有人能给我一些线索来说明我如何解决这个问题吗?
发布于 2015-11-10 17:59:14
首先,确保您拥有Stan的最新版本(目前为2.8.0),并按照指示安装了Rstan。每当我不这么做,我就惹上麻烦!
如果这不起作用的话:你试过Stan用户组了吗?他们可能有更多的人有能力回答这个问题。
https://groups.google.com/forum/?fromgroups#!forum/stan-users
https://stackoverflow.com/questions/33632900
复制相似问题