Running ‘test_asis.R’ [4s/4s]
  Running ‘test_bayesqgcomp.R’ [3s/4s]
  Running ‘test_boot_ints.R’ [4s/5s]
  Running ‘test_boot_vs_noboot.R’ [5s/5s]
  Running ‘test_bootchooser.R’ [47s/50s]
  Running ‘test_cox_msmtest.R’ [6s/6s]
  Running ‘test_zi.R’ [23s/24s]
Running the tests in ‘tests/test_zi.R’ failed.
Complete output:
  > cat("# zi test\n")
  # zi test
  > library(qgcomp)
  > n=100
  > dat <- data.frame(y=rbinom(n, 1, 0.5)*rpois(n, 1.2), x1=runif(n), x2=runif(n), z=runif(n))
  > 
  > # should not cause error
  > ee = qgcomp.zi.noboot(f=y ~ z + x1 + x2 | z, expnms = c('x1', 'x2'), data=dat, q=2, dist="negbin")
  > qgcomp.zi.noboot(f=y ~ z + x1 + x2 | x1 + x2 + z, expnms = c('x1', 'x2'), data=dat, q=2, dist="negbin")
  Prob(Y ~ count):
  Scaled effect size (positive direction, sum of positive coefficients = 0)
  None
  
  Scaled effect size (negative direction, sum of negative coefficients = -0.729)
     x1    x2 
  0.731 0.269 
  
  Prob(Y ~ zero/count):
  Scaled effect size (positive direction, sum of positive coefficients = 0)
  None
  
  Scaled effect size (negative direction, sum of negative coefficients = -18.7)
     x2    x1 
  0.555 0.445 
  
  Mixture log(OR/RR) (Delta method CI):
  
  Prob(Y ~ count):
              Estimate Std. Error Lower CI Upper CI Z value Pr(>|z|)
  (Intercept) -0.13731    0.42665 -0.97354  0.69891 -0.3218   0.7476
  psi1        -0.72925    0.48694 -1.68364  0.22514 -1.4976   0.1342
  Prob(Y ~ zero):
               Estimate Std. Error  Lower CI Upper CI Z value Pr(>|z|)
  (Intercept)  -0.69788    1.79992   -4.2257   2.8299 -0.3877   0.6982
  psi1        -18.68885  186.16568 -383.5669 346.1892 -0.1004   0.9200
  > 
  > qgcomp.zi.boot(f=y ~ z + x1 + x2 | z, expnms = c('x1', 'x2'), data=dat, q=4, B = 10, MCsize = 100, 
  +                dist="negbin")
  qgcomp.zi.boot function is still experimental. Please use with caution and be sure results are reasonable.
  
  Mixture log(OR/RR) (bootstrap CI):
  
  Prob(Y ~ count):
              Estimate Std. Error Lower CI Upper CI Z value Pr(>|z|)
  (Intercept)  0.19366    0.33735 -0.46754  0.85485  0.5741   0.5659
  psi1        -0.27186    0.20992 -0.68331  0.13958 -1.2951   0.1953
  Prob(Y ~ zero):
              Estimate Std. Error Lower CI Upper CI Z value Pr(>|z|)
  (Intercept)  -1.0460     3.5469  -7.9977   5.9058 -0.2949   0.7681
  Warning messages:
  1: In sqrt(diag(vc)[np]) : NaNs produced
  2: In zeroinfl(f, data = qdata[, !(names(qdata) %in% id), drop = FALSE],  :
    optimization failed to converge
  3: In zimsm.fit(f, qdata_, intvals, expnms, main = FALSE, degree = degree,  :
    Conditional outcome regression model did not converge
  4: In sqrt(diag(vc)[np]) : NaNs produced
  > qgcomp.zi.boot(f=y ~ z + x1 + x2 | z, expnms = c('x1', 'x2'), data=dat, q=4, B = 10, MCsize = 1000, 
  +                dist="negbin", msmcontrol = zimsm.fit.control(predmethod="catprobs"))
  qgcomp.zi.boot function is still experimental. Please use with caution and be sure results are reasonable.
  
  Error in solve.default(as.matrix(fit$hessian)) : 
    system is computationally singular: reciprocal condition number = 1.00234e-30
  Calls: qgcomp.zi.boot ... FUN -> zimsm.fit -> zeroinfl -> solve -> solve.default
  Execution halted