> post <- stan(model_code = make_stancode(y ~ 1 + (1 | algorithm), data = df1), + data = make_standata(y ~ 1 + (1 | algorithm), data = df1), + verbose = TRUE) TRANSLATING MODEL '4bd718ce37045da5116c1e4a2933dbfb' FROM Stan CODE TO C++ CODE NOW. successful in parsing the Stan model '4bd718ce37045da5116c1e4a2933dbfb'. COMPILING THE C++ CODE FOR MODEL '4bd718ce37045da5116c1e4a2933dbfb' NOW. OS: x86_64, darwin15.6.0; rstan: 2.19.2; Rcpp: 1.0.2; inline: 0.3.15 >> setting environment variables: PKG_LIBS = -L'/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/lib/' -lStanHeaders PKG_CPPFLAGS = -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS >> 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 model403872035a86_4bd718ce37045da5116c1e4a2933dbfb_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", "model403872035a86_4bd718ce37045da5116c1e4a2933dbfb"); 26 : reader.add_event(53, 51, "end", "model403872035a86_4bd718ce37045da5116c1e4a2933dbfb"); 27 : return reader; 28 : } 29 : 30 : class model403872035a86_4bd718ce37045da5116c1e4a2933dbfb : public prob_grad { 31 : private: 32 : int N; 33 : vector_d Y; 34 : int N_1; 35 : int M_1; 36 : std::vector J_1; 37 : vector_d Z_1_1; 38 : int prior_only; 39 : public: 40 : model403872035a86_4bd718ce37045da5116c1e4a2933dbfb(stan::io::var_context& context__, 41 : std::ostream* pstream__ = 0) 42 : : prob_grad(0) { 43 : ctor_body(context__, 0, pstream__); 44 : } 45 : 46 : model403872035a86_4bd718ce37045da5116c1e4a2933dbfb(stan::io::var_context& context__, 47 : unsigned int random_seed__, 48 : std::ostream* pstream__ = 0) 49 : : prob_grad(0) { 50 : ctor_body(context__, random_seed__, pstream__); 51 : } 52 : 53 : void ctor_body(stan::io::var_context& context__, 54 : unsigned int random_seed__, 55 : std::ostream* pstream__) { 56 : typedef double local_scalar_t__; 57 : 58 : boost::ecuyer1988 base_rng__ = 59 : stan::services::util::create_rng(random_seed__, 0); 60 : (void) base_rng__; // suppress unused var warning 61 : 62 : current_statement_begin__ = -1; 63 : 64 : static const char* function__ = "model403872035a86_4bd718ce37045da5116c1e4a2933dbfb_namespace::model403872035a86_4bd718ce37045da5116c1e4a2933dbfb"; 65 : (void) function__; // dummy to suppress unused var warning 66 : size_t pos__; 67 : (void) pos__; // dummy to suppress unused var warning 68 : std::vector vals_i__; 69 : std::vector vals_r__; 70 : local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 71 : (void) DUMMY_VAR__; // suppress unused var warning 72 : 73 : try { 74 : // initialize data block variables from context__ 75 : current_statement_begin__ = 5; 76 : context__.validate_dims("data initialization", "N", "int", context__.to_vec()); 77 : N = int(0); 78 : vals_i__ = context__.vals_i("N"); 79 : pos__ = 0; 80 : N = vals_i__[pos__++]; 81 : check_greater_or_equal(function__, "N", N, 1); 82 : 83 : current_statement_begin__ = 6; 84 : validate_non_negative_index("Y", "N", N); 85 : context__.validate_dims("data initialization", "Y", "vector_d", context__.to_vec(N)); 86 : Y = Eigen::Matrix(N); 87 : vals_r__ = context__.vals_r("Y"); 88 : pos__ = 0; 89 : size_t Y_j_1_max__ = N; 90 : for (size_t j_1__ = 0; j_1__ < Y_j_1_max__; ++j_1__) { 91 : Y(j_1__) = vals_r__[pos__++]; 92 : } 93 : 94 : current_statement_begin__ = 8; 95 : context__.validate_dims("data initialization", "N_1", "int", context__.to_vec()); 96 : N_1 = int(0); 97 : vals_i__ = context__.vals_i("N_1"); 98 : pos__ = 0; 99 : N_1 = vals_i__[pos__++]; 100 : check_greater_or_equal(function__, "N_1", N_1, 1); 101 : 102 : current_statement_begin__ = 9; 103 : context__.validate_dims("data initialization", "M_1", "int", context__.to_vec()); 104 : M_1 = int(0); 105 : vals_i__ = context__.vals_i("M_1"); 106 : pos__ = 0; 107 : M_1 = vals_i__[pos__++]; 108 : check_greater_or_equal(function__, "M_1", M_1, 1); 109 : 110 : current_statement_begin__ = 10; 111 : validate_non_negative_index("J_1", "N", N); 112 : context__.validate_dims("data initialization", "J_1", "int", context__.to_vec(N)); 113 : J_1 = std::vector(N, int(0)); 114 : vals_i__ = context__.vals_i("J_1"); 115 : pos__ = 0; 116 : size_t J_1_k_0_max__ = N; 117 : for (size_t k_0__ = 0; k_0__ < J_1_k_0_max__; ++k_0__) { 118 : J_1[k_0__] = vals_i__[pos__++]; 119 : } 120 : size_t J_1_i_0_max__ = N; 121 : for (size_t i_0__ = 0; i_0__ < J_1_i_0_max__; ++i_0__) { 122 : check_greater_or_equal(function__, "J_1[i_0__]", J_1[i_0__], 1); 123 : } 124 : 125 : current_statement_begin__ = 12; 126 : validate_non_negative_index("Z_1_1", "N", N); 127 : context__.validate_dims("data initialization", "Z_1_1", "vector_d", context__.to_vec(N)); 128 : Z_1_1 = Eigen::Matrix(N); 129 : vals_r__ = context__.vals_r("Z_1_1"); 130 : pos__ = 0; 131 : size_t Z_1_1_j_1_max__ = N; 132 : for (size_t j_1__ = 0; j_1__ < Z_1_1_j_1_max__; ++j_1__) { 133 : Z_1_1(j_1__) = vals_r__[pos__++]; 134 : } 135 : 136 : current_statement_begin__ = 13; 137 : context__.validate_dims("data initialization", "prior_only", "int", context__.to_vec()); 138 : prior_only = int(0); 139 : vals_i__ = context__.vals_i("prior_only"); 140 : pos__ = 0; 141 : prior_only = vals_i__[pos__++]; 142 : 143 : 144 : // initialize transformed data variables 145 : // execute transformed data statements 146 : 147 : // validate transformed data 148 : 149 : // validate, set parameter ranges 150 : num_params_r__ = 0U; 151 : param_ranges_i__.clear(); 152 : current_statement_begin__ = 19; 153 : num_params_r__ += 1; 154 : current_statement_begin__ = 20; 155 : num_params_r__ += 1; 156 : current_statement_begin__ = 21; 157 : validate_non_negative_index("sd_1", "M_1", M_1); 158 : num_params_r__ += M_1; 159 : current_statement_begin__ = 23; 160 : validate_non_negative_index("z_1", "N_1", N_1); 161 : validate_non_negative_index("z_1", "M_1", M_1); 162 : num_params_r__ += (N_1 * M_1); 163 : } catch (const std::exception& e) { 164 : stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); 165 : // Next line prevents compiler griping about no return 166 : throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 167 : } 168 : } 169 : 170 : ~model403872035a86_4bd718ce37045da5116c1e4a2933dbfb() { } 171 : 172 : 173 : void transform_inits(const stan::io::var_context& context__, 174 : std::vector& params_i__, 175 : std::vector& params_r__, 176 : std::ostream* pstream__) const { 177 : typedef double local_scalar_t__; 178 : stan::io::writer writer__(params_r__, params_i__); 179 : size_t pos__; 180 : (void) pos__; // dummy call to supress warning 181 : std::vector vals_r__; 182 : std::vector vals_i__; 183 : 184 : current_statement_begin__ = 19; 185 : if (!(context__.contains_r("Intercept"))) 186 : stan::lang::rethrow_located(std::runtime_error(std::string("Variable Intercept missing")), current_statement_begin__, prog_reader__()); 187 : vals_r__ = context__.vals_r("Intercept"); 188 : pos__ = 0U; 189 : context__.validate_dims("parameter initialization", "Intercept", "double", context__.to_vec()); 190 : double Intercept(0); 191 : Intercept = vals_r__[pos__++]; 192 : try { 193 : writer__.scalar_unconstrain(Intercept); 194 : } catch (const std::exception& e) { 195 : stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable Intercept: ") + e.what()), current_statement_begin__, prog_reader__()); 196 : } 197 : 198 : current_statement_begin__ = 20; 199 : if (!(context__.contains_r("sigma"))) 200 : stan::lang::rethrow_located(std::runtime_error(std::string("Variable sigma missing")), current_statement_begin__, prog_reader__()); 201 : vals_r__ = context__.vals_r("sigma"); 202 : pos__ = 0U; 203 : context__.validate_dims("parameter initialization", "sigma", "double", context__.to_vec()); 204 : double sigma(0); 205 : sigma = vals_r__[pos__++]; 206 : try { 207 : writer__.scalar_lb_unconstrain(0, sigma); 208 : } catch (const std::exception& e) { 209 : stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable sigma: ") + e.what()), current_statement_begin__, prog_reader__()); 210 : } 211 : 212 : current_statement_begin__ = 21; 213 : if (!(context__.contains_r("sd_1"))) 214 : stan::lang::rethrow_located(std::runtime_error(std::string("Variable sd_1 missing")), current_statement_begin__, prog_reader__()); 215 : vals_r__ = context__.vals_r("sd_1"); 216 : pos__ = 0U; 217 : validate_non_negative_index("sd_1", "M_1", M_1); 218 : context__.validate_dims("parameter initialization", "sd_1", "vector_d", context__.to_vec(M_1)); 219 : Eigen::Matrix sd_1(M_1); 220 : size_t sd_1_j_1_max__ = M_1; 221 : for (size_t j_1__ = 0; j_1__ < sd_1_j_1_max__; ++j_1__) { 222 : sd_1(j_1__) = vals_r__[pos__++]; 223 : } 224 : try { 225 : writer__.vector_lb_unconstrain(0, sd_1); 226 : } catch (const std::exception& e) { 227 : stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable sd_1: ") + e.what()), current_statement_begin__, prog_reader__()); 228 : } 229 : 230 : current_statement_begin__ = 23; 231 : if (!(context__.contains_r("z_1"))) 232 : stan::lang::rethrow_located(std::runtime_error(std::string("Variable z_1 missing")), current_statement_begin__, prog_reader__()); 233 : vals_r__ = context__.vals_r("z_1"); 234 : pos__ = 0U; 235 : validate_non_negative_index("z_1", "N_1", N_1); 236 : validate_non_negative_index("z_1", "M_1", M_1); 237 : context__.validate_dims("parameter initialization", "z_1", "vector_d", context__.to_vec(M_1,N_1)); 238 : std::vector > z_1(M_1, Eigen::Matrix(N_1)); 239 : size_t z_1_j_1_max__ = N_1; 240 : size_t z_1_k_0_max__ = M_1; 241 : for (size_t j_1__ = 0; j_1__ < z_1_j_1_max__; ++j_1__) { 242 : for (size_t k_0__ = 0; k_0__ < z_1_k_0_max__; ++k_0__) { 243 : z_1[k_0__](j_1__) = vals_r__[pos__++]; 244 : } 245 : } 246 : size_t z_1_i_0_max__ = M_1; 247 : for (size_t i_0__ = 0; i_0__ < z_1_i_0_max__; ++i_0__) { 248 : try { 249 : writer__.vector_unconstrain(z_1[i_0__]); 250 : } catch (const std::exception& e) { 251 : stan::lang::rethrow_located(std::runtime_error(std::string("Error transforming variable z_1: ") + e.what()), current_statement_begin__, prog_reader__()); 252 : } 253 : } 254 : 255 : params_r__ = writer__.data_r(); 256 : params_i__ = writer__.data_i(); 257 : } 258 : 259 : void transform_inits(const stan::io::var_context& context, 260 : Eigen::Matrix& params_r, 261 : std::ostream* pstream__) const { 262 : std::vector params_r_vec; 263 : std::vector params_i_vec; 264 : transform_inits(context, params_i_vec, params_r_vec, pstream__); 265 : params_r.resize(params_r_vec.size()); 266 : for (int i = 0; i < params_r.size(); ++i) 267 : params_r(i) = params_r_vec[i]; 268 : } 269 : 270 : 271 : template 272 : T__ log_prob(std::vector& params_r__, 273 : std::vector& params_i__, 274 : std::ostream* pstream__ = 0) const { 275 : 276 : typedef T__ local_scalar_t__; 277 : 278 : local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 279 : (void) DUMMY_VAR__; // dummy to suppress unused var warning 280 : 281 : T__ lp__(0.0); 282 : stan::math::accumulator lp_accum__; 283 : try { 284 : stan::io::reader in__(params_r__, params_i__); 285 : 286 : // model parameters 287 : current_statement_begin__ = 19; 288 : local_scalar_t__ Intercept; 289 : (void) Intercept; // dummy to suppress unused var warning 290 : if (jacobian__) 291 : Intercept = in__.scalar_constrain(lp__); 292 : else 293 : Intercept = in__.scalar_constrain(); 294 : 295 : current_statement_begin__ = 20; 296 : local_scalar_t__ sigma; 297 : (void) sigma; // dummy to suppress unused var warning 298 : if (jacobian__) 299 : sigma = in__.scalar_lb_constrain(0, lp__); 300 : else 301 : sigma = in__.scalar_lb_constrain(0); 302 : 303 : current_statement_begin__ = 21; 304 : Eigen::Matrix sd_1; 305 : (void) sd_1; // dummy to suppress unused var warning 306 : if (jacobian__) 307 : sd_1 = in__.vector_lb_constrain(0, M_1, lp__); 308 : else 309 : sd_1 = in__.vector_lb_constrain(0, M_1); 310 : 311 : current_statement_begin__ = 23; 312 : std::vector > z_1; 313 : size_t z_1_d_0_max__ = M_1; 314 : z_1.reserve(z_1_d_0_max__); 315 : for (size_t d_0__ = 0; d_0__ < z_1_d_0_max__; ++d_0__) { 316 : if (jacobian__) 317 : z_1.push_back(in__.vector_constrain(N_1, lp__)); 318 : else 319 : z_1.push_back(in__.vector_constrain(N_1)); 320 : } 321 : 322 : // transformed parameters 323 : current_statement_begin__ = 27; 324 : validate_non_negative_index("r_1_1", "N_1", N_1); 325 : Eigen::Matrix r_1_1(N_1); 326 : stan::math::initialize(r_1_1, DUMMY_VAR__); 327 : stan::math::fill(r_1_1, DUMMY_VAR__); 328 : stan::math::assign(r_1_1,multiply(get_base1(sd_1, 1, "sd_1", 1), get_base1(z_1, 1, "z_1", 1))); 329 : 330 : // validate transformed parameters 331 : const char* function__ = "validate transformed params"; 332 : (void) function__; // dummy to suppress unused var warning 333 : 334 : current_statement_begin__ = 27; 335 : size_t r_1_1_j_1_max__ = N_1; 336 : for (size_t j_1__ = 0; j_1__ < r_1_1_j_1_max__; ++j_1__) { 337 : if (stan::math::is_uninitialized(r_1_1(j_1__))) { 338 : std::stringstream msg__; 339 : msg__ << "Undefined transformed parameter: r_1_1" << "(" << j_1__ << ")"; 340 : stan::lang::rethrow_located(std::runtime_error(std::string("Error initializing variable r_1_1: ") + msg__.str()), current_statement_begin__, prog_reader__()); 341 : } 342 : } 343 : 344 : // model body 345 : { 346 : current_statement_begin__ = 31; 347 : validate_non_negative_index("mu", "N", N); 348 : Eigen::Matrix mu(N); 349 : stan::math::initialize(mu, DUMMY_VAR__); 350 : stan::math::fill(mu, DUMMY_VAR__); 351 : stan::math::assign(mu,add(Intercept, rep_vector(0, N))); 352 : 353 : 354 : current_statement_begin__ = 32; 355 : for (int n = 1; n <= N; ++n) { 356 : 357 : current_statement_begin__ = 34; 358 : stan::model::assign(mu, 359 : stan::model::cons_list(stan::model::index_uni(n), stan::model::nil_index_list()), 360 : (stan::model::rvalue(mu, stan::model::cons_list(stan::model::index_uni(n), stan::model::nil_index_list()), "mu") + (get_base1(r_1_1, get_base1(J_1, n, "J_1", 1), "r_1_1", 1) * get_base1(Z_1_1, n, "Z_1_1", 1))), 361 : "assigning variable mu"); 362 : } 363 : current_statement_begin__ = 37; 364 : lp_accum__.add(student_t_log(Intercept, 3, 1, 10)); 365 : current_statement_begin__ = 38; 366 : lp_accum__.add((student_t_log(sigma, 3, 0, 10) - (1 * student_t_ccdf_log(0, 3, 0, 10)))); 367 : current_statement_begin__ = 40; 368 : lp_accum__.add((student_t_log(sd_1, 3, 0, 10) - (1 * student_t_ccdf_log(0, 3, 0, 10)))); 369 : current_statement_begin__ = 42; 370 : lp_accum__.add(normal_log(get_base1(z_1, 1, "z_1", 1), 0, 1)); 371 : current_statement_begin__ = 44; 372 : if (as_bool(logical_negation(prior_only))) { 373 : 374 : current_statement_begin__ = 45; 375 : lp_accum__.add(normal_log(Y, mu, sigma)); 376 : } 377 : } 378 : 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 : lp_accum__.add(lp__); 386 : return lp_accum__.sum(); 387 : 388 : } // log_prob() 389 : 390 : template 391 : T_ log_prob(Eigen::Matrix& params_r, 392 : std::ostream* pstream = 0) const { 393 : std::vector vec_params_r; 394 : vec_params_r.reserve(params_r.size()); 395 : for (int i = 0; i < params_r.size(); ++i) 396 : vec_params_r.push_back(params_r(i)); 397 : std::vector vec_params_i; 398 : return log_prob(vec_params_r, vec_params_i, pstream); 399 : } 400 : 401 : 402 : void get_param_names(std::vector& names__) const { 403 : names__.resize(0); 404 : names__.push_back("Intercept"); 405 : names__.push_back("sigma"); 406 : names__.push_back("sd_1"); 407 : names__.push_back("z_1"); 408 : names__.push_back("r_1_1"); 409 : names__.push_back("b_Intercept"); 410 : } 411 : 412 : 413 : void get_dims(std::vector >& dimss__) const { 414 : dimss__.resize(0); 415 : std::vector dims__; 416 : dims__.resize(0); 417 : dimss__.push_back(dims__); 418 : dims__.resize(0); 419 : dimss__.push_back(dims__); 420 : dims__.resize(0); 421 : dims__.push_back(M_1); 422 : dimss__.push_back(dims__); 423 : dims__.resize(0); 424 : dims__.push_back(M_1); 425 : dims__.push_back(N_1); 426 : dimss__.push_back(dims__); 427 : dims__.resize(0); 428 : dims__.push_back(N_1); 429 : dimss__.push_back(dims__); 430 : dims__.resize(0); 431 : dimss__.push_back(dims__); 432 : } 433 : 434 : template 435 : void write_array(RNG& base_rng__, 436 : std::vector& params_r__, 437 : std::vector& params_i__, 438 : std::vector& vars__, 439 : bool include_tparams__ = true, 440 : bool include_gqs__ = true, 441 : std::ostream* pstream__ = 0) const { 442 : typedef double local_scalar_t__; 443 : 444 : vars__.resize(0); 445 : stan::io::reader in__(params_r__, params_i__); 446 : static const char* function__ = "model403872035a86_4bd718ce37045da5116c1e4a2933dbfb_namespace::write_array"; 447 : (void) function__; // dummy to suppress unused var warning 448 : 449 : // read-transform, write parameters 450 : double Intercept = in__.scalar_constrain(); 451 : vars__.push_back(Intercept); 452 : 453 : double sigma = in__.scalar_lb_constrain(0); 454 : vars__.push_back(sigma); 455 : 456 : Eigen::Matrix sd_1 = in__.vector_lb_constrain(0, M_1); 457 : size_t sd_1_j_1_max__ = M_1; 458 : for (size_t j_1__ = 0; j_1__ < sd_1_j_1_max__; ++j_1__) { 459 : vars__.push_back(sd_1(j_1__)); 460 : } 461 : 462 : std::vector > z_1; 463 : size_t z_1_d_0_max__ = M_1; 464 : z_1.reserve(z_1_d_0_max__); 465 : for (size_t d_0__ = 0; d_0__ < z_1_d_0_max__; ++d_0__) { 466 : z_1.push_back(in__.vector_constrain(N_1)); 467 : } 468 : size_t z_1_j_1_max__ = N_1; 469 : size_t z_1_k_0_max__ = M_1; 470 : for (size_t j_1__ = 0; j_1__ < z_1_j_1_max__; ++j_1__) { 471 : for (size_t k_0__ = 0; k_0__ < z_1_k_0_max__; ++k_0__) { 472 : vars__.push_back(z_1[k_0__](j_1__)); 473 : } 474 : } 475 : 476 : double lp__ = 0.0; 477 : (void) lp__; // dummy to suppress unused var warning 478 : stan::math::accumulator lp_accum__; 479 : 480 : local_scalar_t__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 481 : (void) DUMMY_VAR__; // suppress unused var warning 482 : 483 : if (!include_tparams__ && !include_gqs__) return; 484 : 485 : try { 486 : // declare and define transformed parameters 487 : current_statement_begin__ = 27; 488 : validate_non_negative_index("r_1_1", "N_1", N_1); 489 : Eigen::Matrix r_1_1(N_1); 490 : stan::math::initialize(r_1_1, DUMMY_VAR__); 491 : stan::math::fill(r_1_1, DUMMY_VAR__); 492 : stan::math::assign(r_1_1,multiply(get_base1(sd_1, 1, "sd_1", 1), get_base1(z_1, 1, "z_1", 1))); 493 : 494 : if (!include_gqs__ && !include_tparams__) return; 495 : // validate transformed parameters 496 : const char* function__ = "validate transformed params"; 497 : (void) function__; // dummy to suppress unused var warning 498 : 499 : // write transformed parameters 500 : if (include_tparams__) { 501 : size_t r_1_1_j_1_max__ = N_1; 502 : for (size_t j_1__ = 0; j_1__ < r_1_1_j_1_max__; ++j_1__) { 503 : vars__.push_back(r_1_1(j_1__)); 504 : } 505 : } 506 : if (!include_gqs__) return; 507 : // declare and define generated quantities 508 : current_statement_begin__ = 50; 509 : double b_Intercept; 510 : (void) b_Intercept; // dummy to suppress unused var warning 511 : stan::math::initialize(b_Intercept, DUMMY_VAR__); 512 : stan::math::fill(b_Intercept, DUMMY_VAR__); 513 : stan::math::assign(b_Intercept,Intercept); 514 : 515 : // validate, write generated quantities 516 : current_statement_begin__ = 50; 517 : vars__.push_back(b_Intercept); 518 : 519 : } catch (const std::exception& e) { 520 : stan::lang::rethrow_located(e, current_statement_begin__, prog_reader__()); 521 : // Next line prevents compiler griping about no return 522 : throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 523 : } 524 : } 525 : 526 : template 527 : void write_array(RNG& base_rng, 528 : Eigen::Matrix& params_r, 529 : Eigen::Matrix& vars, 530 : bool include_tparams = true, 531 : bool include_gqs = true, 532 : std::ostream* pstream = 0) const { 533 : std::vector params_r_vec(params_r.size()); 534 : for (int i = 0; i < params_r.size(); ++i) 535 : params_r_vec[i] = params_r(i); 536 : std::vector vars_vec; 537 : std::vector params_i_vec; 538 : write_array(base_rng, params_r_vec, params_i_vec, vars_vec, include_tparams, include_gqs, pstream); 539 : vars.resize(vars_vec.size()); 540 : for (int i = 0; i < vars.size(); ++i) 541 : vars(i) = vars_vec[i]; 542 : } 543 : 544 : static std::string model_name() { 545 : return "model403872035a86_4bd718ce37045da5116c1e4a2933dbfb"; 546 : } 547 : 548 : 549 : void constrained_param_names(std::vector& param_names__, 550 : bool include_tparams__ = true, 551 : bool include_gqs__ = true) const { 552 : std::stringstream param_name_stream__; 553 : param_name_stream__.str(std::string()); 554 : param_name_stream__ << "Intercept"; 555 : param_names__.push_back(param_name_stream__.str()); 556 : param_name_stream__.str(std::string()); 557 : param_name_stream__ << "sigma"; 558 : param_names__.push_back(param_name_stream__.str()); 559 : size_t sd_1_j_1_max__ = M_1; 560 : for (size_t j_1__ = 0; j_1__ < sd_1_j_1_max__; ++j_1__) { 561 : param_name_stream__.str(std::string()); 562 : param_name_stream__ << "sd_1" << '.' << j_1__ + 1; 563 : param_names__.push_back(param_name_stream__.str()); 564 : } 565 : size_t z_1_j_1_max__ = N_1; 566 : size_t z_1_k_0_max__ = M_1; 567 : for (size_t j_1__ = 0; j_1__ < z_1_j_1_max__; ++j_1__) { 568 : for (size_t k_0__ = 0; k_0__ < z_1_k_0_max__; ++k_0__) { 569 : param_name_stream__.str(std::string()); 570 : param_name_stream__ << "z_1" << '.' << k_0__ + 1 << '.' << j_1__ + 1; 571 : param_names__.push_back(param_name_stream__.str()); 572 : } 573 : } 574 : 575 : if (!include_gqs__ && !include_tparams__) return; 576 : 577 : if (include_tparams__) { 578 : size_t r_1_1_j_1_max__ = N_1; 579 : for (size_t j_1__ = 0; j_1__ < r_1_1_j_1_max__; ++j_1__) { 580 : param_name_stream__.str(std::string()); 581 : param_name_stream__ << "r_1_1" << '.' << j_1__ + 1; 582 : param_names__.push_back(param_name_stream__.str()); 583 : } 584 : } 585 : 586 : if (!include_gqs__) return; 587 : param_name_stream__.str(std::string()); 588 : param_name_stream__ << "b_Intercept"; 589 : param_names__.push_back(param_name_stream__.str()); 590 : } 591 : 592 : 593 : void unconstrained_param_names(std::vector& param_names__, 594 : bool include_tparams__ = true, 595 : bool include_gqs__ = true) const { 596 : std::stringstream param_name_stream__; 597 : param_name_stream__.str(std::string()); 598 : param_name_stream__ << "Intercept"; 599 : param_names__.push_back(param_name_stream__.str()); 600 : param_name_stream__.str(std::string()); 601 : param_name_stream__ << "sigma"; 602 : param_names__.push_back(param_name_stream__.str()); 603 : size_t sd_1_j_1_max__ = M_1; 604 : for (size_t j_1__ = 0; j_1__ < sd_1_j_1_max__; ++j_1__) { 605 : param_name_stream__.str(std::string()); 606 : param_name_stream__ << "sd_1" << '.' << j_1__ + 1; 607 : param_names__.push_back(param_name_stream__.str()); 608 : } 609 : size_t z_1_j_1_max__ = N_1; 610 : size_t z_1_k_0_max__ = M_1; 611 : for (size_t j_1__ = 0; j_1__ < z_1_j_1_max__; ++j_1__) { 612 : for (size_t k_0__ = 0; k_0__ < z_1_k_0_max__; ++k_0__) { 613 : param_name_stream__.str(std::string()); 614 : param_name_stream__ << "z_1" << '.' << k_0__ + 1 << '.' << j_1__ + 1; 615 : param_names__.push_back(param_name_stream__.str()); 616 : } 617 : } 618 : 619 : if (!include_gqs__ && !include_tparams__) return; 620 : 621 : if (include_tparams__) { 622 : size_t r_1_1_j_1_max__ = N_1; 623 : for (size_t j_1__ = 0; j_1__ < r_1_1_j_1_max__; ++j_1__) { 624 : param_name_stream__.str(std::string()); 625 : param_name_stream__ << "r_1_1" << '.' << j_1__ + 1; 626 : param_names__.push_back(param_name_stream__.str()); 627 : } 628 : } 629 : 630 : if (!include_gqs__) return; 631 : param_name_stream__.str(std::string()); 632 : param_name_stream__ << "b_Intercept"; 633 : param_names__.push_back(param_name_stream__.str()); 634 : } 635 : 636 : }; // model 637 : 638 : } // namespace 639 : 640 : typedef model403872035a86_4bd718ce37045da5116c1e4a2933dbfb_namespace::model403872035a86_4bd718ce37045da5116c1e4a2933dbfb stan_model; 641 : 642 : #include 643 : /** 644 : * Define Rcpp Module to expose stan_fit's functions to R. 645 : */ 646 : RCPP_MODULE(stan_fit4model403872035a86_4bd718ce37045da5116c1e4a2933dbfb_mod){ 647 : Rcpp::class_ >("stan_fit4model403872035a86_4bd718ce37045da5116c1e4a2933dbfb") 649 : // .constructor() 650 : .constructor() 651 : // .constructor() 652 : .method("call_sampler", 653 : &rstan::stan_fit::call_sampler) 654 : .method("param_names", 655 : &rstan::stan_fit::param_names) 656 : .method("param_names_oi", 657 : &rstan::stan_fit::param_names_oi) 658 : .method("param_fnames_oi", 659 : &rstan::stan_fit::param_fnames_oi) 660 : .method("param_dims", 661 : &rstan::stan_fit::param_dims) 662 : .method("param_dims_oi", 663 : &rstan::stan_fit::param_dims_oi) 664 : .method("update_param_oi", 665 : &rstan::stan_fit::update_param_oi) 666 : .method("param_oi_tidx", 667 : &rstan::stan_fit::param_oi_tidx) 668 : .method("grad_log_prob", 669 : &rstan::stan_fit::grad_log_prob) 670 : .method("log_prob", 671 : &rstan::stan_fit::log_prob) 672 : .method("unconstrain_pars", 673 : &rstan::stan_fit::unconstrain_pars) 674 : .method("constrain_pars", 675 : &rstan::stan_fit::constrain_pars) 676 : .method("num_pars_unconstrained", 677 : &rstan::stan_fit::num_pars_unconstrained) 678 : .method("unconstrained_param_names", 679 : &rstan::stan_fit::unconstrained_param_names) 680 : .method("constrained_param_names", 681 : &rstan::stan_fit::constrained_param_names) 682 : .method("standalone_gqs", 683 : &rstan::stan_fit::standalone_gqs) 684 : ; 685 : } 686 : 687 : // declarations 688 : extern "C" { 689 : SEXP file40383199e23c( ) ; 690 : } 691 : 692 : // definition 693 : 694 : SEXP file40383199e23c( ){ 695 : return Rcpp::wrap("4bd718ce37045da5116c1e4a2933dbfb"); 696 : } 697 : 698 : Compilation argument: /Library/Frameworks/R.framework/Resources/bin/R CMD SHLIB file40383199e23c.cpp 2> file40383199e23c.cpp.err.txt clang++ -std=gnu++14 -I"/Library/Frameworks/R.framework/Resources/include" -DNDEBUG -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/Rcpp/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/" -I"/Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include" -DEIGEN_NO_DEBUG -DBOOST_DISABLE_ASSERTS -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -I/usr/local/include -fPIC -O3 -march=native -mtune=native -arch x86_64 -ftemplate-depth-256 -c file40383199e23c.cpp -o file40383199e23c.o clang++ -std=gnu++14 -dynamiclib -Wl,-headerpad_max_install_names -undefined dynamic_lookup -single_module -multiply_defined suppress -L/Library/Frameworks/R.framework/Resources/lib -L/usr/local/lib -o file40383199e23c.so file40383199e23c.o -L/Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/lib/ -lStanHeaders -F/Library/Frameworks/R.framework/.. -framework R -Wl,-framework -Wl,CoreFoundation In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:1: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Core:535: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:2: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/LU:47: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:3: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Cholesky:12: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Jacobi:29: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:3: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Cholesky:43: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/QR:17: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Householder:27: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/SVD:48: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:6: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Geometry:58: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/core/build_vari_array.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/Eigen.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Dense:7: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Eigenvalues:58: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:12: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat.hpp:109: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/csr_extract_u.hpp:6: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Sparse:26: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/SparseCore:66: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:12: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat.hpp:109: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/csr_extract_u.hpp:6: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Sparse:27: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/OrderingMethods:71: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:12: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat.hpp:109: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/csr_extract_u.hpp:6: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Sparse:29: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/SparseCholesky:43: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:12: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat.hpp:109: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/csr_extract_u.hpp:6: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Sparse:32: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/SparseQR:35: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:12: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat.hpp:109: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/fun/csr_extract_u.hpp:6: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/Sparse:33: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/IterativeLinearSolvers:46: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:8: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/src/stan/model/model_header.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math.hpp:4: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/rev/mat.hpp:12: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat.hpp:292: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/StanHeaders/include/stan/math/prim/mat/prob/dirichlet_rng.hpp:5: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/random/gamma_distribution.hpp:25: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/random/exponential_distribution.hpp:27: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/random/detail/int_float_pair.hpp:26: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/random/detail/integer_log2.hpp:19: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/pending/integer_log2.hpp:7:1: warning: This header is deprecated. Use instead. [-W#pragma-messages] BOOST_HEADER_DEPRECATED(""); ^ /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/header_deprecated.hpp:23:37: note: expanded from macro 'BOOST_HEADER_DEPRECATED' # define BOOST_HEADER_DEPRECATED(a) BOOST_PRAGMA_MESSAGE("This header is deprecated. Use " a " instead.") ^ /Library/Frameworks/R.framework/Versions/3.6/Resources/library/BH/include/boost/config/pragma_message.hpp:24:34: note: expanded from macro 'BOOST_PRAGMA_MESSAGE' # define BOOST_PRAGMA_MESSAGE(x) _Pragma(BOOST_STRINGIZE(message(x))) ^ :3:2: note: expanded from here message("This header is deprecated. Use " "" " instead.") ^ In file included from file40383199e23c.cpp:642: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include/rstan/rstaninc.hpp:3: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include/rstan/stan_fit.hpp:22: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/RcppEigen.h:25: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/RcppEigenForward.h:32: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/CholmodSupport:45: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:642: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include/rstan/rstaninc.hpp:3: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include/rstan/stan_fit.hpp:22: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/RcppEigen.h:25: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/RcppEigenForward.h:35: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported/Eigen/KroneckerProduct:34: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:642: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include/rstan/rstaninc.hpp:3: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include/rstan/stan_fit.hpp:22: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/RcppEigen.h:25: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/RcppEigenForward.h:39: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported/Eigen/Polynomials:135: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ In file included from file40383199e23c.cpp:642: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include/rstan/rstaninc.hpp:3: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/rstan/include/rstan/stan_fit.hpp:22: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/RcppEigen.h:25: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/RcppEigenForward.h:40: In file included from /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported/Eigen/SparseExtra:51: /Library/Frameworks/R.framework/Versions/3.6/Resources/library/RcppEigen/include/unsupported/Eigen/../../Eigen/src/Core/util/ReenableStupidWarnings.h:10:30: warning: pragma diagnostic pop could not pop, no matching push [-Wunknown-pragmas] #pragma clang diagnostic pop ^ 18 warnings generated. CHECKING DATA AND PREPROCESSING FOR MODEL '4bd718ce37045da5116c1e4a2933dbfb' NOW. COMPILING MODEL '4bd718ce37045da5116c1e4a2933dbfb' NOW. STARTING SAMPLER FOR MODEL '4bd718ce37045da5116c1e4a2933dbfb' NOW. SAMPLING FOR MODEL '4bd718ce37045da5116c1e4a2933dbfb' NOW (CHAIN 1). Chain 1: Chain 1: Gradient evaluation took 2e-05 seconds Chain 1: 1000 transitions using 10 leapfrog steps per transition would take 0.2 seconds. Chain 1: Adjust your expectations accordingly! Chain 1: Chain 1: Chain 1: Iteration: 1 / 2000 [ 0%] (Warmup) [1] "Error in sampler$call_sampler(args_list[[i]]) : " " c++ exception (unknown reason)" error occurred during calling the sampler; sampling not done