Running 'test-AUC.R' [8s/10s]
  Running 'test-BinomialRegression.R' [10s/11s]
  Running 'test-BrierScore.R' [9s/11s]
  Running 'test-CauseSpecificCoxRegression.R' [9s/11s]
  Running 'test-FineGrayRegression.R' [7s/8s]
  Running 'test-boxplotScore.R' [8s/9s]
  Running 'test-iidCox.R' [11s/13s]
  Running 'test-phreg.R' [13s/16s]
  Running 'test-predictCox.R' [24s/28s]
  Running 'test-predictCoxPL.R' [9s/11s]
  Running 'test-predictRisk-TD.R' [10s/12s]
  Running 'test-predictRisk.R' [10s/12s]
  Running 'test-score-bootstrap.R' [31s/35s]
  Running 'test-score.R' [20s/16s]
  Running 'test-summary-score.R' [19s/17s]
  Running 'test-wglm.R' [8s/10s]
Running the tests in 'tests/test-wglm.R' failed.
Complete output:
  > ### test-wglm.R --- 
  > ##----------------------------------------------------------------------
  > ## Author: Brice Ozenne
  > ## Created: Dec 21 2021 (11:04) 
  > ## Version: 
  > ## Last-Updated: Dec 21 2021 (16:46) 
  > ##           By: Brice Ozenne
  > ##     Update #: 16
  > ##----------------------------------------------------------------------
  > ## 
  > ### Commentary: 
  > ## 
  > ### Change Log:
  > ##----------------------------------------------------------------------
  > ## 
  > ### Code:
  > 
  > ## * Packages
  > library(testthat)
  > library(data.table)
  > library(mets)
  Loading required package: timereg
  Loading required package: survival
  Loading required package: lava
  
  Attaching package: 'lava'
  
  The following object is masked from 'package:testthat':
  
      compare
  
  mets version 1.3.0
  > library(riskRegression)
  riskRegression version 2022.03.22
  > library(survival)
  > 
  > ## * Simulate data
  > set.seed(10)
  > n <- 250
  > tau <- 1:5
  > d <- sampleData(n, outcome = "competing.risks")
  > dFull <- d[event!=0] ## remove censoring
  > dSurv <- d[event!=2] ## remove competing risk
  > 
  > ## * no censoring
  > test_that("wglm - no censoring",{
  +     test <- wglm(regressor.event = ~ X1 +  X8, formula.censor = Surv(time,event==0) ~ 1,
  +                  times = tau, data = dFull)
  + 
  +     GS <- suppressWarnings(logitIPCW(formula = Event(time,event)~X1 + X8,
  +                                      time = tau[5], data = dFull))
  + 
  +     expect_equal(coef(test, time = tau[5]), summary(GS)$coef[,"Estimate"], tol = 1e-5)
  +     expect_equal(summary(test, print = FALSE)[[5]][,"Std. Error"], summary(GS)$coef[,"Std.Err"], tol = 1e-5)
  +  
  +     ## ate
  +     test.ate <- ate(test, data = dFull, times = tau, treatment = "X1", verbose = FALSE)
  +     GS.ate <- logitATE(formula = Event(time,event)~X1 + X8,
  +                        time = tau[5], data = dFull, treat.model = X1~1)
  +     expect_equal(test.ate$diffRisk[5,estimate], GS.ate$difriskG, tol = 1e-5)
  +     expect_equal(test.ate$diffRisk[5,se], GS.ate$se.difriskG, tol = 1e-5)
  + })
  -- Failure (???): wglm - no censoring ------------------------------------------
  test.ate$diffRisk[5, estimate] not equal to GS.ate$difriskG.
  names for current but not for target
  
  Error in reporter$stop_if_needed() : Test failed
  Calls: test_that -> <Anonymous>
  Execution halted