Running 'testthat.R' [51s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(casebase)
  See example usage at http://sahirbhatnagar.com/casebase/
  > library(data.table)
  > library(survival)
  > 
  > test_check("casebase")
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 78 
  Number of base moments: 7800 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1816  -0.1816  -0.1040  -0.1040   3.2320  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.03848    0.20054   0.192    0.848    
  Z            1.12068    0.24372   4.598 4.26e-06 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 875.18  on 7877  degrees of freedom
  Residual deviance: 852.16  on 7876  degrees of freedom
  AIC: 856.16
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 78 
  Number of base moments: 7800 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1837  -0.1837  -0.1032  -0.1032   3.2368  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.02298    0.20053   0.115    0.909    
  Z            1.15902    0.24373   4.755 1.98e-06 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 875.18  on 7877  degrees of freedom
  Residual deviance: 850.53  on 7876  degrees of freedom
  AIC: 854.53
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 72 
  Number of base moments: 720 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.09459    0.20296   0.466 0.641186    
  Z            0.91986    0.26580   3.461 0.000539 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Approximate significance of smooth terms:
             edf Ref.df Chi.sq p-value
  s(ftime) 2.689  3.382  2.458   0.492
  
  R-sq.(adj) =  0.0187   Deviance explained = 3.39%
  UBRE = -0.39952  Scale est. = 1         n = 792
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 72 
  Number of base moments: 720 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.05914    0.20376   0.290 0.771613    
  Z            1.01775    0.26493   3.842 0.000122 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  Approximate significance of smooth terms:
           edf Ref.df Chi.sq p-value
  s(ftime)   1  1.001  1.343   0.247
  
  R-sq.(adj) =  0.0198   Deviance explained = 3.23%
  UBRE = -0.4028  Scale est. = 1         n = 792
  [ FAIL 1 | WARN 1 | SKIP 3 | PASS 235 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • gbm cannot be loaded (2)
  • gbm not implemented (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure (test-absRiskComp.R:168:5): should output probabilities with data tables - two covariate profile ──
  all(absRiskMC <= 1) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  
  [ FAIL 1 | WARN 1 | SKIP 3 | PASS 235 ]
  Error: Test failures
  Execution halted