Running 'arpvb.R' [158s]
  Running 'umpub.R' [152s]
Running the tests in 'tests/arpvb.R' failed.
Complete output:
  > 
  >  library(ump)
  > 
  >  ns <- seq(10, 40, 10)
  >  ps <- seq(0, 1, 0.025)
  >  ps <- ps[0 < ps & ps < 1]
  > 
  >  epsilon <- 1e-9
  > 
  >  for (n in ns) {
  +      xs <- seq(0, n)
  +      for (p in ps) {
  +          for (x in xs) {
  +              ## cat("n =", n, ": p =", p, ": x =", x)
  +              out <- arpv.binom(x, n, p, plot = FALSE)
  +              ## cat(": alpha =", round(out$alpha, 3),
  +              ##     ": phi =", round(out$phi, 3), "\n")
  +              aout <- approx(out$alpha, out$phi)
  +              bout <- umpu.binom(x, n, p, aout$x, maxiter = 100)
  +              if (! all(abs(aout$y - bout) < epsilon))
  +                  cat("oopsie!\n")
  +          }
  +      }
  +  }
  > 
  > 
  > proc.time()
     user  system elapsed 
     3.18    0.10    3.29 
Running the tests in 'tests/umpub.R' failed.
Complete output:
  > 
  >  library(ump)
  >  ns <- seq(10, 40, 10)
  >  alphas <- ps <- seq(0, 1, 0.025)
  >  epsilon <- 1e-9
  >  for (n in ns) {
  + 
  +      x <- seq(0, n)
  + 
  +      save <- array(NA, c(length(x), length(ps), length(alphas)))
  + 
  +      for (p in ps) {
  +          for (alpha in alphas) {
  +              px <- dbinom(x, n, p)
  +              phix <- umpu.binom(x, n, p, alpha)
  +              save[ , ps == p, alphas == alpha] <- phix
  +              foo <- sum(phix * px)
  +              bar <- sum(x * phix * px)
  +              if (p == 0 & alpha > 0 & alpha < 1) {
  +                  fred <- phix[1:2] == alpha
  +                  sally <- phix[- (1:2)] == 1
  +                  if ((! all(fred)) | (! all(sally)))
  +                      cat("n =", n, ": p =", p, ": alpha =", alpha,
  +                          ": fred =", fred, ": sally =", sally, "\n")
  +              } else if (p == 1 & alpha > 0 & alpha < 1) {
  +                  fred <- rev(phix)[1:2] == alpha
  +                  sally <- rev(phix)[- (1:2)] == 1
  +                  if ((! all(fred)) | (! all(sally)))
  +                      cat("n =", n, ": p =", p, ": alpha =", alpha,
  +                          ": fred =", fred, ": sally =", sally, "\n")
  +              } else {
  +                  if (abs(foo - alpha) > epsilon)
  +                      cat("n =", n, ": p =", p, ": alpha =", alpha,
  +                          ": foo =", foo, "\n")
  +                  if (abs(bar - n * p * alpha) > epsilon)
  +                      cat("n =", n, ": p =", p, ": alpha =", alpha,
  +                          ": bar =", bar,
  +                          ": n * p * alpha =", n * p * alpha, "\n")
  +              }
  +          }
  +      }
  + 
  +      xs <- seq(0, n)
  + 
  +      for (x in xs)
  +          for (p in ps) {
  +              phix <- umpu.binom(x, n, p, alphas)
  +              phix.too <- save[xs == x, ps == p, ]
  +              if (! all.equal(phix, phix.too))
  +                  cat("oopsie!\n")
  +          }
  + 
  +      for (x in xs)
  +          for (alpha in alphas) {
  +              phix <- umpu.binom(x, n, ps, alpha)
  +              phix.too <- save[xs == x, , alphas == alpha]
  +              if (! all.equal(phix, phix.too))
  +                  cat("oopsie!\n")
  +          }
  +  }
  > 
  > 
  > proc.time()
     user  system elapsed 
     3.34    0.07    3.40