Running 'test_asis.R' [4s]
  Running 'test_bayesqgcomp.R' [3s]
  Running 'test_boot_ints.R' [5s]
  Running 'test_boot_vs_noboot.R' [133s]
  Running 'test_bootchooser.R' [10s]
  Running 'test_cox_msmtest.R' [7s]
  Running 'test_factor.R' [4s]
  Running 'test_id.R' [5s]
  Running 'test_mice.R' [5s]
  Running 'test_numeric.R' [8s]
  Running 'test_poisson.R' [133s]
  Running 'test_weights.R' [4s]
  Running 'test_zi.R' [7s]
  Running 'test_zzzplots.R' [19s]
Running the tests in 'tests/test_boot_vs_noboot.R' failed.
Complete output:
  > cat("# boot vs no boot test\n")
  # boot vs no boot test
  > library("qgcomp")
  > 
  > dgm <- function(N){
  +  dat <- data.frame(id=1:N) 
  +  dat <- within(dat, {
  +      u = 0
  +      x1 = runif(N)*4 + u
  +      x2 = runif(N)*4 + u
  +      x3 = runif(N)*4 + u
  +      x4 = runif(N)*4 + u
  +      x5 = runif(N)*4 + u
  +      x6 = runif(N)*4 + u
  +      y = rnorm(N, x1+x2, 2)
  + })
  +  dat[,c('y', paste0("x", 1:6))]
  + }
  > 
  > Xnm = c(paste0("x", 1:6))
  > 
  > repit <- function(i){
  +   dat = dgm(50)
  +   m1 = qgcomp.noboot(y~., expnms=Xnm, data = dat, family=gaussian(), q=4)
  +   m2 = qgcomp.boot(  y~., expnms=Xnm, data = dat, family=gaussian(), q=4, B=5, parallel=TRUE)
  +   res = c(m1$coef, m1$var.coef, 1*(m1$pval>0.05), with(m1, ci.coef[1]<2 & ci.coef[2]>2), m2$coef, m2$var.coef, 1*(m2$pval>0.05), with(m2, ci.coef[2,1]<2 & ci.coef[2,2]>2))
  +   names(res) <- c("psiint", "psi", "varint", "var",  "powint", "pow",  "cover", "b.psiint", "b.psi", "b.varint", "b.var", "b.powint", "b.pow", "b.cover")
  +   res
  + }
  > 
  > 
  > #res = mclapply(1:1000, repit)
  > res = lapply(1:2, repit)
  Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
    object '.slaveRSOCK' not found
  Calls: ::: -> get
  Execution halted
  Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE,  : 
    Failed to launch and connect to R worker on local machine 'localhost' from local machine 'CRANWIN'.
   * The error produced by socketConnection() was: 'reached elapsed time limit' (which suggests that the connection timeout of 120 seconds (argument 'connectTimeout') kicked in)
   * The localhost socket connection that failed to connect to the R worker used port 24409 using a communication timeout of 120 seconds and a connection timeout of 120 seconds.
   * Worker launch call: "D:/RCompile/recent/R/bin/x64/Rscript" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "#label=test_boot_vs_noboot.R:203340:CRANWIN:CRAN" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/RtmpOOJ1tL/future.parent=203340.31a4c3ec0782f.pid\")), silent = TRUE)" -e "parallel:::.slaveRSOCK()" MASTER=localhost PORT=24409 OUT=/dev/null TIMEOUT=120 XDR=TRUE.
   * Worker (PID 192812) was successfully killed: TRUE
   * Troubleshooting suggestions:
     - Suggestion #1: Set 'verbose=TRUE' to see more details.
     - Suggestion #2: On Windows, output from worker when using 'outfile=NULL' is only visible when running R from a terminal (not a GUI).
  Calls: lapply ... tryCatchList -> tryCatchOne -> <Anonymous> -> <Anonymous>
  In addition: Warning messages:
  1: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  2: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  3: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  4: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  5: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  6: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  7: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  Execution halted
