Running ‘testthat.R’ [108s/131s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > if (require("testthat")) {
  +   library(ggeffects)
  + 
  +   if (length(strsplit(packageDescription("ggeffects")$Version, "\\.")[[1]]) > 3) {
  +     Sys.setenv("RunAllggeffectsTests" = "yes")
  +   } else {
  +     Sys.setenv("RunAllggeffectsTests" = "no")
  +   }
  + 
  + 
  +   si <- Sys.info()
  + 
  +   osx <- tryCatch(
  +     {
  +       if (!is.null(si["sysname"])) {
  +         si["sysname"] == "Darwin" || grepl("^darwin", R.version$os)
  +       } else {
  +         FALSE
  +       }
  +     },
  +     error = function(e) {
  +       FALSE
  +     }
  +   )
  + 
  + 
  +   solaris <- tryCatch(
  +     {
  +       if (!is.null(si["sysname"])) {
  +         grepl("SunOS", si["sysname"], ignore.case = TRUE)
  +       } else {
  +         FALSE
  +       }
  +     },
  +     error = function(e) {
  +       FALSE
  +     }
  +   )
  + 
  +   if (!osx && !solaris) {
  +     test_check("ggeffects")
  +   }
  + }
  Loading required package: testthat
  Loading required package: gam
  Loading required package: splines
  Loading required package: foreach
  Loaded gam 1.20.2
  
  Loading required namespace: emmeans
  Loading required package: emmeans
  Loading required package: effects
  Loading required package: carData
  lattice theme set by effectsTheme()
  See ?effectsTheme for details.
  Loading required package: betareg
  Loading required package: lme4
  Loading required package: Matrix
  Loading required package: sjmisc
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Loading required package: sjlabelled
  Loading required package: survival
  Loading required package: gee
  (Intercept)    tensionM    tensionH 
     36.38889   -10.00000   -14.72222 
  Loading required package: geepack
  Loading required package: haven
  
  Attaching package: 'haven'
  
  The following objects are masked from 'package:sjlabelled':
  
      as_factor, read_sas, read_spss, read_stata, write_sas, zap_labels
  
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Loading required package: robustbase
  
  Attaching package: 'robustbase'
  
  The following object is masked from 'package:survival':
  
      heart
  
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Can't compute estimated marginal means, 'emmeans::emmeans()' returned an error.
  
  Reason: Can't handle an object of class  "glmrob" 
   Use help("models", package = "emmeans") for information on supported models.
  You may try 'ggpredict()' or 'ggeffect()'.
  
  Loading required package: nlme
  
  Attaching package: 'nlme'
  
  The following object is masked from 'package:lme4':
  
      lmList
  
  Can't compute estimated marginal means, 'emmeans::emmeans()' returned an error.
  
  Reason: Can't handle an object of class  "lmrob" 
   Use help("models", package = "emmeans") for information on supported models.
  You may try 'ggpredict()' or 'ggeffect()'.
  
  Loading required package: logistf
  Can't compute estimated marginal means, 'emmeans::emmeans()' returned an error.
  
  Reason: Can't handle an object of class  "logistf" 
   Use help("models", package = "emmeans") for information on supported models.
  You may try 'ggpredict()' or 'ggeffect()'.
  
  Loading required package: rms
  Loading required package: Hmisc
  Loading required package: lattice
  Loading required package: Formula
  Loading required package: ggplot2
  
  Attaching package: 'ggplot2'
  
  The following object is masked from 'package:sjlabelled':
  
      as_label
  
  
  Attaching package: 'Hmisc'
  
  The following object is masked from 'package:sjmisc':
  
      %nin%
  
  The following object is masked from 'package:testthat':
  
      describe
  
  The following objects are masked from 'package:base':
  
      format.pval, units
  
  Loading required package: SparseM
  
  Attaching package: 'SparseM'
  
  The following object is masked from 'package:base':
  
      backsolve
  
  
  Attaching package: 'rms'
  
  The following object is masked from 'package:emmeans':
  
      contrast
  
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Can't compute marginal effects, 'effects::Effect()' returned an error.
  
  Reason: object 'neg_c_7d' not found
  You may try 'ggpredict()' or 'ggemmeans()'.
  
  Data were 'prettified'. Consider using `terms="c12hour [all]"` to get smooth plots.
  Loading required package: MASS
  Loading required package: pscl
  Classes and Methods for R developed in the
  Political Science Computational Laboratory
  Department of Political Science
  Stanford University
  Simon Jackman
  hurdle and zeroinfl functions by Achim Zeileis
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  
  Re-fitting to get Hessian
  
  Loading required package: glmmTMB
  Model contains splines or polynomial terms. Consider using `terms="cover [all]"` to get smooth plots. See also package-vignette 'Marginal Effects at Specific Values'.
  Model contains splines or polynomial terms. Consider using `terms="mined [all]"` to get smooth plots. See also package-vignette 'Marginal Effects at Specific Values'.
  Model contains splines or polynomial terms. Consider using `terms="cover [all]"` to get smooth plots. See also package-vignette 'Marginal Effects at Specific Values'.
  The variance-covariance matrix is not positive definite. Returning the
    nearest positive definite matrix now.
    This ensures that eigenvalues are all positive real numbers, and
    thereby, for instance, it is possible to calculate standard errors for
    all relevant parameters.
  Model contains splines or polynomial terms. Consider using `terms="mined [all]"` to get smooth plots. See also package-vignette 'Marginal Effects at Specific Values'.
  The variance-covariance matrix is not positive definite. Returning the
    nearest positive definite matrix now.
    This ensures that eigenvalues are all positive real numbers, and
    thereby, for instance, it is possible to calculate standard errors for
    all relevant parameters.
  Model contains splines or polynomial terms. Consider using `terms="mined [all]"` to get smooth plots. See also package-vignette 'Marginal Effects at Specific Values'.
  Model contains splines or polynomial terms. Consider using `terms="cover [all]"` to get smooth plots. See also package-vignette 'Marginal Effects at Specific Values'.
  Model contains splines or polynomial terms. Consider using `terms="mined [all]"` to get smooth plots. See also package-vignette 'Marginal Effects at Specific Values'.
  Model contains splines or polynomial terms. Consider using `terms="cover [all]"` to get smooth plots. See also package-vignette 'Marginal Effects at Specific Values'.
  Loading required package: quantreg
  
  Attaching package: 'quantreg'
  
  The following object is masked from 'package:Hmisc':
  
      latex
  
  The following object is masked from 'package:survival':
  
      untangle.specials
  
  Can't compute marginal effects, 'effects::Effect()' returned an error.
  
  Reason: object does not have variance-covariance matrix
  You may try 'ggpredict()' or 'ggemmeans()'.
  
  Can't compute estimated marginal means, 'emmeans::emmeans()' returned an error.
  
  Reason: No coefficients available for tau = 0.5
  You may try 'ggpredict()' or 'ggeffect()'.
  
  Loading required package: survey
  Loading required package: grid
  
  Attaching package: 'survey'
  
  The following object is masked from 'package:rms':
  
      calibrate
  
  The following object is masked from 'package:Hmisc':
  
      deff
  
  The following object is masked from 'package:graphics':
  
      dotchart
  
  Loading required package: sjstats
  
  Attaching package: 'sjstats'
  
  The following object is masked from 'package:survey':
  
      cv
  
  Data were 'prettified'. Consider using `terms="age [all]"` to get smooth plots.
  Data were 'prettified'. Consider using `terms="age [all]"` to get smooth plots.
  Can't compute marginal effects, 'effects::Effect()' returned an error.
  
  Reason: Invalid operation on a survival time
  You may try 'ggpredict()' or 'ggemmeans()'.
  
  Loading required package: AER
  Loading required package: car
  
  Attaching package: 'car'
  
  The following objects are masked from 'package:rms':
  
      Predict, vif
  
  Loading required package: lmtest
  Loading required package: zoo
  
  Attaching package: 'zoo'
  
  The following objects are masked from 'package:base':
  
      as.Date, as.Date.numeric
  
  
  Attaching package: 'lmtest'
  
  The following object is masked from 'package:rms':
  
      lrtest
  
  Loading required package: sandwich
  Can't compute marginal effects, 'effects::Effect()' returned an error.
  
  Reason: non-conformable arguments
  You may try 'ggpredict()' or 'ggemmeans()'.
  
  Loading required package: VGAM
  Loading required package: stats4
  
  Attaching package: 'VGAM'
  
  The following object is masked from 'package:AER':
  
      tobit
  
  The following object is masked from 'package:lmtest':
  
      lrtest
  
  The following object is masked from 'package:car':
  
      logit
  
  The following object is masked from 'package:survey':
  
      calibrate
  
  The following object is masked from 'package:glmmTMB':
  
      betabinomial
  
  The following objects are masked from 'package:rms':
  
      calibrate, lrtest
  
  [ FAIL 2 | WARN 0 | SKIP 10 | PASS 320 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • On CRAN (1)
  • empty test (9)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error (test-linear-models.R:255:5): ggemmeans, lm, log ──────────────────────
  Error in `if (rtn < 0) {
      warning("Negative variance estimate obtained!")
      rtn = NaN
  }`: missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─testthat::expect_s3_class(...) at test-linear-models.R:255:4
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─ggeffects::ggemmeans(fit, c("c12hour", "c172code [high level of education,low level of education]"))
    5.   └─ggeffects:::.emmeans_prediction_data(...)
    6.     └─ggeffects:::.ggemmeans_predict_generic(...)
    7.       └─ggeffects:::.ggemmeans_add_confint(...)
    8.         ├─base::suppressWarnings(...)
    9.         │ └─base::withCallingHandlers(...)
   10.         ├─ggeffects:::.var_rename(...)
   11.         │ ├─base::which(!(old_names %in% colnames(x)))
   12.         │ ├─old_names %in% colnames(x)
   13.         │ └─base::colnames(x)
   14.         │   └─base::is.data.frame(x)
   15.         ├─base::as.data.frame(stats::confint(tmp, level = ci.lvl))
   16.         ├─stats::confint(tmp, level = ci.lvl)
   17.         └─emmeans:::confint.emmGrid(tmp, level = ci.lvl)
   18.           ├─base::summary(...)
   19.           └─emmeans:::summary.emmGrid(...)
   20.             └─emmeans:::.est.se.df(object, ...)
   21.               ├─base::t(...)
   22.               └─base::apply(...)
   23.                 └─emmeans (local) FUN(newX[, i], ...)
   24.                   └─emmeans:::.qf.non0(object@V, x)
  ── Error (test-linear-models.R:262:5): ggemmeans, lm, no_space ─────────────────
  Error in `if (rtn < 0) {
      warning("Negative variance estimate obtained!")
      rtn = NaN
  }`: missing value where TRUE/FALSE needed
  Backtrace:
       ▆
    1. ├─testthat::expect_s3_class(...) at test-linear-models.R:262:4
    2. │ └─testthat::quasi_label(enquo(object), arg = "object")
    3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
    4. └─ggeffects::ggemmeans(fit, c("c12hour", "c172code[high level of education,low level of education]"))
    5.   └─ggeffects:::.emmeans_prediction_data(...)
    6.     └─ggeffects:::.ggemmeans_predict_generic(...)
    7.       └─ggeffects:::.ggemmeans_add_confint(...)
    8.         ├─base::suppressWarnings(...)
    9.         │ └─base::withCallingHandlers(...)
   10.         ├─ggeffects:::.var_rename(...)
   11.         │ ├─base::which(!(old_names %in% colnames(x)))
   12.         │ ├─old_names %in% colnames(x)
   13.         │ └─base::colnames(x)
   14.         │   └─base::is.data.frame(x)
   15.         ├─base::as.data.frame(stats::confint(tmp, level = ci.lvl))
   16.         ├─stats::confint(tmp, level = ci.lvl)
   17.         └─emmeans:::confint.emmGrid(tmp, level = ci.lvl)
   18.           ├─base::summary(...)
   19.           └─emmeans:::summary.emmGrid(...)
   20.             └─emmeans:::.est.se.df(object, ...)
   21.               ├─base::t(...)
   22.               └─base::apply(...)
   23.                 └─emmeans (local) FUN(newX[, i], ...)
   24.                   └─emmeans:::.qf.non0(object@V, x)
  
  [ FAIL 2 | WARN 0 | SKIP 10 | PASS 320 ]
  Error: Test failures
  Execution halted