Running ‘testthat.R’ [58s/70s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > # Part of the rstanarm package for estimating model parameters
  > # Copyright (C) 2015 Trustees of Columbia University
  > # 
  > # This program is free software; you can redistribute it and/or
  > # modify it under the terms of the GNU General Public License
  > # as published by the Free Software Foundation; either version 3
  > # of the License, or (at your option) any later version.
  > # 
  > # This program is distributed in the hope that it will be useful,
  > # but WITHOUT ANY WARRANTY; without even the implied warranty of
  > # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  > # GNU General Public License for more details.
  > # 
  > # You should have received a copy of the GNU General Public License
  > # along with this program; if not, write to the Free Software
  > # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
  > 
  > library(testthat)
  > library(rstanarm)
  Loading required package: Rcpp
  rstanarm (Version 2.14.1, packaged: 2017-01-16 18:47:11 UTC)
  - Do not expect the default priors to remain the same in future rstanarm versions.
  Thus, R scripts should specify priors explicitly, even if they are just the defaults.
  - For execution on a local, multicore CPU with excess RAM we recommend calling
  options(mc.cores = parallel::detectCores())
  > Sys.unsetenv("R_TESTS")
  > example(example_model)
  
  exmpl_> example_model <- 
  exmpl_+   stan_glmer(cbind(incidence, size - incidence) ~ size + period + (1|herd),
  exmpl_+              data = lme4::cbpp, family = binomial,
  exmpl_+              # this next line is only to keep the example small in size!
  exmpl_+              chains = 2, cores = 1, seed = 12345, iter = 500)
  
  SAMPLING FOR MODEL 'binomial' NOW (CHAIN 1).
  
  Chain 1, Iteration:   1 / 500 [  0%]  (Warmup)
  Chain 1, Iteration:  50 / 500 [ 10%]  (Warmup)
  Chain 1, Iteration: 100 / 500 [ 20%]  (Warmup)
  Chain 1, Iteration: 150 / 500 [ 30%]  (Warmup)
  Chain 1, Iteration: 200 / 500 [ 40%]  (Warmup)
  Chain 1, Iteration: 250 / 500 [ 50%]  (Warmup)
  Chain 1, Iteration: 251 / 500 [ 50%]  (Sampling)
  Chain 1, Iteration: 300 / 500 [ 60%]  (Sampling)
  Chain 1, Iteration: 350 / 500 [ 70%]  (Sampling)
  Chain 1, Iteration: 400 / 500 [ 80%]  (Sampling)
  Chain 1, Iteration: 450 / 500 [ 90%]  (Sampling)
  Chain 1, Iteration: 500 / 500 [100%]  (Sampling)
   Elapsed Time: 1.05 seconds (Warm-up)
                 0.67 seconds (Sampling)
                 1.72 seconds (Total)
  
  
  SAMPLING FOR MODEL 'binomial' NOW (CHAIN 2).
  
  Chain 2, Iteration:   1 / 500 [  0%]  (Warmup)
  Chain 2, Iteration:  50 / 500 [ 10%]  (Warmup)
  Chain 2, Iteration: 100 / 500 [ 20%]  (Warmup)
  Chain 2, Iteration: 150 / 500 [ 30%]  (Warmup)
  Chain 2, Iteration: 200 / 500 [ 40%]  (Warmup)
  Chain 2, Iteration: 250 / 500 [ 50%]  (Warmup)
  Chain 2, Iteration: 251 / 500 [ 50%]  (Sampling)
  Chain 2, Iteration: 300 / 500 [ 60%]  (Sampling)
  Chain 2, Iteration: 350 / 500 [ 70%]  (Sampling)
  Chain 2, Iteration: 400 / 500 [ 80%]  (Sampling)
  Chain 2, Iteration: 450 / 500 [ 90%]  (Sampling)
  Chain 2, Iteration: 500 / 500 [100%]  (Sampling)
   Elapsed Time: 0.88 seconds (Warm-up)
                 0.81 seconds (Sampling)
                 1.69 seconds (Total)
  
  
  exmpl_> example_model
  stan_glmer(formula = cbind(incidence, size - incidence) ~ size + 
      period + (1 | herd), data = lme4::cbpp, family = binomial, 
      chains = 2, cores = 1, seed = 12345, iter = 500)
  
  Estimates:
              Median MAD_SD
  (Intercept) -1.5    0.7  
  size         0.0    0.0  
  period2     -1.0    0.3  
  period3     -1.1    0.4  
  period4     -1.5    0.5  
  
  Error terms:
   Groups Name        Std.Dev.
   herd   (Intercept) 0.77    
  Num. levels: herd 15 
  
  Sample avg. posterior predictive 
  distribution of y (X = xbar):
           Median MAD_SD
  mean_PPD 1.8    0.2   
  > if (!grepl("^sparc",  R.version$platform)) test_check("rstanarm")
  
   4-fold cross-validation
  
             Estimate  SE
  elpd_kfold    -77.7 3.5
  
   2-fold cross-validation
  
             Estimate   SE
  elpd_kfold   -106.2 11.9
  Loading required package: Matrix
  Setting 'QR' to TRUE can often be helpful when using the 'meanfield' algorithm.
  See the documentation for the 'QR' argument.
  
   *** caught segfault ***
  address 54, cause 'memory not mapped'
  
  Traceback:
   1: gsub("^.* ([0-9A-Za-z_]+).*;.*$", "\\1", cppcode[private:public])
   2: parse_data(get_cppcode(object))
   3: eval(expr, envir, enclos)
   4: eval(substitute(expr), data, enclos = parent.frame())
   5: with.default(data, parse_data(get_cppcode(object)))
   6: with(data, parse_data(get_cppcode(object)))
   7: .local(object, ...)
   8: sampling(stanfit, data = standata, chains = 0)
   9: sampling(stanfit, data = standata, chains = 0)
  10: withCallingHandlers(expr, message = function(c) invokeRestart("muffleMessage"))
  11: suppressMessages(sampling(stanfit, data = standata, chains = 0))
  12: stan_glm.fit(x = X, y = Y, weights = weights, offset = offset,     family = family, prior = prior, prior_intercept = prior_intercept,     prior_aux = prior_aux, prior_PD = prior_PD, algorithm = algorithm,     adapt_delta = adapt_delta, QR = QR, sparse = sparse, ...)
  13: stan_glm(mpg ~ ., data = mtcars, algorithm = "optimizing", seed = SEED)
  14: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  15: suppressWarnings(expr)
  16: eval(expr, envir, enclos)
  17: eval(expr, pf)
  18: withVisible(eval(expr, pf))
  19: evalVis(expr)
  20: capture.output(suppressWarnings(expr))
  21: SW(fito <- stan_glm(mpg ~ ., data = mtcars, algorithm = "optimizing",     seed = SEED))
  22: eval(expr, envir, enclos)
  23: eval(exprs, env)
  24: source_file(path, new.env(parent = env), chdir = TRUE)
  25: force(code)
  26: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE)        end_context()    })
  27: FUN(X[[i]], ...)
  28: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE)
  29: force(code)
  30: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE))
  31: test_files(paths, reporter = reporter, env = env, ...)
  32: test_dir(test_path, reporter = reporter, env = env, filter = filter,     ...)
  33: with_top_env(env, {    test_dir(test_path, reporter = reporter, env = env, filter = filter,         ...)})
  34: run_tests(package, test_path, filter, reporter, ...)
  35: test_check("rstanarm")
  An irrecoverable exception occurred. R is aborting now ...