Running the tests in 'tests/test_poisson.R' failed.
Complete output:
  > cat("# poisson test\n")
  # poisson test
  > library("qgcomp")
  > 
  > # grouped survival data
  > N = 250
  > t = 4
  > dat <- data.frame(row.names = 1:(N*t))
  > dat <- within(dat, {
  +   group = do.call("c", lapply(1:N, function(x) rep(x, t)))
  +   age = do.call("c", lapply(1:N, function(x) 1:t))
  +   u =  do.call("c", lapply(1:N, function(x) rep(runif(1), t)))
  +   x1 = rnorm(N, u)
  +   x2 = do.call("c", lapply(1:N, function(x) rep(sample(0:3,1), t)))
  +   time = runif(N*t, 20, 200)
  +   logtime = log(time)
  +   lograte = -5 + x1
  +   deaths = rpois(N, exp(log(time) + lograte)) 
  + })
  > 
  > summary(glm(deaths ~ x2, data = dat, family=poisson(), offset = logtime))$coefficients
                 Estimate Std. Error     z value     Pr(>|z|)
  (Intercept) -3.88576131 0.03575249 -108.685043 0.000000e+00
  x2          -0.08154692 0.02057933   -3.962565 7.414879e-05
  > 
  > qgcomp.noboot(deaths~x2 + offset(logtime), expnms="x2", data = dat, family=poisson(), q=NULL)
  Scaled effect size (positive direction, sum of positive coefficients = 0)
  None
  
  Scaled effect size (negative direction, sum of negative coefficients = -0.0815)
  x2 
   1 
  
  Poisson family still experimental: use with caution
  Mixture log(RR) (Delta method CI):
  
               Estimate Std. Error Lower CI  Upper CI   Z value  Pr(>|z|)
  (Intercept) -3.885761   0.035752 -3.95583 -3.815688 -108.6850 < 2.2e-16
  psi1        -0.081547   0.020579 -0.12188 -0.041212   -3.9626 7.415e-05
  > qgcomp.noboot(deaths~x2+x1 + offset(logtime), expnms=c('x1', "x2"), data = dat, family=poisson(), q=4)
  Scaled effect size (positive direction, sum of positive coefficients = 0.928)
  x1 
   1 
  
  Scaled effect size (negative direction, sum of negative coefficients = -0.0581)
  x2 
   1 
  
  Poisson family still experimental: use with caution
  Mixture log(RR) (Delta method CI):
  
               Estimate Std. Error Lower CI Upper CI Z value  Pr(>|z|)
  (Intercept) -5.863642   0.074982 -6.01060 -5.71668 -78.200 < 2.2e-16
  psi1         0.870254   0.040502  0.79087  0.94964  21.487 < 2.2e-16
  > 
  > 
  > # error by scoping for using the offset parameter
  > #qgcomp.noboot(deaths~x2, expnms="x2", data = dat, family=poisson(), q=4, offset = logtime)
  > 
  > # this doesn't fail, doesn't give correct intercept (offset is forgotten) and 
  > # variance looks wrong
  > #qgcomp.boot(deaths~x2 + offset(logtime), expnms="x2", data = dat, family=poisson(), parallel=TRUE,
  > #            q=NULL, B=500, MCsize = 1000)
  > 
  > 
  > 
  > # matching bootstrapped with non-bootstrapped version
  > dgm <- function(N){
  +  dat <- data.frame(id=1:N) 
  +  dat <- within(dat, {
  +      u = 0
  +      x1 = runif(N)*4 + u
  +      x2 = runif(N)*4 + u
  +      x3 = runif(N)*4 + u
  +      x4 = runif(N)*4 + u
  +      x5 = runif(N)*4 + u
  +      x6 = runif(N)*4 + u
  +      y = rpois(N, exp(-5+.3*x1+.3*x2))
  + })
  +  dat[,c('y', paste0("x", 1:6))]
  + }
  > 
  > Xnm = c(paste0("x", 1:6))
  > 
  > dat = dgm(200)
  > m1 = qgcomp.noboot(y~., expnms=Xnm, data = dat, family=gaussian(), q=4)
  > m1a = qgcomp(y~., expnms=Xnm, data = dat, family=gaussian(), q=4)
  > m2 = qgcomp.boot(  y~., expnms=Xnm, data = dat, family=gaussian(), q=4, B=5, parallel=TRUE, MCsize = 50)
  Error in get(name, envir = asNamespace(pkg), inherits = FALSE) : 
    object '.slaveRSOCK' not found
  Calls: ::: -> get
  Execution halted
  Error in socketConnection("localhost", port = port, server = TRUE, blocking = TRUE,  : 
    Failed to launch and connect to R worker on local machine 'localhost' from local machine 'CRANWIN'.
   * The error produced by socketConnection() was: 'reached elapsed time limit' (which suggests that the connection timeout of 120 seconds (argument 'connectTimeout') kicked in)
   * The localhost socket connection that failed to connect to the R worker used port 37116 using a communication timeout of 120 seconds and a connection timeout of 120 seconds.
   * Worker launch call: "D:/RCompile/recent/R/bin/x64/Rscript" --default-packages=datasets,utils,grDevices,graphics,stats,methods -e "#label=test_poisson.R:110360:CRANWIN:CRAN" -e "try(suppressWarnings(cat(Sys.getpid(),file=\"D:/temp/RtmpYvSGef/future.parent=110360.1af185ce61879.pid\")), silent = TRUE)" -e "parallel:::.slaveRSOCK()" MASTER=localhost PORT=37116 OUT=/dev/null TIMEOUT=120 XDR=TRUE.
   * Worker (PID 180288) was successfully killed: TRUE
   * Troubleshooting suggestions:
     - Suggestion #1: Set 'verbose=TRUE' to see more details.
     - Suggestion #2: On Windows, output from worker when using 'outfile=NULL' is only visible when running R from a terminal (not a GUI).
  Calls: qgcomp.boot ... tryCatchList -> tryCatchOne -> <Anonymous> -> <Anonymous>
  In addition: Warning messages:
  1: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  2: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  3: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  4: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  5: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  6: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  7: In doTryCatch(return(expr), name, parentenv, handler) :
    NAs introduced by coercion
  Execution halted