> local({pkg <- select.list(sort(.packages(all.available = TRUE)),graphics=TRUE) + if(nchar(pkg)) library(pkg, character.only=TRUE)}) Loading required package: rstan Loading required package: ggplot2 Loading required package: StanHeaders rstan (Version 2.11.1, packaged: 2016-07-28 18:19:31 UTC, GitRev: 85f7a56811da) For execution on a local, multicore CPU with excess RAM we recommend calling rstan_options(auto_write = TRUE) options(mc.cores = parallel::detectCores()) Loading 'brms' package (version 0.10.0). Useful instructions can be found by typing help('brms'). A more detailed introduction to the package is available through vignette('brms'). > library(devtools) > find.package("devtools") [1] "C:/Users/Admin/Documents/R/win-library/3.3/devtools" > build_github_devtools() "C:/PROGRA~1/R/R-33~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c C:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-33~1.1/include" -DNDEBUG -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -std=gnu99 -mtune=core2 -c foo.c -o foo.o C:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o foo.dll tmp.def foo.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.1/bin/x64 -lR Downloading devtools from https://github.com/hadley/devtools/archive/master.zip "C:/PROGRA~1/R/R-33~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL "C:\Users\Admin\AppData\Local\Temp\RtmpcHG9ZV\devtools-master" --build * installing to library 'C:/Users/Admin/AppData/Local/Temp/RtmpcHG9ZV/temp_libpath15a818ea634a' * installing *source* package 'devtools' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded *** arch - i386 *** arch - x64 * MD5 sums packaged installation of 'devtools' as devtools_1.12.0.9000.zip * DONE (devtools) Renaming file to ./devtools.zip > find_rtools() [1] TRUE > build_github_devtools() "C:/PROGRA~1/R/R-33~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD SHLIB foo.c C:/Rtools/mingw_64/bin/gcc -I"C:/PROGRA~1/R/R-33~1.1/include" -DNDEBUG -I"d:/Compiler/gcc-4.9.3/local330/include" -O2 -Wall -std=gnu99 -mtune=core2 -c foo.c -o foo.o C:/Rtools/mingw_64/bin/gcc -shared -s -static-libgcc -o foo.dll tmp.def foo.o -Ld:/Compiler/gcc-4.9.3/local330/lib/x64 -Ld:/Compiler/gcc-4.9.3/local330/lib -LC:/PROGRA~1/R/R-33~1.1/bin/x64 -lR Downloading devtools from https://github.com/hadley/devtools/archive/master.zip "C:/PROGRA~1/R/R-33~1.1/bin/x64/R" --no-site-file --no-environ --no-save --no-restore --quiet CMD INSTALL "C:\Users\Admin\AppData\Local\Temp\RtmpcHG9ZV\devtools-master" --build * installing to library 'C:/Users/Admin/AppData/Local/Temp/RtmpcHG9ZV/temp_libpath15a85fef3ddf' * installing *source* package 'devtools' ... ** R ** inst ** preparing package for lazy loading ** help *** installing help indices ** building package indices ** installing vignettes ** testing if installed package can be loaded *** arch - i386 *** arch - x64 * MD5 sums packaged installation of 'devtools' as devtools_1.12.0.9000.zip * DONE (devtools) Renaming file to ./devtools.zip > library(installr) Welcome to installr version 0.17.8 More information is available on the installr project website: https://github.com/talgalili/installr/ Contact: Suggestions and bug-reports can be submitted at: https://github.com/talgalili/installr/issues To suppress this message use: suppressPackageStartupMessages(library(installr)) > Sys.getenv('PATH') [1] "c:\\Rtools\\bin;c:\\Rtools\\gcc-4.6.3\\bin;c:\\Rtools\\bin;c:\\Rtools\\mingw_32\\bin;c:\\Rtools\\bin;c:\\Rtools\\gcc-4.6.3\\bin;C:\\Windows\\system32;C:\\Windows;C:\\Windows\\System32\\Wbem;C:\\Windows\\System32\\WindowsPowerShell\\v1.0\\" > system('g++ -v') Using built-in specs. COLLECT_GCC=c:\Rtools\GCC-46~1.3\bin\G__~1.EXE COLLECT_LTO_WRAPPER=c:/rtools/gcc-46~1.3/bin/../libexec/gcc/i686-w64-mingw32/4.6.3/lto-wrapper.exe Target: i686-w64-mingw32 Configured with: /data/gannet/ripley/Sources/mingw-test3/src/gcc/configure --host=i686-w64-mingw32 --build=x86_64-linux-gnu --target=i686-w64-mingw32 --with-sysroot=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --prefix=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/mingw32 --with-gmp=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpfr=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --with-mpc=/data/gannet/ripley/Sources/mingw-test3/mingw32mingw32/prereq_install --disable-shared --enable-static --enable-targets=all --enable-languages=c,c++,fortran --enable-libgomp --enable-sjlj-exceptions --enable-fully-dynamic-string --disable-nls --disable-werror --enable-checking=release --disable-win32-registry --disable-rpath --disable-werror CFLAGS='-O2 -mtune=core2 -fomit-frame-pointer' LDFLAGS= Thread model: win32 gcc version 4.6.3 20111208 (prerelease) (GCC) > system('where make') c:\Rtools\bin\make.exe > library(brms) > rstan_options (auto_write=TRUE) > > options(mc.cores = parallel::detectCores()) > > data("kidney") > fit1 <- brm(formula = time | cens(censored) ~ age * sex + disease + (1 + age|patient), data = kidney, family = lognormal(), prior = c(set_prior("normal(0,5)", class = "b"), set_prior("cauchy(0,2)", class = "sd"), set_prior("lkj(2)", class = "cor")), warmup = 1000, iter = 2000, chains = 4, control = list(adapt_delta = 0.95)) Compiling the C++ model C:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3/include/tmmintrin.h: In function 'run': C:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3/include/tmmintrin.h:188:32: error: '__builtin_ia32_palignr128' needs isa option -m32 -mssse3 (__v2di)__Y, __N * 8); ^ C:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3/include/tmmintrin.h:188:32: error: '__builtin_ia32_palignr128' needs isa option -m32 -mssse3 (__v2di)__Y, __N * 8); ^ lto-wrapper: C:\Rtools\mingw_64\bin\g++.exe returned 1 exit status C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: lto-wrapper failed collect2.exe: error: ld returned 1 exit status ERROR(s) during compilation: source code errors or compiler configuration errors! Program source: 1: 2: // includes from the plugin 3: 4: 5: // user includes 6: #define STAN__SERVICES__COMMAND_HPP// Code generated by Stan version 2.11 7: 8: #include 9: 10: namespace model15a8120d66c0_file15a824ca5fa3_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: typedef Eigen::Matrix vector_d; 22: typedef Eigen::Matrix row_vector_d; 23: typedef Eigen::Matrix matrix_d; 24: 25: static int current_statement_begin__; 26: 27: class model15a8120d66c0_file15a824ca5fa3 : public prob_grad { 28: private: 29: int N; 30: vector_d Y; 31: int K; 32: matrix_d X; 33: vector_d X_means; 34: vector J_1; 35: int N_1; 36: int K_1; 37: vector_d Z_1_1; 38: vector_d Z_1_2; 39: int NC_1; 40: vector_d cens; 41: int prior_only; 42: public: 43: model15a8120d66c0_file15a824ca5fa3(stan::io::var_context& context__, 44: std::ostream* pstream__ = 0) 45: : prob_grad(0) { 46: typedef boost::ecuyer1988 rng_t; 47: rng_t base_rng(0); // 0 seed default 48: ctor_body(context__, base_rng, pstream__); 49: } 50: 51: template 52: model15a8120d66c0_file15a824ca5fa3(stan::io::var_context& context__, 53: RNG& base_rng__, 54: std::ostream* pstream__ = 0) 55: : prob_grad(0) { 56: ctor_body(context__, base_rng__, pstream__); 57: } 58: 59: template 60: void ctor_body(stan::io::var_context& context__, 61: RNG& base_rng__, 62: std::ostream* pstream__) { 63: current_statement_begin__ = -1; 64: 65: static const char* function__ = "model15a8120d66c0_file15a824ca5fa3_namespace::model15a8120d66c0_file15a824ca5fa3"; 66: (void) function__; // dummy call to supress warning 67: size_t pos__; 68: (void) pos__; // dummy call to supress warning 69: std::vector vals_i__; 70: std::vector vals_r__; 71: context__.validate_dims("data initialization", "N", "int", context__.to_vec()); 72: N = int(0); 73: vals_i__ = context__.vals_i("N"); 74: pos__ = 0; 75: N = vals_i__[pos__++]; 76: validate_non_negative_index("Y", "N", N); 77: Y = vector_d(static_cast(N)); 78: context__.validate_dims("data initialization", "Y", "vector_d", context__.to_vec(N)); 79: vals_r__ = context__.vals_r("Y"); 80: pos__ = 0; 81: size_t Y_i_vec_lim__ = N; 82: for (size_t i_vec__ = 0; i_vec__ < Y_i_vec_lim__; ++i_vec__) { 83: Y[i_vec__] = vals_r__[pos__++]; 84: } 85: context__.validate_dims("data initialization", "K", "int", context__.to_vec()); 86: K = int(0); 87: vals_i__ = context__.vals_i("K"); 88: pos__ = 0; 89: K = vals_i__[pos__++]; 90: context__.validate_dims("data initialization", "X", "matrix_d", context__.to_vec(N,K)); 91: validate_non_negative_index("X", "N", N); 92: validate_non_negative_index("X", "K", K); 93: X = matrix_d(static_cast(N),static_cast(K)); 94: vals_r__ = context__.vals_r("X"); 95: pos__ = 0; 96: size_t X_m_mat_lim__ = N; 97: size_t X_n_mat_lim__ = K; 98: for (size_t n_mat__ = 0; n_mat__ < X_n_mat_lim__; ++n_mat__) { 99: for (size_t m_mat__ = 0; m_mat__ < X_m_mat_lim__; ++m_mat__) { 100: X(m_mat__,n_mat__) = vals_r__[pos__++]; 101: } 102: } 103: validate_non_negative_index("X_means", "K", K); 104: X_means = vector_d(static_cast(K)); 105: context__.validate_dims("data initialization", "X_means", "vector_d", context__.to_vec(K)); 106: vals_r__ = context__.vals_r("X_means"); 107: pos__ = 0; 108: size_t X_means_i_vec_lim__ = K; 109: for (size_t i_vec__ = 0; i_vec__ < X_means_i_vec_lim__; ++i_vec__) { 110: X_means[i_vec__] = vals_r__[pos__++]; 111: } 112: context__.validate_dims("data initialization", "J_1", "int", context__.to_vec(N)); 113: validate_non_negative_index("J_1", "N", N); 114: J_1 = std::vector(N,int(0)); 115: vals_i__ = context__.vals_i("J_1"); 116: pos__ = 0; 117: size_t J_1_limit_0__ = N; 118: for (size_t i_0__ = 0; i_0__ < J_1_limit_0__; ++i_0__) { 119: J_1[i_0__] = vals_i__[pos__++]; 120: } 121: context__.validate_dims("data initialization", "N_1", "int", context__.to_vec()); 122: N_1 = int(0); 123: vals_i__ = context__.vals_i("N_1"); 124: pos__ = 0; 125: N_1 = vals_i__[pos__++]; 126: context__.validate_dims("data initialization", "K_1", "int", context__.to_vec()); 127: K_1 = int(0); 128: vals_i__ = context__.vals_i("K_1"); 129: pos__ = 0; 130: K_1 = vals_i__[pos__++]; 131: validate_non_negative_index("Z_1_1", "N", N); 132: Z_1_1 = vector_d(static_cast(N)); 133: context__.validate_dims("data initialization", "Z_1_1", "vector_d", context__.to_vec(N)); 134: vals_r__ = context__.vals_r("Z_1_1"); 135: pos__ = 0; 136: size_t Z_1_1_i_vec_lim__ = N; 137: for (size_t i_vec__ = 0; i_vec__ < Z_1_1_i_vec_lim__; ++i_vec__) { 138: Z_1_1[i_vec__] = vals_r__[pos__++]; 139: } 140: validate_non_negative_index("Z_1_2", "N", N); 141: Z_1_2 = vector_d(static_cast(N)); 142: context__.validate_dims("data initialization", "Z_1_2", "vector_d", context__.to_vec(N)); 143: vals_r__ = context__.vals_r("Z_1_2"); 144: pos__ = 0; 145: size_t Z_1_2_i_vec_lim__ = N; 146: for (size_t i_vec__ = 0; i_vec__ < Z_1_2_i_vec_lim__; ++i_vec__) { 147: Z_1_2[i_vec__] = vals_r__[pos__++]; 148: } 149: context__.validate_dims("data initialization", "NC_1", "int", context__.to_vec()); 150: NC_1 = int(0); 151: vals_i__ = context__.vals_i("NC_1"); 152: pos__ = 0; 153: NC_1 = vals_i__[pos__++]; 154: validate_non_negative_index("cens", "N", N); 155: cens = vector_d(static_cast(N)); 156: context__.validate_dims("data initialization", "cens", "vector_d", context__.to_vec(N)); 157: vals_r__ = context__.vals_r("cens"); 158: pos__ = 0; 159: size_t cens_i_vec_lim__ = N; 160: for (size_t i_vec__ = 0; i_vec__ < cens_i_vec_lim__; ++i_vec__) { 161: cens[i_vec__] = vals_r__[pos__++]; 162: } 163: context__.validate_dims("data initialization", "prior_only", "int", context__.to_vec()); 164: prior_only = int(0); 165: vals_i__ = context__.vals_i("prior_only"); 166: pos__ = 0; 167: prior_only = vals_i__[pos__++]; 168: 169: // validate data 170: check_greater_or_equal(function__,"N",N,1); 171: check_greater_or_equal(function__,"K",K,1); 172: for (int k0__ = 0; k0__ < N; ++k0__) { 173: check_greater_or_equal(function__,"J_1[k0__]",J_1[k0__],1); 174: } 175: check_greater_or_equal(function__,"N_1",N_1,1); 176: check_greater_or_equal(function__,"K_1",K_1,1); 177: check_greater_or_equal(function__,"NC_1",NC_1,1); 178: 179: double DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 180: (void) DUMMY_VAR__; // suppress unused var warning 181: 182: 183: // initialize transformed variables to avoid seg fault on val access 184: 185: try { 186: } catch (const std::exception& e) { 187: stan::lang::rethrow_located(e,current_statement_begin__); 188: // Next line prevents compiler griping about no return 189: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 190: } 191: 192: // validate transformed data 193: 194: // set parameter ranges 195: num_params_r__ = 0U; 196: param_ranges_i__.clear(); 197: num_params_r__ += K; 198: ++num_params_r__; 199: num_params_r__ += K_1; 200: num_params_r__ += K_1 * N_1; 201: num_params_r__ += ((K_1 * (K_1 - 1)) / 2); 202: ++num_params_r__; 203: } 204: 205: ~model15a8120d66c0_file15a824ca5fa3() { } 206: 207: 208: void transform_inits(const stan::io::var_context& context__, 209: std::vector& params_i__, 210: std::vector& params_r__, 211: std::ostream* pstream__) const { 212: stan::io::writer writer__(params_r__,params_i__); 213: size_t pos__; 214: (void) pos__; // dummy call to supress warning 215: std::vector vals_r__; 216: std::vector vals_i__; 217: 218: if (!(context__.contains_r("b"))) 219: throw std::runtime_error("variable b missing"); 220: vals_r__ = context__.vals_r("b"); 221: pos__ = 0U; 222: context__.validate_dims("initialization", "b", "vector_d", context__.to_vec(K)); 223: vector_d b(static_cast(K)); 224: for (int j1__ = 0U; j1__ < K; ++j1__) 225: b(j1__) = vals_r__[pos__++]; 226: try { 227: writer__.vector_unconstrain(b); 228: } catch (const std::exception& e) { 229: throw std::runtime_error(std::string("Error transforming variable b: ") + e.what()); 230: } 231: 232: if (!(context__.contains_r("temp_Intercept"))) 233: throw std::runtime_error("variable temp_Intercept missing"); 234: vals_r__ = context__.vals_r("temp_Intercept"); 235: pos__ = 0U; 236: context__.validate_dims("initialization", "temp_Intercept", "double", context__.to_vec()); 237: double temp_Intercept(0); 238: temp_Intercept = vals_r__[pos__++]; 239: try { 240: writer__.scalar_unconstrain(temp_Intercept); 241: } catch (const std::exception& e) { 242: throw std::runtime_error(std::string("Error transforming variable temp_Intercept: ") + e.what()); 243: } 244: 245: if (!(context__.contains_r("sd_1"))) 246: throw std::runtime_error("variable sd_1 missing"); 247: vals_r__ = context__.vals_r("sd_1"); 248: pos__ = 0U; 249: context__.validate_dims("initialization", "sd_1", "vector_d", context__.to_vec(K_1)); 250: vector_d sd_1(static_cast(K_1)); 251: for (int j1__ = 0U; j1__ < K_1; ++j1__) 252: sd_1(j1__) = vals_r__[pos__++]; 253: try { 254: writer__.vector_lb_unconstrain(0,sd_1); 255: } catch (const std::exception& e) { 256: throw std::runtime_error(std::string("Error transforming variable sd_1: ") + e.what()); 257: } 258: 259: if (!(context__.contains_r("z_1"))) 260: throw std::runtime_error("variable z_1 missing"); 261: vals_r__ = context__.vals_r("z_1"); 262: pos__ = 0U; 263: context__.validate_dims("initialization", "z_1", "matrix_d", context__.to_vec(K_1,N_1)); 264: matrix_d z_1(static_cast(K_1),static_cast(N_1)); 265: for (int j2__ = 0U; j2__ < N_1; ++j2__) 266: for (int j1__ = 0U; j1__ < K_1; ++j1__) 267: z_1(j1__,j2__) = vals_r__[pos__++]; 268: try { 269: writer__.matrix_unconstrain(z_1); 270: } catch (const std::exception& e) { 271: throw std::runtime_error(std::string("Error transforming variable z_1: ") + e.what()); 272: } 273: 274: if (!(context__.contains_r("L_1"))) 275: throw std::runtime_error("variable L_1 missing"); 276: vals_r__ = context__.vals_r("L_1"); 277: pos__ = 0U; 278: context__.validate_dims("initialization", "L_1", "matrix_d", context__.to_vec(K_1,K_1)); 279: matrix_d L_1(static_cast(K_1),static_cast(K_1)); 280: for (int j2__ = 0U; j2__ < K_1; ++j2__) 281: for (int j1__ = 0U; j1__ < K_1; ++j1__) 282: L_1(j1__,j2__) = vals_r__[pos__++]; 283: try { 284: writer__.cholesky_corr_unconstrain(L_1); 285: } catch (const std::exception& e) { 286: throw std::runtime_error(std::string("Error transforming variable L_1: ") + e.what()); 287: } 288: 289: if (!(context__.contains_r("sigma"))) 290: throw std::runtime_error("variable sigma missing"); 291: vals_r__ = context__.vals_r("sigma"); 292: pos__ = 0U; 293: context__.validate_dims("initialization", "sigma", "double", context__.to_vec()); 294: double sigma(0); 295: sigma = vals_r__[pos__++]; 296: try { 297: writer__.scalar_lb_unconstrain(0,sigma); 298: } catch (const std::exception& e) { 299: throw std::runtime_error(std::string("Error transforming variable sigma: ") + e.what()); 300: } 301: 302: params_r__ = writer__.data_r(); 303: params_i__ = writer__.data_i(); 304: } 305: 306: void transform_inits(const stan::io::var_context& context, 307: Eigen::Matrix& params_r, 308: std::ostream* pstream__) const { 309: std::vector params_r_vec; 310: std::vector params_i_vec; 311: transform_inits(context, params_i_vec, params_r_vec, pstream__); 312: params_r.resize(params_r_vec.size()); 313: for (int i = 0; i < params_r.size(); ++i) 314: params_r(i) = params_r_vec[i]; 315: } 316: 317: 318: template 319: T__ log_prob(vector& params_r__, 320: vector& params_i__, 321: std::ostream* pstream__ = 0) const { 322: 323: T__ DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 324: (void) DUMMY_VAR__; // suppress unused var warning 325: 326: T__ lp__(0.0); 327: stan::math::accumulator lp_accum__; 328: 329: // model parameters 330: stan::io::reader in__(params_r__,params_i__); 331: 332: Eigen::Matrix b; 333: (void) b; // dummy to suppress unused var warning 334: if (jacobian__) 335: b = in__.vector_constrain(K,lp__); 336: else 337: b = in__.vector_constrain(K); 338: 339: T__ temp_Intercept; 340: (void) temp_Intercept; // dummy to suppress unused var warning 341: if (jacobian__) 342: temp_Intercept = in__.scalar_constrain(lp__); 343: else 344: temp_Intercept = in__.scalar_constrain(); 345: 346: Eigen::Matrix sd_1; 347: (void) sd_1; // dummy to suppress unused var warning 348: if (jacobian__) 349: sd_1 = in__.vector_lb_constrain(0,K_1,lp__); 350: else 351: sd_1 = in__.vector_lb_constrain(0,K_1); 352: 353: Eigen::Matrix z_1; 354: (void) z_1; // dummy to suppress unused var warning 355: if (jacobian__) 356: z_1 = in__.matrix_constrain(K_1,N_1,lp__); 357: else 358: z_1 = in__.matrix_constrain(K_1,N_1); 359: 360: Eigen::Matrix L_1; 361: (void) L_1; // dummy to suppress unused var warning 362: if (jacobian__) 363: L_1 = in__.cholesky_corr_constrain(K_1,lp__); 364: else 365: L_1 = in__.cholesky_corr_constrain(K_1); 366: 367: T__ sigma; 368: (void) sigma; // dummy to suppress unused var warning 369: if (jacobian__) 370: sigma = in__.scalar_lb_constrain(0,lp__); 371: else 372: sigma = in__.scalar_lb_constrain(0); 373: 374: 375: // transformed parameters 376: Eigen::Matrix r_1(static_cast(N_1),static_cast(K_1)); 377: (void) r_1; // dummy to suppress unused var warning 378: Eigen::Matrix r_1_1(static_cast(N_1)); 379: (void) r_1_1; // dummy to suppress unused var warning 380: Eigen::Matrix r_1_2(static_cast(N_1)); 381: (void) r_1_2; // dummy to suppress unused var warning 382: Eigen::Matrix eta(static_cast(N)); 383: (void) eta; // dummy to suppress unused var warning 384: 385: // initialize transformed variables to avoid seg fault on val access 386: stan::math::fill(r_1,DUMMY_VAR__); 387: stan::math::fill(r_1_1,DUMMY_VAR__); 388: stan::math::fill(r_1_2,DUMMY_VAR__); 389: stan::math::fill(eta,DUMMY_VAR__); 390: 391: try { 392: current_statement_begin__ = 38; 393: stan::math::assign(r_1, transpose(multiply(diag_pre_multiply(sd_1,L_1),z_1))); 394: current_statement_begin__ = 39; 395: stan::math::assign(r_1_1, stan::model::rvalue(r_1, stan::model::cons_list(stan::model::index_omni(), stan::model::cons_list(stan::model::index_uni(1), stan::model::nil_index_list())), "r_1")); 396: current_statement_begin__ = 40; 397: stan::math::assign(r_1_2, stan::model::rvalue(r_1, stan::model::cons_list(stan::model::index_omni(), stan::model::cons_list(stan::model::index_uni(2), stan::model::nil_index_list())), "r_1")); 398: current_statement_begin__ = 42; 399: stan::math::assign(eta, add(multiply(X,b),temp_Intercept)); 400: current_statement_begin__ = 43; 401: for (int n = 1; n <= N; ++n) { 402: current_statement_begin__ = 44; 403: stan::math::assign(get_base1_lhs(eta,n,"eta",1), ((get_base1(eta,n,"eta",1) + (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))) + (get_base1(r_1_2,get_base1(J_1,n,"J_1",1),"r_1_2",1) * get_base1(Z_1_2,n,"Z_1_2",1)))); 404: } 405: } catch (const std::exception& e) { 406: stan::lang::rethrow_located(e,current_statement_begin__); 407: // Next line prevents compiler griping about no return 408: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 409: } 410: 411: // validate transformed parameters 412: for (int i0__ = 0; i0__ < N_1; ++i0__) { 413: for (int i1__ = 0; i1__ < K_1; ++i1__) { 414: if (stan::math::is_uninitialized(r_1(i0__,i1__))) { 415: std::stringstream msg__; 416: msg__ << "Undefined transformed parameter: r_1" << '[' << i0__ << ']' << '[' << i1__ << ']'; 417: throw std::runtime_error(msg__.str()); 418: } 419: } 420: } 421: for (int i0__ = 0; i0__ < N_1; ++i0__) { 422: if (stan::math::is_uninitialized(r_1_1(i0__))) { 423: std::stringstream msg__; 424: msg__ << "Undefined transformed parameter: r_1_1" << '[' << i0__ << ']'; 425: throw std::runtime_error(msg__.str()); 426: } 427: } 428: for (int i0__ = 0; i0__ < N_1; ++i0__) { 429: if (stan::math::is_uninitialized(r_1_2(i0__))) { 430: std::stringstream msg__; 431: msg__ << "Undefined transformed parameter: r_1_2" << '[' << i0__ << ']'; 432: throw std::runtime_error(msg__.str()); 433: } 434: } 435: for (int i0__ = 0; i0__ < N; ++i0__) { 436: if (stan::math::is_uninitialized(eta(i0__))) { 437: std::stringstream msg__; 438: msg__ << "Undefined transformed parameter: eta" << '[' << i0__ << ']'; 439: throw std::runtime_error(msg__.str()); 440: } 441: } 442: 443: const char* function__ = "validate transformed params"; 444: (void) function__; // dummy to suppress unused var warning 445: 446: // model body 447: try { 448: current_statement_begin__ = 49; 449: lp_accum__.add(normal_log(b, 0, 5)); 450: current_statement_begin__ = 50; 451: lp_accum__.add(cauchy_log(sd_1, 0, 2)); 452: current_statement_begin__ = 51; 453: lp_accum__.add(lkj_corr_cholesky_log(L_1, 2)); 454: current_statement_begin__ = 52; 455: lp_accum__.add(normal_log(to_vector(z_1), 0, 1)); 456: current_statement_begin__ = 53; 457: lp_accum__.add(student_t_log(sigma, 3, 0, 10)); 458: current_statement_begin__ = 55; 459: if (as_bool(logical_negation(prior_only))) { 460: current_statement_begin__ = 56; 461: for (int n = 1; n <= N; ++n) { 462: current_statement_begin__ = 58; 463: if (as_bool(logical_eq(get_base1(cens,n,"cens",1),0))) { 464: current_statement_begin__ = 58; 465: lp_accum__.add(lognormal_log(get_base1(Y,n,"Y",1), get_base1(eta,n,"eta",1), sigma)); 466: } else { 467: current_statement_begin__ = 60; 468: if (as_bool(logical_eq(get_base1(cens,n,"cens",1),1))) { 469: current_statement_begin__ = 60; 470: lp_accum__.add(lognormal_ccdf_log(get_base1(Y,n,"Y",1),get_base1(eta,n,"eta",1),sigma)); 471: } else { 472: current_statement_begin__ = 61; 473: lp_accum__.add(lognormal_cdf_log(get_base1(Y,n,"Y",1),get_base1(eta,n,"eta",1),sigma)); 474: } 475: } 476: } 477: } 478: } catch (const std::exception& e) { 479: stan::lang::rethrow_located(e,current_statement_begin__); 480: // Next line prevents compiler griping about no return 481: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 482: } 483: 484: lp_accum__.add(lp__); 485: return lp_accum__.sum(); 486: 487: } // log_prob() 488: 489: template 490: T_ log_prob(Eigen::Matrix& params_r, 491: std::ostream* pstream = 0) const { 492: std::vector vec_params_r; 493: vec_params_r.reserve(params_r.size()); 494: for (int i = 0; i < params_r.size(); ++i) 495: vec_params_r.push_back(params_r(i)); 496: std::vector vec_params_i; 497: return log_prob(vec_params_r, vec_params_i, pstream); 498: } 499: 500: 501: void get_param_names(std::vector& names__) const { 502: names__.resize(0); 503: names__.push_back("b"); 504: names__.push_back("temp_Intercept"); 505: names__.push_back("sd_1"); 506: names__.push_back("z_1"); 507: names__.push_back("L_1"); 508: names__.push_back("sigma"); 509: names__.push_back("r_1"); 510: names__.push_back("r_1_1"); 511: names__.push_back("r_1_2"); 512: names__.push_back("eta"); 513: names__.push_back("b_Intercept"); 514: names__.push_back("Cor_1"); 515: names__.push_back("cor_1"); 516: } 517: 518: 519: void get_dims(std::vector >& dimss__) const { 520: dimss__.resize(0); 521: std::vector dims__; 522: dims__.resize(0); 523: dims__.push_back(K); 524: dimss__.push_back(dims__); 525: dims__.resize(0); 526: dimss__.push_back(dims__); 527: dims__.resize(0); 528: dims__.push_back(K_1); 529: dimss__.push_back(dims__); 530: dims__.resize(0); 531: dims__.push_back(K_1); 532: dims__.push_back(N_1); 533: dimss__.push_back(dims__); 534: dims__.resize(0); 535: dims__.push_back(K_1); 536: dims__.push_back(K_1); 537: dimss__.push_back(dims__); 538: dims__.resize(0); 539: dimss__.push_back(dims__); 540: dims__.resize(0); 541: dims__.push_back(N_1); 542: dims__.push_back(K_1); 543: dimss__.push_back(dims__); 544: dims__.resize(0); 545: dims__.push_back(N_1); 546: dimss__.push_back(dims__); 547: dims__.resize(0); 548: dims__.push_back(N_1); 549: dimss__.push_back(dims__); 550: dims__.resize(0); 551: dims__.push_back(N); 552: dimss__.push_back(dims__); 553: dims__.resize(0); 554: dimss__.push_back(dims__); 555: dims__.resize(0); 556: dims__.push_back(K_1); 557: dims__.push_back(K_1); 558: dimss__.push_back(dims__); 559: dims__.resize(0); 560: dims__.push_back(NC_1); 561: dimss__.push_back(dims__); 562: } 563: 564: template 565: void write_array(RNG& base_rng__, 566: std::vector& params_r__, 567: std::vector& params_i__, 568: std::vector& vars__, 569: bool include_tparams__ = true, 570: bool include_gqs__ = true, 571: std::ostream* pstream__ = 0) const { 572: vars__.resize(0); 573: stan::io::reader in__(params_r__,params_i__); 574: static const char* function__ = "model15a8120d66c0_file15a824ca5fa3_namespace::write_array"; 575: (void) function__; // dummy call to supress warning 576: // read-transform, write parameters 577: vector_d b = in__.vector_constrain(K); 578: double temp_Intercept = in__.scalar_constrain(); 579: vector_d sd_1 = in__.vector_lb_constrain(0,K_1); 580: matrix_d z_1 = in__.matrix_constrain(K_1,N_1); 581: matrix_d L_1 = in__.cholesky_corr_constrain(K_1); 582: double sigma = in__.scalar_lb_constrain(0); 583: for (int k_0__ = 0; k_0__ < K; ++k_0__) { 584: vars__.push_back(b[k_0__]); 585: } 586: vars__.push_back(temp_Intercept); 587: for (int k_0__ = 0; k_0__ < K_1; ++k_0__) { 588: vars__.push_back(sd_1[k_0__]); 589: } 590: for (int k_1__ = 0; k_1__ < N_1; ++k_1__) { 591: for (int k_0__ = 0; k_0__ < K_1; ++k_0__) { 592: vars__.push_back(z_1(k_0__, k_1__)); 593: } 594: } 595: for (int k_1__ = 0; k_1__ < K_1; ++k_1__) { 596: for (int k_0__ = 0; k_0__ < K_1; ++k_0__) { 597: vars__.push_back(L_1(k_0__, k_1__)); 598: } 599: } 600: vars__.push_back(sigma); 601: 602: if (!include_tparams__) return; 603: // declare and define transformed parameters 604: double lp__ = 0.0; 605: (void) lp__; // dummy call to supress warning 606: stan::math::accumulator lp_accum__; 607: 608: matrix_d r_1(static_cast(N_1),static_cast(K_1)); 609: (void) r_1; // dummy to suppress unused var warning 610: vector_d r_1_1(static_cast(N_1)); 611: (void) r_1_1; // dummy to suppress unused var warning 612: vector_d r_1_2(static_cast(N_1)); 613: (void) r_1_2; // dummy to suppress unused var warning 614: vector_d eta(static_cast(N)); 615: (void) eta; // dummy to suppress unused var warning 616: 617: try { 618: current_statement_begin__ = 38; 619: stan::math::assign(r_1, transpose(multiply(diag_pre_multiply(sd_1,L_1),z_1))); 620: current_statement_begin__ = 39; 621: stan::math::assign(r_1_1, stan::model::rvalue(r_1, stan::model::cons_list(stan::model::index_omni(), stan::model::cons_list(stan::model::index_uni(1), stan::model::nil_index_list())), "r_1")); 622: current_statement_begin__ = 40; 623: stan::math::assign(r_1_2, stan::model::rvalue(r_1, stan::model::cons_list(stan::model::index_omni(), stan::model::cons_list(stan::model::index_uni(2), stan::model::nil_index_list())), "r_1")); 624: current_statement_begin__ = 42; 625: stan::math::assign(eta, add(multiply(X,b),temp_Intercept)); 626: current_statement_begin__ = 43; 627: for (int n = 1; n <= N; ++n) { 628: current_statement_begin__ = 44; 629: stan::math::assign(get_base1_lhs(eta,n,"eta",1), ((get_base1(eta,n,"eta",1) + (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))) + (get_base1(r_1_2,get_base1(J_1,n,"J_1",1),"r_1_2",1) * get_base1(Z_1_2,n,"Z_1_2",1)))); 630: } 631: } catch (const std::exception& e) { 632: stan::lang::rethrow_located(e,current_statement_begin__); 633: // Next line prevents compiler griping about no return 634: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 635: } 636: 637: // validate transformed parameters 638: 639: // write transformed parameters 640: for (int k_1__ = 0; k_1__ < K_1; ++k_1__) { 641: for (int k_0__ = 0; k_0__ < N_1; ++k_0__) { 642: vars__.push_back(r_1(k_0__, k_1__)); 643: } 644: } 645: for (int k_0__ = 0; k_0__ < N_1; ++k_0__) { 646: vars__.push_back(r_1_1[k_0__]); 647: } 648: for (int k_0__ = 0; k_0__ < N_1; ++k_0__) { 649: vars__.push_back(r_1_2[k_0__]); 650: } 651: for (int k_0__ = 0; k_0__ < N; ++k_0__) { 652: vars__.push_back(eta[k_0__]); 653: } 654: 655: if (!include_gqs__) return; 656: // declare and define generated quantities 657: double b_Intercept(0.0); 658: (void) b_Intercept; // dummy to suppress unused var warning 659: matrix_d Cor_1(static_cast(K_1),static_cast(K_1)); 660: (void) Cor_1; // dummy to suppress unused var warning 661: vector_d cor_1(static_cast(NC_1)); 662: (void) cor_1; // dummy to suppress unused var warning 663: 664: double DUMMY_VAR__(std::numeric_limits::quiet_NaN()); 665: (void) DUMMY_VAR__; // suppress unused var warning 666: 667: 668: // initialize transformed variables to avoid seg fault on val access 669: stan::math::fill(b_Intercept,DUMMY_VAR__); 670: stan::math::fill(Cor_1,DUMMY_VAR__); 671: stan::math::fill(cor_1,DUMMY_VAR__); 672: 673: try { 674: current_statement_begin__ = 70; 675: stan::math::assign(b_Intercept, (temp_Intercept - dot_product(X_means,b))); 676: current_statement_begin__ = 72; 677: stan::math::assign(Cor_1, multiply_lower_tri_self_transpose(L_1)); 678: current_statement_begin__ = 73; 679: stan::math::assign(get_base1_lhs(cor_1,1,"cor_1",1), get_base1(Cor_1,1,2,"Cor_1",1)); 680: } catch (const std::exception& e) { 681: stan::lang::rethrow_located(e,current_statement_begin__); 682: // Next line prevents compiler griping about no return 683: throw std::runtime_error("*** IF YOU SEE THIS, PLEASE REPORT A BUG ***"); 684: } 685: 686: // validate generated quantities 687: stan::math::check_corr_matrix(function__,"Cor_1",Cor_1); 688: check_greater_or_equal(function__,"cor_1",cor_1,-(1)); 689: check_less_or_equal(function__,"cor_1",cor_1,1); 690: 691: // write generated quantities 692: vars__.push_back(b_Intercept); 693: for (int k_1__ = 0; k_1__ < K_1; ++k_1__) { 694: for (int k_0__ = 0; k_0__ < K_1; ++k_0__) { 695: vars__.push_back(Cor_1(k_0__, k_1__)); 696: } 697: } 698: for (int k_0__ = 0; k_0__ < NC_1; ++k_0__) { 699: vars__.push_back(cor_1[k_0__]); 700: } 701: 702: } 703: 704: template 705: void write_array(RNG& base_rng, 706: Eigen::Matrix& params_r, 707: Eigen::Matrix& vars, 708: bool include_tparams = true, 709: bool include_gqs = true, 710: std::ostream* pstream = 0) const { 711: std::vector params_r_vec(params_r.size()); 712: for (int i = 0; i < params_r.size(); ++i) 713: params_r_vec[i] = params_r(i); 714: std::vector vars_vec; 715: std::vector params_i_vec; 716: write_array(base_rng,params_r_vec,params_i_vec,vars_vec,include_tparams,include_gqs,pstream); 717: vars.resize(vars_vec.size()); 718: for (int i = 0; i < vars.size(); ++i) 719: vars(i) = vars_vec[i]; 720: } 721: 722: static std::string model_name() { 723: return "model15a8120d66c0_file15a824ca5fa3"; 724: } 725: 726: 727: void constrained_param_names(std::vector& param_names__, 728: bool include_tparams__ = true, 729: bool include_gqs__ = true) const { 730: std::stringstream param_name_stream__; 731: for (int k_0__ = 1; k_0__ <= K; ++k_0__) { 732: param_name_stream__.str(std::string()); 733: param_name_stream__ << "b" << '.' << k_0__; 734: param_names__.push_back(param_name_stream__.str()); 735: } 736: param_name_stream__.str(std::string()); 737: param_name_stream__ << "temp_Intercept"; 738: param_names__.push_back(param_name_stream__.str()); 739: for (int k_0__ = 1; k_0__ <= K_1; ++k_0__) { 740: param_name_stream__.str(std::string()); 741: param_name_stream__ << "sd_1" << '.' << k_0__; 742: param_names__.push_back(param_name_stream__.str()); 743: } 744: for (int k_1__ = 1; k_1__ <= N_1; ++k_1__) { 745: for (int k_0__ = 1; k_0__ <= K_1; ++k_0__) { 746: param_name_stream__.str(std::string()); 747: param_name_stream__ << "z_1" << '.' << k_0__ << '.' << k_1__; 748: param_names__.push_back(param_name_stream__.str()); 749: } 750: } 751: for (int k_1__ = 1; k_1__ <= K_1; ++k_1__) { 752: for (int k_0__ = 1; k_0__ <= K_1; ++k_0__) { 753: param_name_stream__.str(std::string()); 754: param_name_stream__ << "L_1" << '.' << k_0__ << '.' << k_1__; 755: param_names__.push_back(param_name_stream__.str()); 756: } 757: } 758: param_name_stream__.str(std::string()); 759: param_name_stream__ << "sigma"; 760: param_names__.push_back(param_name_stream__.str()); 761: 762: if (!include_gqs__ && !include_tparams__) return; 763: for (int k_1__ = 1; k_1__ <= K_1; ++k_1__) { 764: for (int k_0__ = 1; k_0__ <= N_1; ++k_0__) { 765: param_name_stream__.str(std::string()); 766: param_name_stream__ << "r_1" << '.' << k_0__ << '.' << k_1__; 767: param_names__.push_back(param_name_stream__.str()); 768: } 769: } 770: for (int k_0__ = 1; k_0__ <= N_1; ++k_0__) { 771: param_name_stream__.str(std::string()); 772: param_name_stream__ << "r_1_1" << '.' << k_0__; 773: param_names__.push_back(param_name_stream__.str()); 774: } 775: for (int k_0__ = 1; k_0__ <= N_1; ++k_0__) { 776: param_name_stream__.str(std::string()); 777: param_name_stream__ << "r_1_2" << '.' << k_0__; 778: param_names__.push_back(param_name_stream__.str()); 779: } 780: for (int k_0__ = 1; k_0__ <= N; ++k_0__) { 781: param_name_stream__.str(std::string()); 782: param_name_stream__ << "eta" << '.' << k_0__; 783: param_names__.push_back(param_name_stream__.str()); 784: } 785: 786: if (!include_gqs__) return; 787: param_name_stream__.str(std::string()); 788: param_name_stream__ << "b_Intercept"; 789: param_names__.push_back(param_name_stream__.str()); 790: for (int k_1__ = 1; k_1__ <= K_1; ++k_1__) { 791: for (int k_0__ = 1; k_0__ <= K_1; ++k_0__) { 792: param_name_stream__.str(std::string()); 793: param_name_stream__ << "Cor_1" << '.' << k_0__ << '.' << k_1__; 794: param_names__.push_back(param_name_stream__.str()); 795: } 796: } 797: for (int k_0__ = 1; k_0__ <= NC_1; ++k_0__) { 798: param_name_stream__.str(std::string()); 799: param_name_stream__ << "cor_1" << '.' << k_0__; 800: param_names__.push_back(param_name_stream__.str()); 801: } 802: } 803: 804: 805: void unconstrained_param_names(std::vector& param_names__, 806: bool include_tparams__ = true, 807: bool include_gqs__ = true) const { 808: std::stringstream param_name_stream__; 809: for (int k_0__ = 1; k_0__ <= K; ++k_0__) { 810: param_name_stream__.str(std::string()); 811: param_name_stream__ << "b" << '.' << k_0__; 812: param_names__.push_back(param_name_stream__.str()); 813: } 814: param_name_stream__.str(std::string()); 815: param_name_stream__ << "temp_Intercept"; 816: param_names__.push_back(param_name_stream__.str()); 817: for (int k_0__ = 1; k_0__ <= K_1; ++k_0__) { 818: param_name_stream__.str(std::string()); 819: param_name_stream__ << "sd_1" << '.' << k_0__; 820: param_names__.push_back(param_name_stream__.str()); 821: } 822: for (int k_1__ = 1; k_1__ <= N_1; ++k_1__) { 823: for (int k_0__ = 1; k_0__ <= K_1; ++k_0__) { 824: param_name_stream__.str(std::string()); 825: param_name_stream__ << "z_1" << '.' << k_0__ << '.' << k_1__; 826: param_names__.push_back(param_name_stream__.str()); 827: } 828: } 829: for (int k_0__ = 1; k_0__ <= ((K_1 * (K_1 - 1)) / 2); ++k_0__) { 830: param_name_stream__.str(std::string()); 831: param_name_stream__ << "L_1" << '.' << k_0__; 832: param_names__.push_back(param_name_stream__.str()); 833: } 834: param_name_stream__.str(std::string()); 835: param_name_stream__ << "sigma"; 836: param_names__.push_back(param_name_stream__.str()); 837: 838: if (!include_gqs__ && !include_tparams__) return; 839: for (int k_1__ = 1; k_1__ <= K_1; ++k_1__) { 840: for (int k_0__ = 1; k_0__ <= N_1; ++k_0__) { 841: param_name_stream__.str(std::string()); 842: param_name_stream__ << "r_1" << '.' << k_0__ << '.' << k_1__; 843: param_names__.push_back(param_name_stream__.str()); 844: } 845: } 846: for (int k_0__ = 1; k_0__ <= N_1; ++k_0__) { 847: param_name_stream__.str(std::string()); 848: param_name_stream__ << "r_1_1" << '.' << k_0__; 849: param_names__.push_back(param_name_stream__.str()); 850: } 851: for (int k_0__ = 1; k_0__ <= N_1; ++k_0__) { 852: param_name_stream__.str(std::string()); 853: param_name_stream__ << "r_1_2" << '.' << k_0__; 854: param_names__.push_back(param_name_stream__.str()); 855: } 856: for (int k_0__ = 1; k_0__ <= N; ++k_0__) { 857: param_name_stream__.str(std::string()); 858: param_name_stream__ << "eta" << '.' << k_0__; 859: param_names__.push_back(param_name_stream__.str()); 860: } 861: 862: if (!include_gqs__) return; 863: param_name_stream__.str(std::string()); 864: param_name_stream__ << "b_Intercept"; 865: param_names__.push_back(param_name_stream__.str()); 866: for (int k_0__ = 1; k_0__ <= ((K_1 * (K_1 - 1)) / 2); ++k_0__) { 867: param_name_stream__.str(std::string()); 868: param_name_stream__ << "Cor_1" << '.' << k_0__; 869: param_names__.push_back(param_name_stream__.str()); 870: } 871: for (int k_0__ = 1; k_0__ <= NC_1; ++k_0__) { 872: param_name_stream__.str(std::string()); 873: param_name_stream__ << "cor_1" << '.' << k_0__; 874: param_names__.push_back(param_name_stream__.str()); 875: } 876: } 877: 878: }; // model 879: 880: } // namespace 881: 882: typedef model15a8120d66c0_file15a824ca5fa3_namespace::model15a8120d66c0_file15a824ca5fa3 stan_model; 883: 884: #include 885: /** 886: * Define Rcpp Module to expose stan_fit's functions to R. 887: */ 888: RCPP_MODULE(stan_fit4model15a8120d66c0_file15a824ca5fa3_mod){ 889: Rcpp::class_ >("stan_fit4model15a8120d66c0_file15a824ca5fa3") 891: // .constructor() 892: .constructor() 893: // .constructor() 894: .method("call_sampler", 895: &rstan::stan_fit::call_sampler) 896: .method("param_names", 897: &rstan::stan_fit::param_names) 898: .method("param_names_oi", 899: &rstan::stan_fit::param_names_oi) 900: .method("param_fnames_oi", 901: &rstan::stan_fit::param_fnames_oi) 902: .method("param_dims", 903: &rstan::stan_fit::param_dims) 904: .method("param_dims_oi", 905: &rstan::stan_fit::param_dims_oi) 906: .method("update_param_oi", 907: &rstan::stan_fit::update_param_oi) 908: .method("param_oi_tidx", 909: &rstan::stan_fit::param_oi_tidx) 910: .method("grad_log_prob", 911: &rstan::stan_fit::grad_log_prob) 912: .method("log_prob", 913: &rstan::stan_fit::log_prob) 914: .method("unconstrain_pars", 915: &rstan::stan_fit::unconstrain_pars) 916: .method("constrain_pars", 917: &rstan::stan_fit::constrain_pars) 918: .method("num_pars_unconstrained", 919: &rstan::stan_fit::num_pars_unconstrained) 920: .method("unconstrained_param_names", 921: &rstan::stan_fit::unconstrained_param_names) 922: .method("constrained_param_names", 923: &rstan::stan_fit::constrained_param_names) 924: ; 925: } 926: 927: // declarations 928: extern "C" { 929: SEXP file15a87a2fc45( ) ; 930: } 931: 932: // definition 933: 934: SEXP file15a87a2fc45( ){ 935: return Rcpp::wrap("lognormal(identity) brms-model"); 936: } 937: 938: Error in compileCode(f, code, language = language, verbose = verbose) : Compilation ERROR, function(s)/method(s) not created! C:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3/include/tmmintrin.h: In function 'run': C:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3/include/tmmintrin.h:188:32: error: '__builtin_ia32_palignr128' needs isa option -m32 -mssse3 (__v2di)__Y, __N * 8); ^ C:/Rtools/mingw_64/lib/gcc/x86_64-w64-mingw32/4.9.3/include/tmmintrin.h:188:32: error: '__builtin_ia32_palignr128' needs isa option -m32 -mssse3 (__v2di)__Y, __N * 8); ^ lto-wrapper: C:\Rtools\mingw_64\bin\g++.exe returned 1 exit status C:/Rtools/mingw_64/bin/../lib/gcc/x86_64-w64-mingw32/4.9.3/../../../../x86_64-w64-mingw32/bin/ld.exe: lto-wrapper failed collect2.exe: error: ld returned 1 exit status >