Running ‘testthat.R’ [13m/13m]
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.04 seconds (Warm-up)
                 0.67 seconds (Sampling)
                 1.71 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.
  Setting 'QR' to TRUE can often be helpful when using the 'meanfield' algorithm.
  See the documentation for the 'QR' argument.
  STAN OPTIMIZATION COMMAND (LBFGS)
  init = random
  save_iterations = 1
  init_alpha = 0.001
  tol_obj = 1e-12
  tol_grad = 1e-08
  tol_param = 1e-08
  tol_rel_obj = 10000
  tol_rel_grad = 1e+07
  history_size = 5
  seed = 123
  initial log joint probability = -545.459
  Optimization terminated normally: 
    Convergence detected: relative gradient magnitude is below tolerance
  
  This is Automatic Differentiation Variational Inference.
  
  (EXPERIMENTAL ALGORITHM: expect frequent updates to the procedure.)
  
  Gradient evaluation took 0 seconds
  1000 iterations under these settings should take 0 seconds.
  Adjust your expectations accordingly!
  
  Begin eta adaptation.
  Iteration:   1 / 250 [  0%]  (Adaptation)
  Iteration:  50 / 250 [ 20%]  (Adaptation)
  Iteration: 100 / 250 [ 40%]  (Adaptation)
  Iteration: 150 / 250 [ 60%]  (Adaptation)
  Success! Found best value [eta = 10] earlier than expected.
  
  Begin stochastic gradient ascent.
    iter       ELBO   delta_ELBO_mean   delta_ELBO_med   notes 
     100     -5e+02             1.000            1.000
     200     -2e+02             1.577            2.154
     300     -1e+02             1.146            1.000
     400     -1e+02             0.867            1.000
     500     -1e+02             0.695            0.283
     600     -1e+02             0.594            0.283
     700     -1e+02             0.514            0.089
     800     -1e+02             0.452            0.089
     900     -1e+02             0.414            0.089
    1000     -1e+02             0.374            0.089
    1100     -1e+02             0.277            0.036
    1200     -1e+02             0.073            0.036
    1300     -1e+02             0.047            0.034
    1400     -1e+02             0.060            0.036
    1500     -1e+02             0.061            0.036
    1600     -1e+02             0.057            0.036
    1700     -1e+02             0.068            0.055
    1800     -1e+02             0.091            0.111
    1900     -1e+02             0.101            0.111
    2000     -1e+02             0.100            0.111
    2100     -1e+02             0.109            0.129
    2200     -1e+02             0.109            0.129
    2300     -2e+02             0.136            0.144
    2400     -1e+02             0.162            0.144
    2500     -1e+02             0.166            0.144
    2600     -1e+02             0.163            0.144
    2700     -1e+02             0.149            0.129
    2800     -1e+02             0.135            0.105
    2900     -1e+02             0.118            0.103
    3000     -1e+02             0.135            0.105
    3100     -1e+02             0.148            0.105
    3200     -1e+02             0.138            0.103
    3300     -1e+02             0.117            0.084
    3400     -1e+02             0.088            0.084
    3500     -1e+02             0.083            0.084
    3600     -1e+02             0.089            0.085
    3700     -1e+02             0.091            0.085
    3800     -1e+02             0.084            0.084
    3900     -1e+02             0.085            0.084
    4000     -1e+02             0.075            0.079
    4100     -1e+02             0.054            0.045
    4200     -1e+02             0.061            0.079
    4300     -1e+02             0.055            0.045
    4400     -1e+02             0.053            0.045
    4500     -2e+02             0.085            0.079
    4600     -1e+02             0.141            0.079
    4700     -1e+02             0.140            0.079
    4800     -1e+02             0.138            0.079
    4900     -1e+02             0.151            0.080
    5000     -1e+02             0.167            0.108
    5100     -1e+02             0.174            0.119
    5200     -1e+02             0.174            0.119
    5300     -1e+02             0.192            0.177
    5400     -1e+02             0.212            0.202
    5500     -1e+02             0.183            0.177
    5600     -1e+02             0.121            0.119
    5700     -1e+02             0.122            0.119
    5800     -1e+02             0.134            0.144
    5900     -1e+02             0.117            0.119
    6000     -1e+02             0.105            0.117
    6100     -1e+02             0.099            0.076
    6200     -1e+02             0.096            0.053
    6300     -1e+02             0.079            0.051
    6400     -1e+02             0.051            0.031
    6500     -1e+02             0.069            0.051
    6600     -1e+02             0.081            0.053
    6700     -1e+02             0.084            0.056
    6800     -1e+02             0.074            0.053
    6900     -1e+02             0.090            0.056
    7000     -1e+02             0.089            0.056
    7100     -1e+02             0.084            0.056
    7200     -1e+02             0.085            0.060
    7300     -1e+02             0.087            0.060
    7400     -1e+02             0.093            0.090
    7500     -1e+02             0.075            0.060
    7600     -1e+02             0.061            0.056
    7700     -1e+02             0.060            0.051
    7800     -1e+02             0.062            0.058
    7900     -1e+02             0.077            0.058
    8000     -1e+02             0.118            0.058
    8100     -1e+02             0.131            0.060
    8200     -1e+02             0.128            0.058
    8300     -2e+02             0.159            0.090
    8400     -1e+02             0.237            0.131
    8500     -1e+02             0.241            0.131
    8600     -9e+01             0.250            0.131
    8700     -1e+02             0.247            0.131
    8800     -1e+02             0.246            0.131
    8900     -1e+02             0.221            0.095
    9000     -1e+02             0.170            0.074
    9100     -1e+02             0.160            0.059
    9200     -1e+02             0.174            0.074
    9300     -1e+02             0.160            0.074
    9400     -1e+02             0.074            0.059
    9500     -1e+02             0.067            0.050
    9600     -1e+02             0.061            0.041
    9700     -1e+02             0.060            0.041
    9800     -1e+02             0.057            0.035
    9900     -1e+02             0.054            0.031
    10000     -1e+02             0.054            0.031
  Informational Message: The maximum number of iterations is reached! The algorithm may not have converged.
  This variational approximation is not guaranteed to be meaningful.
  
  Drawing a sample of size 1000 from the approximate posterior... 
  COMPLETED.
  
  This is Automatic Differentiation Variational Inference.
  
  (EXPERIMENTAL ALGORITHM: expect frequent updates to the procedure.)
  
  Gradient evaluation took 0 seconds
  1000 iterations under these settings should take 0 seconds.
  Adjust your expectations accordingly!
  
  Begin eta adaptation.
  Iteration:   1 / 250 [  0%]  (Adaptation)
  Iteration:  50 / 250 [ 20%]  (Adaptation)
  Iteration: 100 / 250 [ 40%]  (Adaptation)
  Iteration: 150 / 250 [ 60%]  (Adaptation)
  Iteration: 200 / 250 [ 80%]  (Adaptation)
  Success! Found best value [eta = 1] earlier than expected.
  
  Begin stochastic gradient ascent.
    iter       ELBO   delta_ELBO_mean   delta_ELBO_med   notes 
     100     -8e+02             1.000            1.000
     200     -2e+02             1.621            2.243
     300     -2e+02             1.153            1.000
     400     -1e+02             0.965            1.000
     500     -1e+02             0.783            0.403
     600     -1e+02             0.660            0.403
     700     -1e+02             0.578            0.217
     800     -1e+02             0.508            0.217
     900     -1e+02             0.461            0.087
    1000     -1e+02             0.419            0.087
    1100     -1e+02             0.328            0.087
    1200     -1e+02             0.109            0.085
    1300     -1e+02             0.092            0.056
    1400     -1e+02             0.054            0.054
    1500     -1e+02             0.054            0.054
    1600     -1e+02             0.055            0.054
    1700     -1e+02             0.052            0.054
    1800     -1e+02             0.052            0.054
    1900     -1e+02             0.047            0.052
    2000     -1e+02             0.047            0.052
    2100     -1e+02             0.038            0.048
    2200     -1e+02             0.036            0.042
    2300     -1e+02             0.033            0.035
    2400     -1e+02             0.030            0.035
    2500     -1e+02             0.026            0.030
    2600     -1e+02             0.022            0.017
    2700     -1e+02             0.021            0.017
    2800     -9e+01             0.027            0.030
    2900     -9e+01             0.024            0.017
    3000     -1e+02             0.023            0.017
    3100     -1e+02             0.024            0.017
    3200     -1e+02             0.022            0.013
    3300     -1e+02             0.020            0.010
    3400     -9e+01             0.022            0.013
    3500     -9e+01             0.021            0.010
    3600     -9e+01             0.020            0.010   MEDIAN ELBO CONVERGED
  
  Drawing a sample of size 1000 from the approximate posterior... 
  COMPLETED.
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.15 seconds (Warm-up)
                 0.13 seconds (Sampling)
                 0.28 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.15 seconds (Warm-up)
                 0.17 seconds (Sampling)
                 0.32 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.02 seconds (Warm-up)
                 0.02 seconds (Sampling)
                 0.04 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.01 seconds (Warm-up)
                 0.02 seconds (Sampling)
                 0.03 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.02 seconds (Warm-up)
                 0.02 seconds (Sampling)
                 0.04 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.03 seconds (Warm-up)
                 0.03 seconds (Sampling)
                 0.06 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.02 seconds (Warm-up)
                 0.02 seconds (Sampling)
                 0.04 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.03 seconds (Warm-up)
                 0.03 seconds (Sampling)
                 0.06 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.01 seconds (Warm-up)
                 0.01 seconds (Sampling)
                 0.02 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0 seconds (Warm-up)
                 0.01 seconds (Sampling)
                 0.01 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.04 seconds (Warm-up)
                 0.04 seconds (Sampling)
                 0.08 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.03 seconds (Warm-up)
                 0.04 seconds (Sampling)
                 0.07 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.35 seconds (Warm-up)
                 0.21 seconds (Sampling)
                 0.56 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.52 seconds (Warm-up)
                 0.41 seconds (Sampling)
                 0.93 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 13.87 seconds (Warm-up)
                 20.2 seconds (Sampling)
                 34.07 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.44 seconds (Warm-up)
                 0.07 seconds (Sampling)
                 0.51 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.16 seconds (Warm-up)
                 0.15 seconds (Sampling)
                 0.31 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.16 seconds (Warm-up)
                 0.15 seconds (Sampling)
                 0.31 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.11 seconds (Warm-up)
                 0.11 seconds (Sampling)
                 0.22 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.1 seconds (Warm-up)
                 0.11 seconds (Sampling)
                 0.21 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.18 seconds (Warm-up)
                 0.15 seconds (Sampling)
                 0.33 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.15 seconds (Warm-up)
                 0.16 seconds (Sampling)
                 0.31 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 5.28 seconds (Warm-up)
                 3.56 seconds (Sampling)
                 8.84 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 3.23 seconds (Warm-up)
                 3.23 seconds (Sampling)
                 6.46 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.7 seconds (Warm-up)
                 0.61 seconds (Sampling)
                 1.31 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.62 seconds (Warm-up)
                 0.58 seconds (Sampling)
                 1.2 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.33 seconds (Warm-up)
                 0.24 seconds (Sampling)
                 0.57 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.27 seconds (Warm-up)
                 0.28 seconds (Sampling)
                 0.55 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.33 seconds (Warm-up)
                 0.23 seconds (Sampling)
                 0.56 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.27 seconds (Warm-up)
                 0.28 seconds (Sampling)
                 0.55 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.62 seconds (Warm-up)
                 0.45 seconds (Sampling)
                 1.07 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.47 seconds (Warm-up)
                 0.46 seconds (Sampling)
                 0.93 seconds (Total)
  
  
   Elapsed Time: 0.73 seconds (Warm-up)
                 0.37 seconds (Sampling)
                 1.1 seconds (Total)
  
  
   Elapsed Time: 0.7 seconds (Warm-up)
                 0.39 seconds (Sampling)
                 1.09 seconds (Total)
  
  
   Elapsed Time: 0.76 seconds (Warm-up)
                 0.48 seconds (Sampling)
                 1.24 seconds (Total)
  
  
   Elapsed Time: 0.81 seconds (Warm-up)
                 0.59 seconds (Sampling)
                 1.4 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.04 seconds (Warm-up)
                 0.04 seconds (Sampling)
                 0.08 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.03 seconds (Warm-up)
                 0.06 seconds (Sampling)
                 0.09 seconds (Total)
  
  
   Elapsed Time: 0.17 seconds (Warm-up)
                 0.14 seconds (Sampling)
                 0.31 seconds (Total)
  
  
   Elapsed Time: 0.16 seconds (Warm-up)
                 0.15 seconds (Sampling)
                 0.31 seconds (Total)
  
  
   Elapsed Time: 0.17 seconds (Warm-up)
                 0.14 seconds (Sampling)
                 0.31 seconds (Total)
  
  
   Elapsed Time: 0.16 seconds (Warm-up)
                 0.15 seconds (Sampling)
                 0.31 seconds (Total)
  
  
   Elapsed Time: 0.86 seconds (Warm-up)
                 0.38 seconds (Sampling)
                 1.24 seconds (Total)
  
  
   Elapsed Time: 0.76 seconds (Warm-up)
                 0.35 seconds (Sampling)
                 1.11 seconds (Total)
  
  
   Elapsed Time: 0.69 seconds (Warm-up)
                 0.27 seconds (Sampling)
                 0.96 seconds (Total)
  
  
   Elapsed Time: 0.89 seconds (Warm-up)
                 0.39 seconds (Sampling)
                 1.28 seconds (Total)
  
  
   Elapsed Time: 4.35 seconds (Warm-up)
                 2.13 seconds (Sampling)
                 6.48 seconds (Total)
  
  
   Elapsed Time: 2.85 seconds (Warm-up)
                 1.95 seconds (Sampling)
                 4.8 seconds (Total)
  
  
   Elapsed Time: 6.07 seconds (Warm-up)
                 4.02 seconds (Sampling)
                 10.09 seconds (Total)
  
  
   Elapsed Time: 6.6 seconds (Warm-up)
                 3.69 seconds (Sampling)
                 10.29 seconds (Total)
  
  
   Elapsed Time: 1.33 seconds (Warm-up)
                 0.78 seconds (Sampling)
                 2.11 seconds (Total)
  
  
   Elapsed Time: 1.16 seconds (Warm-up)
                 0.87 seconds (Sampling)
                 2.03 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.01 seconds (Warm-up)
                 0.02 seconds (Sampling)
                 0.03 seconds (Total)
  
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
   Elapsed Time: 0.01 seconds (Warm-up)
                 0.01 seconds (Sampling)
                 0.02 seconds (Total)
  
  1. Error: pp_check.stanreg creates ggplot object (@test_pp_check.R#67) ---------
  Plotting function not supported. (If the plotting function is included in the output from bayesplot::available_ppc() then it should be available via pp_check and this error is probably a bug.)
  1: expect_gg(suppressWarnings(pp_check(fit, plotfun = f, nreps = j)), info = f) at testthat/test_pp_check.R:67
  2: expect_is(x, "ggplot", info = info, label = label) at testthat/test_pp_check.R:35
  3: klass(object)
  4: paste(class(x), collapse = "/")
  5: suppressWarnings(pp_check(fit, plotfun = f, nreps = j))
  6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  7: pp_check(fit, plotfun = f, nreps = j)
  8: pp_check.stanreg(fit, plotfun = f, nreps = j)
  9: .ppc_y_and_yrep(object, seed = seed, nreps = .set_nreps(nreps, fun = plotfun_name), 
         binned_resid_plot = isTRUE(plotfun_name == "ppc_error_binned"))
  10: posterior_predict(object, draws = nreps, seed = seed)
  11: posterior_predict.stanreg(object, draws = nreps, seed = seed)
  12: pp_args(object, data = pp_eta(object, dat, draws))
  13: pp_eta(object, dat, draws)
  14: .set_nreps(nreps, fun = plotfun_name)
  15: stop("Plotting function not supported. ", "(If the plotting function is included in the output from ", 
         "bayesplot::available_ppc() then it should be available via pp_check ", "and this error is probably a bug.)")
  
  2. Error: pp_check.stanreg creates ggplot object for grouped functions (@test_pp_check.R#74) 
  Plotting function not supported. (If the plotting function is included in the output from bayesplot::available_ppc() then it should be available via pp_check and this error is probably a bug.)
  1: expect_gg(suppressWarnings(pp_check(fit2, plotfun = f, nreps = j, group = "am", x = "wt")), 
         info = f) at testthat/test_pp_check.R:74
  2: expect_is(x, "ggplot", info = info, label = label) at testthat/test_pp_check.R:35
  3: klass(object)
  4: paste(class(x), collapse = "/")
  5: suppressWarnings(pp_check(fit2, plotfun = f, nreps = j, group = "am", x = "wt"))
  6: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning"))
  7: pp_check(fit2, plotfun = f, nreps = j, group = "am", x = "wt")
  8: pp_check.stanreg(fit2, plotfun = f, nreps = j, group = "am", x = "wt")
  9: .ppc_y_and_yrep(object, seed = seed, nreps = .set_nreps(nreps, fun = plotfun_name), 
         binned_resid_plot = isTRUE(plotfun_name == "ppc_error_binned"))
  10: posterior_predict(object, draws = nreps, seed = seed)
  11: posterior_predict.stanreg(object, draws = nreps, seed = seed)
  12: pp_args(object, data = pp_eta(object, dat, draws))
  13: pp_eta(object, dat, draws)
  14: .set_nreps(nreps, fun = plotfun_name)
  15: stop("Plotting function not supported. ", "(If the plotting function is included in the output from ", 
         "bayesplot::available_ppc() then it should be available via pp_check ", "and this error is probably a bug.)")
  
  Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
  Exception thrown at line -1: beta_log: Second shape parameter[1] is 0, but must be > 0!
  If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
  but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
  
  Rejecting initial value:
    Error evaluating the log probability at the initial value.
  
  Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
  Exception thrown at line -1: beta_log: Second shape parameter[1] is 0, but must be > 0!
  If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
  but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
  
  Rejecting initial value:
    Error evaluating the log probability at the initial value.
  
  Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
  Exception thrown at line -1: beta_log: Second shape parameter[1] is 0, but must be > 0!
  If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
  but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
  
  Rejecting initial value:
    Error evaluating the log probability at the initial value.
  
  Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
  Exception thrown at line -1: beta_log: Second shape parameter[37] is 0, but must be > 0!
  If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
  but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
  
  Rejecting initial value:
    Error evaluating the log probability at the initial value.
  
  Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
  Exception thrown at line -1: beta_log: Second shape parameter[37] is 0, but must be > 0!
  If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
  but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
  
  Rejecting initial value:
    Error evaluating the log probability at the initial value.
  
  Informational Message: The current Metropolis proposal is about to be rejected because of the following issue:
  Exception thrown at line -1: beta_log: Second shape parameter[1] is 0, but must be > 0!
  If this warning occurs sporadically, such as for highly constrained variable types like covariance matrices, then the sampler is fine,
  but if this warning occurs often then your model may be either severely ill-conditioned or misspecified.
  
  Rejecting initial value:
    Error evaluating the log probability at the initial value.
  
  Loading required package: ggplot2
  Loading required package: StanHeaders
  rstan (Version 2.14.2, packaged: 2017-03-19 00:42:29 UTC, GitRev: 5fa1e80eb817)
  For execution on a local, multicore CPU with excess RAM we recommend calling
  rstan_options(auto_write = TRUE)
  options(mc.cores = parallel::detectCores())
  In file included from /tmp/RtmpnPaOnw/RLIBS_2c6d3d46ced/BH/include/boost/config.hpp:39:0,
                   from /tmp/RtmpnPaOnw/RLIBS_2c6d3d46ced/BH/include/boost/fusion/support/config.hpp:11,
                   from /home/ripley/R/Lib32/rstan/include/boost_not_in_BH/boost/fusion/support/unused.hpp:10,
                   from file42d32aed6729.cpp:5:
  /tmp/RtmpnPaOnw/RLIBS_2c6d3d46ced/BH/include/boost/config/compiler/gcc.hpp:186:0: warning: "BOOST_NO_CXX11_RVALUE_REFERENCES" redefined
   #  define BOOST_NO_CXX11_RVALUE_REFERENCES
   ^
  <command-line>:0:0: note: this is the location of the previous definition
  STAN OPTIMIZATION COMMAND (LBFGS)
  init = random
  save_iterations = 1
  init_alpha = 0.001
  tol_obj = 1e-12
  tol_grad = 1e-08
  tol_param = 1e-08
  tol_rel_obj = 10000
  tol_rel_grad = 1e-16
  history_size = 5
  seed = 12345
  initial log joint probability = -157.223
  Optimization terminated normally: 
    Convergence detected: absolute change in objective function was below tolerance
  STAN OPTIMIZATION COMMAND (LBFGS)
  init = random
  save_iterations = 1
  init_alpha = 0.001
  tol_obj = 1e-12
  tol_grad = 1e-08
  tol_param = 1e-08
  tol_rel_obj = 10000
  tol_rel_grad = 1e-16
  history_size = 5
  seed = 12345
  initial log joint probability = -165.797
  Optimization terminated normally: 
    Convergence detected: absolute change in objective function was below tolerance
  STAN OPTIMIZATION COMMAND (LBFGS)
  init = random
  save_iterations = 1
  init_alpha = 0.001
  tol_obj = 1e-12
  tol_grad = 1e-08
  tol_param = 1e-08
  tol_rel_obj = 10000
  tol_rel_grad = 1e-16
  history_size = 5
  seed = 12345
  initial log joint probability = -519.453
  Optimization terminated normally: 
    Convergence detected: absolute change in objective function was below tolerance
  STAN OPTIMIZATION COMMAND (LBFGS)
  init = random
  save_iterations = 1
  init_alpha = 0.001
  tol_obj = 1e-12
  tol_grad = 1e-08
  tol_param = 1e-08
  tol_rel_obj = 10000
  tol_rel_grad = 1e-16
  history_size = 5
  seed = 12345
  initial log joint probability = -35.7784
  Optimization terminated normally: 
    Convergence detected: relative change in objective function was below tolerance
  STAN OPTIMIZATION COMMAND (LBFGS)
  init = random
  save_iterations = 1
  init_alpha = 0.001
  tol_obj = 1e-12
  tol_grad = 1e-08
  tol_param = 1e-08
  tol_rel_obj = 10000
  tol_rel_grad = 1e-16
  history_size = 5
  seed = 12345
  initial log joint probability = -851.654
  Optimization terminated normally: 
    Convergence detected: relative change in objective function was below tolerance
  
  SAMPLING FOR MODEL 'count' NOW (CHAIN 1).
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
  Chain 1, Iteration:  1 / 100 [  1%]  (Warmup)
  Chain 1, Iteration: 51 / 100 [ 51%]  (Sampling)
  Chain 1, Iteration: 100 / 100 [100%]  (Sampling)
   Elapsed Time: 0.04 seconds (Warm-up)
                 0.08 seconds (Sampling)
                 0.12 seconds (Total)
  
  
  SAMPLING FOR MODEL 'count' NOW (CHAIN 1).
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
  Chain 1, Iteration:  1 / 100 [  1%]  (Warmup)
  Chain 1, Iteration: 51 / 100 [ 51%]  (Sampling)
  Chain 1, Iteration: 100 / 100 [100%]  (Sampling)
   Elapsed Time: 0.05 seconds (Warm-up)
                 0.08 seconds (Sampling)
                 0.13 seconds (Total)
  
  
  SAMPLING FOR MODEL 'count' NOW (CHAIN 1).
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
  Chain 1, Iteration:  1 / 100 [  1%]  (Warmup)
  Chain 1, Iteration: 51 / 100 [ 51%]  (Sampling)
  Chain 1, Iteration: 100 / 100 [100%]  (Sampling)
   Elapsed Time: 0.04 seconds (Warm-up)
                 0.04 seconds (Sampling)
                 0.08 seconds (Total)
  
  
  SAMPLING FOR MODEL 'count' NOW (CHAIN 1).
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
  Chain 1, Iteration:  1 / 100 [  1%]  (Warmup)
  Chain 1, Iteration: 51 / 100 [ 51%]  (Sampling)
  Chain 1, Iteration: 100 / 100 [100%]  (Sampling)
   Elapsed Time: 0.03 seconds (Warm-up)
                 0.05 seconds (Sampling)
                 0.08 seconds (Total)
  
  
  SAMPLING FOR MODEL 'count' NOW (CHAIN 1).
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
  Chain 1, Iteration:  1 / 100 [  1%]  (Warmup)
  Chain 1, Iteration: 51 / 100 [ 51%]  (Sampling)
  Chain 1, Iteration: 100 / 100 [100%]  (Sampling)
   Elapsed Time: 0.82 seconds (Warm-up)
                 0.05 seconds (Sampling)
                 0.87 seconds (Total)
  
  
  SAMPLING FOR MODEL 'count' NOW (CHAIN 1).
  WARNING: The initial buffer, adaptation window, and terminal buffer
           overflow the total number of warmup iterations.
           Defaulting to a 15%/75%/10% partition,
             init_buffer = 7
             adapt_window = 38
             term_buffer = 5
  
  
  Chain 1, Iteration:  1 / 100 [  1%]  (Warmup)
  Chain 1, Iteration: 51 / 100 [ 51%]  (Sampling)
  Chain 1, Iteration: 100 / 100 [100%]  (Sampling)
   Elapsed Time: 0.82 seconds (Warm-up)
                 0.05 seconds (Sampling)
                 0.87 seconds (Total)
  
  STAN OPTIMIZATION COMMAND (LBFGS)
  init = random
  save_iterations = 1
  init_alpha = 0.001
  tol_obj = 1e-12
  tol_grad = 1e-08
  tol_param = 1e-08
  tol_rel_obj = 2.22045e-16
  tol_rel_grad = 1e+07
  history_size = 5
  seed = 12345
  initial log joint probability = -129.867
  Optimization terminated normally: 
    Convergence detected: relative gradient magnitude is below tolerance
  STAN OPTIMIZATION COMMAND (LBFGS)
  init = random
  save_iterations = 1
  init_alpha = 0.001
  tol_obj = 1e-12
  tol_grad = 1e-08
  tol_param = 1e-08
  tol_rel_obj = 2.22045e-16
  tol_rel_grad = 1e+07
  history_size = 5
  seed = 12345
  initial log joint probability = -284107
  Error evaluating model log probability: Non-finite function evaluation.
  Error evaluating model log probability: Non-finite gradient.
  Exception thrown at line -1: normal_log: Scale parameter is 0, but must be > 0!
  Error evaluating model log probability: Non-finite gradient.
  Error evaluating model log probability: Non-finite gradient.
  Optimization terminated normally: 
    Convergence detected: relative gradient magnitude is below tolerance
  Rejecting initial value:
    Log probability evaluates to log(0), i.e. negative infinity.
    Stan can't start sampling from this initial value.
  
  WARNING: No variance estimation is
           performed for num_warmup < 20
  
  
   Elapsed Time: 0 seconds (Warm-up)
                 0 seconds (Sampling)
                 0 seconds (Total)
  
  WARNING: No variance estimation is
           performed for num_warmup < 20
  
  
   Elapsed Time: 0.01 seconds (Warm-up)
                 0.01 seconds (Sampling)
                 0.02 seconds (Total)
  
  WARNING: No variance estimation is
           performed for num_warmup < 20
  
  
   Elapsed Time: 0.01 seconds (Warm-up)
                 0.03 seconds (Sampling)
                 0.04 seconds (Total)
  
  Loading required package: HSAUR3
  Loading required package: tools
  testthat results ================================================================
  OK: 1701 SKIPPED: 0 FAILED: 2
  1. Error: pp_check.stanreg creates ggplot object (@test_pp_check.R#67) 
  2. Error: pp_check.stanreg creates ggplot object for grouped functions (@test_pp_check.R#74) 
  
  Error: testthat unit tests failed
  In addition: Warning messages:
  1: There were 10 divergent transitions after warmup. Increasing adapt_delta above 0.95 may help. See
  http://mc-stan.org/misc/warnings.html#divergent-transitions-after-warmup 
  2: Examine the pairs() plot to diagnose sampling problems
   
  3: Markov chains did not converge! Do not analyze results! 
  Execution halted