C:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include" -DNDEBUG -I"C:/Program Files/R/R-3.6.0/library/Rcpp/include/" -I"C:/Program Files/R/R-3.6.0/library/RcppEigen/include/" -I"C:/Program Files/R/R-3.6.0/library/RcppEigen/include/unsupported" -I"C:/Program Files/R/R-3.6.0/library/BH/include" -I"C:/Program Files/R/R-3.6.0/library/StanHeaders/include/src/" -I"C:/Program Files/R/R-3.6.0/library/StanHeaders/include/" -I"C:/Program Files/R/R-3.6.0/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -std=c++1y -march=core2 -O3 -march=native -mtune=native -c file1b246b068fd.cpp -o file1b246b068fd.o TRANSLATING MODEL 'ES' FROM Stan CODE TO C++ CODE NOW. successful in parsing the Stan model 'ES'. COMPILING THE C++ CODE FOR MODEL 'ES' NOW. OS: x86_64, mingw32; rstan: 2.19.2; Rcpp: 1.0.2; inline: 0.3.15 >> setting environment variables: PKG_LIBS = -L"C:/Program Files/R/R-3.6.0/library/StanHeaders/libs/x64" -lStanHeaders PKG_CPPFLAGS = -I"C:/Program Files/R/R-3.6.0/library/Rcpp/include/" -I"C:/Program Files/R/R-3.6.0/library/RcppEigen/include/" -I"C:/Program Files/R/R-3.6.0/library/RcppEigen/include/unsupported" -I"C:/Program Files/R/R-3.6.0/library/BH/include" -I"C:/Program Files/R/R-3.6.0/library/StanHeaders/include/src/" -I"C:/Program Files/R/R-3.6.0/library/StanHeaders/include/" -I"C:/Program Files/R/R-3.6.0/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -std=c++1y >> Program source : 1 : 2 : // includes from the plugin 3 : // [[Rcpp::plugins(cpp14)]] 4 : 5 : // user includes 6 : #define STAN__SERVICES__COMMAND_HPP// Code generated by Stan version 2.19.1 7 : 8 : #include 9 : 10 : namespace model1b2455d20a2_ES_namespace { 11 : 12 : using std::istream; 13 : using std::string; 14 : using std::stringstream; 15 : using std::vector; 16 : using stan::io::dump; 17 : using stan::math::lgamma; 18 : using stan::model::prob_grad; 19 : using namespace stan::math; 20 : 21 : static int current_statement_begin__; 22 : 23 : stan::io::program_reader prog_reader__() { 24 : stan::io::program_reader reader; 25 : reader.add_event(0, 0, "start", "model1b2455d20a2_ES"); 26 : reader.add_event(19, 17, "end", "model1b2455d20a2_ES"); 27 : return reader; 28 : } 29 : 30 : class model1b2455d20a2_ES : public prob_grad { 31 : private: 32 : int J; 33 : std::vector y; 34 : std::vector sigma; 35 : public: 36 : model1b2455d20a2_ES(stan::io::var_context& context__, 37 : std::ostream* pstream__ = 0) 38 : : prob_grad(0) { 39 : ctor_body(context__, 0, pstream__); 40 : } 41 : 42 : model1b2455d20a2_ES(stan::io::var_context& context__, 43 : unsigned int random_seed__, 44 : std::ostream* pstream__ = 0) 45 : : prob_grad(0) { 46 : ctor_body(context__, random_seed__, pstream__); 47 : } 48 : 49 : void ctor_body(stan::io::var_context& context__, 50 : unsigned int random_seed__, 51 : std::ostream* pstream__) { 52 : typedef double local_scalar_t__; 53 : 54 : boost::ecuyer1988 base_rng__ = 55 : stan::services::util::create_rng(random_seed__, 0); 56 : (void) base_rng__; // suppress unused var warning 57 : 58 : current_statement_begin__ = -1; 59 : 60 : static const char* function__ = "model1b2455d20a2_ES_namespace::model1b2455d20a2_ES"; 61 : (void) function__; // dummy to suppress unused var warning 62 : size_t pos__; 63 : (void) pos__; // dummy to suppress unused var warning 64 : std::vector vals_i__; 65 : std::vector vals_r__; 66 : local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 67 : (void) DUMMY_VAR__; // suppress unused var warning 68 : 69 : try { 70 : // initialize data block variables from context__ 71 : current_statement_begin__ = 2; 72 : context__.validate_dims("data initialization", "J", "int", context__.to_vec()); 73 : J = int(0); 74 : vals_i__ = context__.vals_i("J"); 75 : pos__ = 0; 76 : J = vals_i__[pos__++]; 77 : check_greater_or_equal(function__, "J", J, 0); 78 : 79 : current_statement_begin__ = 3; 80 : validate_non_negative_index("y", "J", J); 81 : context__.validate_dims("data initialization", "y", "double", context__.to_vec(J)); 82 : y = std::vector(J, double(0)); 83 : vals_r__ = context__.vals_r("y"); 84 : pos__ = 0; 85 : size_t y_k_0_max__ = J; 86 : for (size_t k_0__ = 0; k_0__ < y_k_0_max__; ++k_0__) { 87 : y[k_0__] = vals_r__[pos__++]; 88 : } 89 : 90 : current_statement_begin__ = 4; 91 : validate_non_negative_index("sigma", "J", J); 92 : context__.validate_dims("data initialization", "sigma", "double", context__.to_vec(J)); 93 : sigma = std::vector(J, double(0)); 94 : vals_r__ = context__.vals_r("sigma"); 95 : pos__ = 0; 96 : size_t sigma_k_0_max__ = J; 97 : for (size_t k_0__ = 0; k_0__ < sigma_k_0_max__; ++k_0__) { 98 : sigma[k_0__] = vals_r__[pos__++]; 99 : } 100 : size_t sigma_i_0_max__ = J; 101 : for (size_t i_0__ = 0; i_0__ < sigma_i_0_max__; ++i_0__) { 102 : check_greater_or_equal(function__, "sigma[i_0__]", sigma[i_0__], 0); 103 : } 104 : 105 : 106 : // initialize transformed data variables 107 : // execute transformed data statements 108 : 109 : // validate transformed data 110 : 111 : // validate, set parameter ranges 112 : num_params_r__ = 0U; 113 : param_ranges_i__.clear(); 114 : current_statement_begin__ = 7; 115 : num_params_r__ += 1; 116 : current_statement_begin__ = 8; 117 : num_params_r__ += 1; 118 : current_statement_begin__ = 9; 119 : validate_non_negative_index("eta", "J", J); 120 : num_params_r__ += J; 121 : } catch (const std::exception& e) { 122 : stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); 123 : // Next line prevents compiler griping about no return 124 : throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 125 : } 126 : } 127 : 128 : ~model1b2455d20a2_ES() { } 129 : 130 : 131 : void transform_inits(const stan::io::var_context& context__, 132 : std::vector& params_i__, 133 : std::vector& params_r__, 134 : std::ostream* pstream__) const { 135 : typedef double local_scalar_t__; 136 : stan::io::writer writer__(params_r__, params_i__); 137 : size_t pos__; 138 : (void) pos__; // dummy call to supress warning 139 : std::vector vals_r__; 140 : std::vector vals_i__; 141 : 142 : current_statement_begin__ = 7; 143 : if (!(context__.contains_r("mu"))) 144 : stan::lang::rethrow_located(std::runtime_error(std::string("Variable mu missing")), current_statement_begin__, prog_reader__()); 145 : vals_r__ = context__.vals_r("mu"); 146 : pos__ = 0U; 147 : context__.validate_dims("parameter initialization", "mu", "double", context__.to_vec()); 148 : double mu(0); 149 : mu = vals_r__[pos__++]; 150 : try { 151 : writer__.scalar_unconstrain(mu); 152 : } catch (const std::exception& e) { 153 : stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable mu: ") + e.what()), current_statement_begin__, prog_reader__()); 154 : } 155 : 156 : current_statement_begin__ = 8; 157 : if (!(context__.contains_r("tau"))) 158 : stan::lang::rethrow_located(std::runtime_error(std::string("Variable tau missing")), current_statement_begin__, prog_reader__()); 159 : vals_r__ = context__.vals_r("tau"); 160 : pos__ = 0U; 161 : context__.validate_dims("parameter initialization", "tau", "double", context__.to_vec()); 162 : double tau(0); 163 : tau = vals_r__[pos__++]; 164 : try { 165 : writer__.scalar_lb_unconstrain(0, tau); 166 : } catch (const std::exception& e) { 167 : stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable tau: ") + e.what()), current_statement_begin__, prog_reader__()); 168 : } 169 : 170 : current_statement_begin__ = 9; 171 : if (!(context__.contains_r("eta"))) 172 : stan::lang::rethrow_located(std::runtime_error(std::string("Variable eta missing")), current_statement_begin__, prog_reader__()); 173 : vals_r__ = context__.vals_r("eta"); 174 : pos__ = 0U; 175 : validate_non_negative_index("eta", "J", J); 176 : context__.validate_dims("parameter initialization", "eta", "vector_d", context__.to_vec(J)); 177 : Eigen::Matrix eta(J); 178 : size_t eta_j_1_max__ = J; 179 : for (size_t j_1__ = 0; j_1__ < eta_j_1_max__; ++j_1__) { 180 : eta(j_1__) = vals_r__[pos__++]; 181 : } 182 : try { 183 : writer__.vector_unconstrain(eta); 184 : } catch (const std::exception& e) { 185 : stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable eta: ") + e.what()), current_statement_begin__, prog_reader__()); 186 : } 187 : 188 : params_r__ = writer__.data_r(); 189 : params_i__ = writer__.data_i(); 190 : } 191 : 192 : void transform_inits(const stan::io::var_context& context, 193 : Eigen::Matrix& params_r, 194 : std::ostream* pstream__) const { 195 : std::vector params_r_vec; 196 : std::vector params_i_vec; 197 : transform_inits(context, params_i_vec, params_r_vec, pstream__); 198 : params_r.resize(params_r_vec.size()); 199 : for (int i = 0; i < params_r.size(); ++i) 200 : params_r(i) = params_r_vec[i]; 201 : } 202 : 203 : 204 : template 205 : T__ log_prob(std::vector& params_r__, 206 : std::vector& params_i__, 207 : std::ostream* pstream__ = 0) const { 208 : 209 : typedef T__ local_scalar_t__; 210 : 211 : local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 212 : (void) DUMMY_VAR__; // dummy to suppress unused var warning 213 : 214 : T__ lp__(0.0); 215 : stan::math::accumulator lp_accum__; 216 : try { 217 : stan::io::reader in__(params_r__, params_i__); 218 : 219 : // model parameters 220 : current_statement_begin__ = 7; 221 : local_scalar_t__ mu; 222 : (void) mu; // dummy to suppress unused var warning 223 : if (jacobian__) 224 : mu = in__.scalar_constrain(lp__); 225 : else 226 : mu = in__.scalar_constrain(); 227 : 228 : current_statement_begin__ = 8; 229 : local_scalar_t__ tau; 230 : (void) tau; // dummy to suppress unused var warning 231 : if (jacobian__) 232 : tau = in__.scalar_lb_constrain(0, lp__); 233 : else 234 : tau = in__.scalar_lb_constrain(0); 235 : 236 : current_statement_begin__ = 9; 237 : Eigen::Matrix eta; 238 : (void) eta; // dummy to suppress unused var warning 239 : if (jacobian__) 240 : eta = in__.vector_constrain(J, lp__); 241 : else 242 : eta = in__.vector_constrain(J); 243 : 244 : // transformed parameters 245 : current_statement_begin__ = 12; 246 : validate_non_negative_index("theta", "J", J); 247 : Eigen::Matrix theta(J); 248 : stan::math::initialize(theta, DUMMY_VAR__); 249 : stan::math::fill(theta, DUMMY_VAR__); 250 : stan::math::assign(theta,add(mu, multiply(tau, eta))); 251 : 252 : // validate transformed parameters 253 : const char* function__ = "validate transformed params"; 254 : (void) function__; // dummy to suppress unused var warning 255 : 256 : current_statement_begin__ = 12; 257 : size_t theta_j_1_max__ = J; 258 : for (size_t j_1__ = 0; j_1__ < theta_j_1_max__; ++j_1__) { 259 : if (stan::math::is_uninitialized(theta(j_1__))) { 260 : std::stringstream msg__; 261 : msg__ << "Undefined transformed parameter: theta" << "(" << j_1__ << ")"; 262 : stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable theta: ") + msg__.str()), current_statement_begin__, prog_reader__()); 263 : } 264 : } 265 : 266 : // model body 267 : 268 : current_statement_begin__ = 15; 269 : lp_accum__.add(normal_log(eta, 0, 1)); 270 : current_statement_begin__ = 16; 271 : lp_accum__.add(normal_log(y, theta, sigma)); 272 : 273 : } catch (const std::exception& e) { 274 : stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); 275 : // Next line prevents compiler griping about no return 276 : throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 277 : } 278 : 279 : lp_accum__.add(lp__); 280 : return lp_accum__.sum(); 281 : 282 : } // log_prob() 283 : 284 : template 285 : T_ log_prob(Eigen::Matrix& params_r, 286 : std::ostream* pstream = 0) const { 287 : std::vector vec_params_r; 288 : vec_params_r.reserve(params_r.size()); 289 : for (int i = 0; i < params_r.size(); ++i) 290 : vec_params_r.push_back(params_r(i)); 291 : std::vector vec_params_i; 292 : return log_prob(vec_params_r, vec_params_i, pstream); 293 : } 294 : 295 : 296 : void get_param_names(std::vector& names__) const { 297 : names__.resize(0); 298 : names__.push_back("mu"); 299 : names__.push_back("tau"); 300 : names__.push_back("eta"); 301 : names__.push_back("theta"); 302 : } 303 : 304 : 305 : void get_dims(std::vector >& dimss__) const { 306 : dimss__.resize(0); 307 : std::vector dims__; 308 : dims__.resize(0); 309 : dimss__.push_back(dims__); 310 : dims__.resize(0); 311 : dimss__.push_back(dims__); 312 : dims__.resize(0); 313 : dims__.push_back(J); 314 : dimss__.push_back(dims__); 315 : dims__.resize(0); 316 : dims__.push_back(J); 317 : dimss__.push_back(dims__); 318 : } 319 : 320 : template 321 : void write_array(RNG& base_rng__, 322 : std::vector& params_r__, 323 : std::vector& params_i__, 324 : std::vector& vars__, 325 : bool include_tparams__ = true, 326 : bool include_gqs__ = true, 327 : std::ostream* pstream__ = 0) const { 328 : typedef double local_scalar_t__; 329 : 330 : vars__.resize(0); 331 : stan::io::reader in__(params_r__, params_i__); 332 : static const char* function__ = "model1b2455d20a2_ES_namespace::write_array"; 333 : (void) function__; // dummy to suppress unused var warning 334 : 335 : // read-transform, write parameters 336 : double mu = in__.scalar_constrain(); 337 : vars__.push_back(mu); 338 : 339 : double tau = in__.scalar_lb_constrain(0); 340 : vars__.push_back(tau); 341 : 342 : Eigen::Matrix eta = in__.vector_constrain(J); 343 : size_t eta_j_1_max__ = J; 344 : for (size_t j_1__ = 0; j_1__ < eta_j_1_max__; ++j_1__) { 345 : vars__.push_back(eta(j_1__)); 346 : } 347 : 348 : double lp__ = 0.0; 349 : (void) lp__; // dummy to suppress unused var warning 350 : stan::math::accumulator lp_accum__; 351 : 352 : local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 353 : (void) DUMMY_VAR__; // suppress unused var warning 354 : 355 : if (!include_tparams__ && !include_gqs__) return; 356 : 357 : try { 358 : // declare and define transformed parameters 359 : current_statement_begin__ = 12; 360 : validate_non_negative_index("theta", "J", J); 361 : Eigen::Matrix theta(J); 362 : stan::math::initialize(theta, DUMMY_VAR__); 363 : stan::math::fill(theta, DUMMY_VAR__); 364 : stan::math::assign(theta,add(mu, multiply(tau, eta))); 365 : 366 : if (!include_gqs__ && !include_tparams__) return; 367 : // validate transformed parameters 368 : const char* function__ = "validate transformed params"; 369 : (void) function__; // dummy to suppress unused var warning 370 : 371 : // write transformed parameters 372 : if (include_tparams__) { 373 : size_t theta_j_1_max__ = J; 374 : for (size_t j_1__ = 0; j_1__ < theta_j_1_max__; ++j_1__) { 375 : vars__.push_back(theta(j_1__)); 376 : } 377 : } 378 : if (!include_gqs__) return; 379 : } catch (const std::exception& e) { 380 : stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); 381 : // Next line prevents compiler griping about no return 382 : throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 383 : } 384 : } 385 : 386 : template 387 : void write_array(RNG& base_rng, 388 : Eigen::Matrix& params_r, 389 : Eigen::Matrix& vars, 390 : bool include_tparams = true, 391 : bool include_gqs = true, 392 : std::ostream* pstream = 0) const { 393 : std::vector params_r_vec(params_r.size()); 394 : for (int i = 0; i < params_r.size(); ++i) 395 : params_r_vec[i] = params_r(i); 396 : std::vector vars_vec; 397 : std::vector params_i_vec; 398 : write_array(base_rng, params_r_vec, params_i_vec, vars_vec, include_tparams, include_gqs, pstream); 399 : vars.resize(vars_vec.size()); 400 : for (int i = 0; i < vars.size(); ++i) 401 : vars(i) = vars_vec[i]; 402 : } 403 : 404 : static std::string model_name() { 405 : return "model1b2455d20a2_ES"; 406 : } 407 : 408 : 409 : void constrained_param_names(std::vector& param_names__, 410 : bool include_tparams__ = true, 411 : bool include_gqs__ = true) const { 412 : std::stringstream param_name_stream__; 413 : param_name_stream__.str(std::string()); 414 : param_name_stream__ << "mu"; 415 : param_names__.push_back(param_name_stream__.str()); 416 : param_name_stream__.str(std::string()); 417 : param_name_stream__ << "tau"; 418 : param_names__.push_back(param_name_stream__.str()); 419 : size_t eta_j_1_max__ = J; 420 : for (size_t j_1__ = 0; j_1__ < eta_j_1_max__; ++j_1__) { 421 : param_name_stream__.str(std::string()); 422 : param_name_stream__ << "eta" << '.' << j_1__ + 1; 423 : param_names__.push_back(param_name_stream__.str()); 424 : } 425 : 426 : if (!include_gqs__ && !include_tparams__) return; 427 : 428 : if (include_tparams__) { 429 : size_t theta_j_1_max__ = J; 430 : for (size_t j_1__ = 0; j_1__ < theta_j_1_max__; ++j_1__) { 431 : param_name_stream__.str(std::string()); 432 : param_name_stream__ << "theta" << '.' << j_1__ + 1; 433 : param_names__.push_back(param_name_stream__.str()); 434 : } 435 : } 436 : 437 : if (!include_gqs__) return; 438 : } 439 : 440 : 441 : void unconstrained_param_names(std::vector& param_names__, 442 : bool include_tparams__ = true, 443 : bool include_gqs__ = true) const { 444 : std::stringstream param_name_stream__; 445 : param_name_stream__.str(std::string()); 446 : param_name_stream__ << "mu"; 447 : param_names__.push_back(param_name_stream__.str()); 448 : param_name_stream__.str(std::string()); 449 : param_name_stream__ << "tau"; 450 : param_names__.push_back(param_name_stream__.str()); 451 : size_t eta_j_1_max__ = J; 452 : for (size_t j_1__ = 0; j_1__ < eta_j_1_max__; ++j_1__) { 453 : param_name_stream__.str(std::string()); 454 : param_name_stream__ << "eta" << '.' << j_1__ + 1; 455 : param_names__.push_back(param_name_stream__.str()); 456 : } 457 : 458 : if (!include_gqs__ && !include_tparams__) return; 459 : 460 : if (include_tparams__) { 461 : size_t theta_j_1_max__ = J; 462 : for (size_t j_1__ = 0; j_1__ < theta_j_1_max__; ++j_1__) { 463 : param_name_stream__.str(std::string()); 464 : param_name_stream__ << "theta" << '.' << j_1__ + 1; 465 : param_names__.push_back(param_name_stream__.str()); 466 : } 467 : } 468 : 469 : if (!include_gqs__) return; 470 : } 471 : 472 : }; // model 473 : 474 : } // namespace 475 : 476 : typedef model1b2455d20a2_ES_namespace::model1b2455d20a2_ES stan_model; 477 : 478 : #include 479 : /** 480 : * Define Rcpp Module to expose stan_fit's functions to R. 481 : */ 482 : RCPP_MODULE(stan_fit4model1b2455d20a2_ES_mod){ 483 : Rcpp::class_ >("stan_fit4model1b2455d20a2_ES") 485 : // .constructor() 486 : .constructor() 487 : // .constructor() 488 : .method("call_sampler", 489 : &rstan::stan_fit::call_sampler) 490 : .method("param_names", 491 : &rstan::stan_fit::param_names) 492 : .method("param_names_oi", 493 : &rstan::stan_fit::param_names_oi) 494 : .method("param_fnames_oi", 495 : &rstan::stan_fit::param_fnames_oi) 496 : .method("param_dims", 497 : &rstan::stan_fit::param_dims) 498 : .method("param_dims_oi", 499 : &rstan::stan_fit::param_dims_oi) 500 : .method("update_param_oi", 501 : &rstan::stan_fit::update_param_oi) 502 : .method("param_oi_tidx", 503 : &rstan::stan_fit::param_oi_tidx) 504 : .method("grad_log_prob", 505 : &rstan::stan_fit::grad_log_prob) 506 : .method("log_prob", 507 : &rstan::stan_fit::log_prob) 508 : .method("unconstrain_pars", 509 : &rstan::stan_fit::unconstrain_pars) 510 : .method("constrain_pars", 511 : &rstan::stan_fit::constrain_pars) 512 : .method("num_pars_unconstrained", 513 : &rstan::stan_fit::num_pars_unconstrained) 514 : .method("unconstrained_param_names", 515 : &rstan::stan_fit::unconstrained_param_names) 516 : .method("constrained_param_names", 517 : &rstan::stan_fit::constrained_param_names) 518 : .method("standalone_gqs", 519 : &rstan::stan_fit::standalone_gqs) 520 : ; 521 : } 522 : 523 : // declarations 524 : extern "C" { 525 : SEXP file1b246b068fd( ) ; 526 : } 527 : 528 : // definition 529 : 530 : SEXP file1b246b068fd( ){ 531 : return Rcpp::wrap("ES"); 532 : } 533 : 534 : Compilation argument: C:/Rtools/mingw_64/bin/g++ -std=gnu++11 -I"C:/PROGRA~1/R/R-36~1.0/include" -DNDEBUG -I"C:/Program Files/R/R-3.6.0/library/Rcpp/include/" -I"C:/Program Files/R/R-3.6.0/library/RcppEigen/include/" -I"C:/Program Files/R/R-3.6.0/library/RcppEigen/include/unsupported" -I"C:/Program Files/R/R-3.6.0/library/BH/include" -I"C:/Program Files/R/R-3.6.0/library/StanHeaders/include/src/" -I"C:/Program Files/R/R-3.6.0/library/StanHeaders/include/" -I"C:/Program Files/R/R-3.6.0/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -std=c++1y -march=core2 -O3 -march=native -mtune=native -c file1b246b068fd.cpp -o file1b246b068fd.o C:/PROGRA~1/R/R-36~1.0/bin/x64/R CMD SHLIB file1b246b068fd.cpp 2> file1b246b068fd.cpp.err.txt In file included from C:/Program Files/R/R-3.6.0/library/BH/include/boost/random/detail/integer_log2.hpp:19:0, from C:/Program Files/R/R-3.6.0/library/BH/include/boost/random/detail/int_float_pair.hpp:26, from C:/Program Files/R/R-3.6.0/library/BH/include/boost/random/exponential_distribution.hpp:27, from C:/Program Files/R/R-3.6.0/library/BH/include/boost/random/gamma_distribution.hpp:25, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_rng.hpp:5, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/stan/math/prim/mat.hpp:292, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/stan/math/rev/mat.hpp:12, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/stan/math.hpp:4, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/src/stan/model/model_header.hpp:4, from file1b246b068fd.cpp:8: C:/Program Files/R/R-3.6.0/library/BH/include/boost/pending/integer_log2.hpp:7:89: note: #pragma message: This header is deprecated. Use instead. BOOST_HEADER_DEPRECATED(""); ^ C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s: Assembler messages: C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:6927: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:6929: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:17171: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:83280: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:83282: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:83284: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:111266: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:161656: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:162130: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200167: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200169: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200171: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200173: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200175: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200177: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200179: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200181: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:200183: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205802: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205804: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205806: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205808: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205810: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205812: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205814: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205816: Error: invalid register for .seh_savexmm C:\Users\gubi\AppData\Local\Temp\ccBj1Gtv.s:205818: Error: invalid register for .seh_savexmm make: *** [C:/PROGRA~1/R/R-36~1.0/etc/x64/Makeconf:215: file1b246b068fd.o] Error 1 ERROR(s) during compilation: source code errors or compiler configuration errors! Program source: 1: 2: // includes from the plugin 3: // [[Rcpp::plugins(cpp14)]] 4: 5: // user includes 6: #define STAN__SERVICES__COMMAND_HPP// Code generated by Stan version 2.19.1 7: 8: #include 9: 10: namespace model1b2455d20a2_ES_namespace { 11: 12: using std::istream; 13: using std::string; 14: using std::stringstream; 15: using std::vector; 16: using stan::io::dump; 17: using stan::math::lgamma; 18: using stan::model::prob_grad; 19: using namespace stan::math; 20: 21: static int current_statement_begin__; 22: 23: stan::io::program_reader prog_reader__() { 24: stan::io::program_reader reader; 25: reader.add_event(0, 0, "start", "model1b2455d20a2_ES"); 26: reader.add_event(19, 17, "end", "model1b2455d20a2_ES"); 27: return reader; 28: } 29: 30: class model1b2455d20a2_ES : public prob_grad { 31: private: 32: int J; 33: std::vector y; 34: std::vector sigma; 35: public: 36: model1b2455d20a2_ES(stan::io::var_context& context__, 37: std::ostream* pstream__ = 0) 38: : prob_grad(0) { 39: ctor_body(context__, 0, pstream__); 40: } 41: 42: model1b2455d20a2_ES(stan::io::var_context& context__, 43: unsigned int random_seed__, 44: std::ostream* pstream__ = 0) 45: : prob_grad(0) { 46: ctor_body(context__, random_seed__, pstream__); 47: } 48: 49: void ctor_body(stan::io::var_context& context__, 50: unsigned int random_seed__, 51: std::ostream* pstream__) { 52: typedef double local_scalar_t__; 53: 54: boost::ecuyer1988 base_rng__ = 55: stan::services::util::create_rng(random_seed__, 0); 56: (void) base_rng__; // suppress unused var warning 57: 58: current_statement_begin__ = -1; 59: 60: static const char* function__ = "model1b2455d20a2_ES_namespace::model1b2455d20a2_ES"; 61: (void) function__; // dummy to suppress unused var warning 62: size_t pos__; 63: (void) pos__; // dummy to suppress unused var warning 64: std::vector vals_i__; 65: std::vector vals_r__; 66: local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 67: (void) DUMMY_VAR__; // suppress unused var warning 68: 69: try { 70: // initialize data block variables from context__ 71: current_statement_begin__ = 2; 72: context__.validate_dims("data initialization", "J", "int", context__.to_vec()); 73: J = int(0); 74: vals_i__ = context__.vals_i("J"); 75: pos__ = 0; 76: J = vals_i__[pos__++]; 77: check_greater_or_equal(function__, "J", J, 0); 78: 79: current_statement_begin__ = 3; 80: validate_non_negative_index("y", "J", J); 81: context__.validate_dims("data initialization", "y", "double", context__.to_vec(J)); 82: y = std::vector(J, double(0)); 83: vals_r__ = context__.vals_r("y"); 84: pos__ = 0; 85: size_t y_k_0_max__ = J; 86: for (size_t k_0__ = 0; k_0__ < y_k_0_max__; ++k_0__) { 87: y[k_0__] = vals_r__[pos__++]; 88: } 89: 90: current_statement_begin__ = 4; 91: validate_non_negative_index("sigma", "J", J); 92: context__.validate_dims("data initialization", "sigma", "double", context__.to_vec(J)); 93: sigma = std::vector(J, double(0)); 94: vals_r__ = context__.vals_r("sigma"); 95: pos__ = 0; 96: size_t sigma_k_0_max__ = J; 97: for (size_t k_0__ = 0; k_0__ < sigma_k_0_max__; ++k_0__) { 98: sigma[k_0__] = vals_r__[pos__++]; 99: } 100: size_t sigma_i_0_max__ = J; 101: for (size_t i_0__ = 0; i_0__ < sigma_i_0_max__; ++i_0__) { 102: check_greater_or_equal(function__, "sigma[i_0__]", sigma[i_0__], 0); 103: } 104: 105: 106: // initialize transformed data variables 107: // execute transformed data statements 108: 109: // validate transformed data 110: 111: // validate, set parameter ranges 112: num_params_r__ = 0U; 113: param_ranges_i__.clear(); 114: current_statement_begin__ = 7; 115: num_params_r__ += 1; 116: current_statement_begin__ = 8; 117: num_params_r__ += 1; 118: current_statement_begin__ = 9; 119: validate_non_negative_index("eta", "J", J); 120: num_params_r__ += J; 121: } catch (const std::exception& e) { 122: stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); 123: // Next line prevents compiler griping about no return 124: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 125: } 126: } 127: 128: ~model1b2455d20a2_ES() { } 129: 130: 131: void transform_inits(const stan::io::var_context& context__, 132: std::vector& params_i__, 133: std::vector& params_r__, 134: std::ostream* pstream__) const { 135: typedef double local_scalar_t__; 136: stan::io::writer writer__(params_r__, params_i__); 137: size_t pos__; 138: (void) pos__; // dummy call to supress warning 139: std::vector vals_r__; 140: std::vector vals_i__; 141: 142: current_statement_begin__ = 7; 143: if (!(context__.contains_r("mu"))) 144: stan::lang::rethrow_located(std::runtime_error(std::string("Variable mu missing")), current_statement_begin__, prog_reader__()); 145: vals_r__ = context__.vals_r("mu"); 146: pos__ = 0U; 147: context__.validate_dims("parameter initialization", "mu", "double", context__.to_vec()); 148: double mu(0); 149: mu = vals_r__[pos__++]; 150: try { 151: writer__.scalar_unconstrain(mu); 152: } catch (const std::exception& e) { 153: stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable mu: ") + e.what()), current_statement_begin__, prog_reader__()); 154: } 155: 156: current_statement_begin__ = 8; 157: if (!(context__.contains_r("tau"))) 158: stan::lang::rethrow_located(std::runtime_error(std::string("Variable tau missing")), current_statement_begin__, prog_reader__()); 159: vals_r__ = context__.vals_r("tau"); 160: pos__ = 0U; 161: context__.validate_dims("parameter initialization", "tau", "double", context__.to_vec()); 162: double tau(0); 163: tau = vals_r__[pos__++]; 164: try { 165: writer__.scalar_lb_unconstrain(0, tau); 166: } catch (const std::exception& e) { 167: stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable tau: ") + e.what()), current_statement_begin__, prog_reader__()); 168: } 169: 170: current_statement_begin__ = 9; 171: if (!(context__.contains_r("eta"))) 172: stan::lang::rethrow_located(std::runtime_error(std::string("Variable eta missing")), current_statement_begin__, prog_reader__()); 173: vals_r__ = context__.vals_r("eta"); 174: pos__ = 0U; 175: validate_non_negative_index("eta", "J", J); 176: context__.validate_dims("parameter initialization", "eta", "vector_d", context__.to_vec(J)); 177: Eigen::Matrix eta(J); 178: size_t eta_j_1_max__ = J; 179: for (size_t j_1__ = 0; j_1__ < eta_j_1_max__; ++j_1__) { 180: eta(j_1__) = vals_r__[pos__++]; 181: } 182: try { 183: writer__.vector_unconstrain(eta); 184: } catch (const std::exception& e) { 185: stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable eta: ") + e.what()), current_statement_begin__, prog_reader__()); 186: } 187: 188: params_r__ = writer__.data_r(); 189: params_i__ = writer__.data_i(); 190: } 191: 192: void transform_inits(const stan::io::var_context& context, 193: Eigen::Matrix& params_r, 194: std::ostream* pstream__) const { 195: std::vector params_r_vec; 196: std::vector params_i_vec; 197: transform_inits(context, params_i_vec, params_r_vec, pstream__); 198: params_r.resize(params_r_vec.size()); 199: for (int i = 0; i < params_r.size(); ++i) 200: params_r(i) = params_r_vec[i]; 201: } 202: 203: 204: template 205: T__ log_prob(std::vector& params_r__, 206: std::vector& params_i__, 207: std::ostream* pstream__ = 0) const { 208: 209: typedef T__ local_scalar_t__; 210: 211: local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 212: (void) DUMMY_VAR__; // dummy to suppress unused var warning 213: 214: T__ lp__(0.0); 215: stan::math::accumulator lp_accum__; 216: try { 217: stan::io::reader in__(params_r__, params_i__); 218: 219: // model parameters 220: current_statement_begin__ = 7; 221: local_scalar_t__ mu; 222: (void) mu; // dummy to suppress unused var warning 223: if (jacobian__) 224: mu = in__.scalar_constrain(lp__); 225: else 226: mu = in__.scalar_constrain(); 227: 228: current_statement_begin__ = 8; 229: local_scalar_t__ tau; 230: (void) tau; // dummy to suppress unused var warning 231: if (jacobian__) 232: tau = in__.scalar_lb_constrain(0, lp__); 233: else 234: tau = in__.scalar_lb_constrain(0); 235: 236: current_statement_begin__ = 9; 237: Eigen::Matrix eta; 238: (void) eta; // dummy to suppress unused var warning 239: if (jacobian__) 240: eta = in__.vector_constrain(J, lp__); 241: else 242: eta = in__.vector_constrain(J); 243: 244: // transformed parameters 245: current_statement_begin__ = 12; 246: validate_non_negative_index("theta", "J", J); 247: Eigen::Matrix theta(J); 248: stan::math::initialize(theta, DUMMY_VAR__); 249: stan::math::fill(theta, DUMMY_VAR__); 250: stan::math::assign(theta,add(mu, multiply(tau, eta))); 251: 252: // validate transformed parameters 253: const char* function__ = "validate transformed params"; 254: (void) function__; // dummy to suppress unused var warning 255: 256: current_statement_begin__ = 12; 257: size_t theta_j_1_max__ = J; 258: for (size_t j_1__ = 0; j_1__ < theta_j_1_max__; ++j_1__) { 259: if (stan::math::is_uninitialized(theta(j_1__))) { 260: std::stringstream msg__; 261: msg__ << "Undefined transformed parameter: theta" << "(" << j_1__ << ")"; 262: stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable theta: ") + msg__.str()), current_statement_begin__, prog_reader__()); 263: } 264: } 265: 266: // model body 267: 268: current_statement_begin__ = 15; 269: lp_accum__.add(normal_log(eta, 0, 1)); 270: current_statement_begin__ = 16; 271: lp_accum__.add(normal_log(y, theta, sigma)); 272: 273: } catch (const std::exception& e) { 274: stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); 275: // Next line prevents compiler griping about no return 276: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 277: } 278: 279: lp_accum__.add(lp__); 280: return lp_accum__.sum(); 281: 282: } // log_prob() 283: 284: template 285: T_ log_prob(Eigen::Matrix& params_r, 286: std::ostream* pstream = 0) const { 287: std::vector vec_params_r; 288: vec_params_r.reserve(params_r.size()); 289: for (int i = 0; i < params_r.size(); ++i) 290: vec_params_r.push_back(params_r(i)); 291: std::vector vec_params_i; 292: return log_prob(vec_params_r, vec_params_i, pstream); 293: } 294: 295: 296: void get_param_names(std::vector& names__) const { 297: names__.resize(0); 298: names__.push_back("mu"); 299: names__.push_back("tau"); 300: names__.push_back("eta"); 301: names__.push_back("theta"); 302: } 303: 304: 305: void get_dims(std::vector >& dimss__) const { 306: dimss__.resize(0); 307: std::vector dims__; 308: dims__.resize(0); 309: dimss__.push_back(dims__); 310: dims__.resize(0); 311: dimss__.push_back(dims__); 312: dims__.resize(0); 313: dims__.push_back(J); 314: dimss__.push_back(dims__); 315: dims__.resize(0); 316: dims__.push_back(J); 317: dimss__.push_back(dims__); 318: } 319: 320: template 321: void write_array(RNG& base_rng__, 322: std::vector& params_r__, 323: std::vector& params_i__, 324: std::vector& vars__, 325: bool include_tparams__ = true, 326: bool include_gqs__ = true, 327: std::ostream* pstream__ = 0) const { 328: typedef double local_scalar_t__; 329: 330: vars__.resize(0); 331: stan::io::reader in__(params_r__, params_i__); 332: static const char* function__ = "model1b2455d20a2_ES_namespace::write_array"; 333: (void) function__; // dummy to suppress unused var warning 334: 335: // read-transform, write parameters 336: double mu = in__.scalar_constrain(); 337: vars__.push_back(mu); 338: 339: double tau = in__.scalar_lb_constrain(0); 340: vars__.push_back(tau); 341: 342: Eigen::Matrix eta = in__.vector_constrain(J); 343: size_t eta_j_1_max__ = J; 344: for (size_t j_1__ = 0; j_1__ < eta_j_1_max__; ++j_1__) { 345: vars__.push_back(eta(j_1__)); 346: } 347: 348: double lp__ = 0.0; 349: (void) lp__; // dummy to suppress unused var warning 350: stan::math::accumulator lp_accum__; 351: 352: local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 353: (void) DUMMY_VAR__; // suppress unused var warning 354: 355: if (!include_tparams__ && !include_gqs__) return; 356: 357: try { 358: // declare and define transformed parameters 359: current_statement_begin__ = 12; 360: validate_non_negative_index("theta", "J", J); 361: Eigen::Matrix theta(J); 362: stan::math::initialize(theta, DUMMY_VAR__); 363: stan::math::fill(theta, DUMMY_VAR__); 364: stan::math::assign(theta,add(mu, multiply(tau, eta))); 365: 366: if (!include_gqs__ && !include_tparams__) return; 367: // validate transformed parameters 368: const char* function__ = "validate transformed params"; 369: (void) function__; // dummy to suppress unused var warning 370: 371: // write transformed parameters 372: if (include_tparams__) { 373: size_t theta_j_1_max__ = J; 374: for (size_t j_1__ = 0; j_1__ < theta_j_1_max__; ++j_1__) { 375: vars__.push_back(theta(j_1__)); 376: } 377: } 378: if (!include_gqs__) return; 379: } catch (const std::exception& e) { 380: stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); 381: // Next line prevents compiler griping about no return 382: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 383: } 384: } 385: 386: template 387: void write_array(RNG& base_rng, 388: Eigen::Matrix& params_r, 389: Eigen::Matrix& vars, 390: bool include_tparams = true, 391: bool include_gqs = true, 392: std::ostream* pstream = 0) const { 393: std::vector params_r_vec(params_r.size()); 394: for (int i = 0; i < params_r.size(); ++i) 395: params_r_vec[i] = params_r(i); 396: std::vector vars_vec; 397: std::vector params_i_vec; 398: write_array(base_rng, params_r_vec, params_i_vec, vars_vec, include_tparams, include_gqs, pstream); 399: vars.resize(vars_vec.size()); 400: for (int i = 0; i < vars.size(); ++i) 401: vars(i) = vars_vec[i]; 402: } 403: 404: static std::string model_name() { 405: return "model1b2455d20a2_ES"; 406: } 407: 408: 409: void constrained_param_names(std::vector& param_names__, 410: bool include_tparams__ = true, 411: bool include_gqs__ = true) const { 412: std::stringstream param_name_stream__; 413: param_name_stream__.str(std::string()); 414: param_name_stream__ << "mu"; 415: param_names__.push_back(param_name_stream__.str()); 416: param_name_stream__.str(std::string()); 417: param_name_stream__ << "tau"; 418: param_names__.push_back(param_name_stream__.str()); 419: size_t eta_j_1_max__ = J; 420: for (size_t j_1__ = 0; j_1__ < eta_j_1_max__; ++j_1__) { 421: param_name_stream__.str(std::string()); 422: param_name_stream__ << "eta" << '.' << j_1__ + 1; 423: param_names__.push_back(param_name_stream__.str()); 424: } 425: 426: if (!include_gqs__ && !include_tparams__) return; 427: 428: if (include_tparams__) { 429: size_t theta_j_1_max__ = J; 430: for (size_t j_1__ = 0; j_1__ < theta_j_1_max__; ++j_1__) { 431: param_name_stream__.str(std::string()); 432: param_name_stream__ << "theta" << '.' << j_1__ + 1; 433: param_names__.push_back(param_name_stream__.str()); 434: } 435: } 436: 437: if (!include_gqs__) return; 438: } 439: 440: 441: void unconstrained_param_names(std::vector& param_names__, 442: bool include_tparams__ = true, 443: bool include_gqs__ = true) const { 444: std::stringstream param_name_stream__; 445: param_name_stream__.str(std::string()); 446: param_name_stream__ << "mu"; 447: param_names__.push_back(param_name_stream__.str()); 448: param_name_stream__.str(std::string()); 449: param_name_stream__ << "tau"; 450: param_names__.push_back(param_name_stream__.str()); 451: size_t eta_j_1_max__ = J; 452: for (size_t j_1__ = 0; j_1__ < eta_j_1_max__; ++j_1__) { 453: param_name_stream__.str(std::string()); 454: param_name_stream__ << "eta" << '.' << j_1__ + 1; 455: param_names__.push_back(param_name_stream__.str()); 456: } 457: 458: if (!include_gqs__ && !include_tparams__) return; 459: 460: if (include_tparams__) { 461: size_t theta_j_1_max__ = J; 462: for (size_t j_1__ = 0; j_1__ < theta_j_1_max__; ++j_1__) { 463: param_name_stream__.str(std::string()); 464: param_name_stream__ << "theta" << '.' << j_1__ + 1; 465: param_names__.push_back(param_name_stream__.str()); 466: } 467: } 468: 469: if (!include_gqs__) return; 470: } 471: 472: }; // model 473: 474: } // namespace 475: 476: typedef model1b2455d20a2_ES_namespace::model1b2455d20a2_ES stan_model; 477: 478: #include 479: /** 480: * Define Rcpp Module to expose stan_fit's functions to R. 481: */ 482: RCPP_MODULE(stan_fit4model1b2455d20a2_ES_mod){ 483: Rcpp::class_ >("stan_fit4model1b2455d20a2_ES") 485: // .constructor() 486: .constructor() 487: // .constructor() 488: .method("call_sampler", 489: &rstan::stan_fit::call_sampler) 490: .method("param_names", 491: &rstan::stan_fit::param_names) 492: .method("param_names_oi", 493: &rstan::stan_fit::param_names_oi) 494: .method("param_fnames_oi", 495: &rstan::stan_fit::param_fnames_oi) 496: .method("param_dims", 497: &rstan::stan_fit::param_dims) 498: .method("param_dims_oi", 499: &rstan::stan_fit::param_dims_oi) 500: .method("update_param_oi", 501: &rstan::stan_fit::update_param_oi) 502: .method("param_oi_tidx", 503: &rstan::stan_fit::param_oi_tidx) 504: .method("grad_log_prob", 505: &rstan::stan_fit::grad_log_prob) 506: .method("log_prob", 507: &rstan::stan_fit::log_prob) 508: .method("unconstrain_pars", 509: &rstan::stan_fit::unconstrain_pars) 510: .method("constrain_pars", 511: &rstan::stan_fit::constrain_pars) 512: .method("num_pars_unconstrained", 513: &rstan::stan_fit::num_pars_unconstrained) 514: .method("unconstrained_param_names", 515: &rstan::stan_fit::unconstrained_param_names) 516: .method("constrained_param_names", 517: &rstan::stan_fit::constrained_param_names) 518: .method("standalone_gqs", 519: &rstan::stan_fit::standalone_gqs) 520: ; 521: } 522: 523: // declarations 524: extern "C" { 525: SEXP file1b246b068fd( ) ; 526: } 527: 528: // definition 529: 530: SEXP file1b246b068fd( ){ 531: return Rcpp::wrap("ES"); 532: } 533: 534: Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! In file included from C:/Program Files/R/R-3.6.0/library/BH/include/boost/random/detail/integer_log2.hpp:19:0, from C:/Program Files/R/R-3.6.0/library/BH/include/boost/random/detail/int_float_pair.hpp:26, from C:/Program Files/R/R-3.6.0/library/BH/include/boost/random/exponential_distribution.hpp:27, from C:/Program Files/R/R-3.6.0/library/BH/include/boost/random/gamma_distribution.hpp:25, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_rng.hpp:5, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/stan/math/prim/mat.hpp:292, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/stan/math/rev/mat.hpp:12, from C:/Program Files/R/R-3.6.0/library/StanHeaders/include/stan/math.hpp:4, from C:/Program Files/R/R-3.6.0/library/StanHeaders