Running 'testthat.R' [48s]
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: 82 
  Number of base moments: 8200 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.1122     0.2090  -0.537    0.591    
  Z             1.4617     0.2469   5.921  3.2e-09 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 920.07  on 8281  degrees of freedom
  Residual deviance: 879.94  on 8280  degrees of freedom
  AIC: 883.94
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 82 
  Number of base moments: 8200 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.1125     0.2090  -0.539     0.59    
  Z             1.4628     0.2469   5.925 3.12e-09 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 920.07  on 8281  degrees of freedom
  Residual deviance: 879.88  on 8280  degrees of freedom
  AIC: 883.88
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 78 
  Number of base moments: 780 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
               Estimate Std. Error z value Pr(>|z|)    
  (Intercept) -0.006967   0.205447  -0.034    0.973    
  Z            1.102828   0.257842   4.277 1.89e-05 ***
  ---
  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.303  1.548  1.554   0.252
  
  R-sq.(adj) =  0.0294   Deviance explained = 5.01%
  UBRE = -0.41358  Scale est. = 1         n = 858
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 78 
  Number of base moments: 780 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept) -0.03446    0.20526  -0.168    0.867    
  Z            1.17030    0.26043   4.494    7e-06 ***
  ---
  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.004  1.009  1.827   0.177
  
  R-sq.(adj) =  0.0326   Deviance explained =  5.5%
  UBRE = -0.41723  Scale est. = 1         n = 858
  [ FAIL 1 | WARN 3 | SKIP 3 | PASS 235 ]
  
  ══ Skipped tests (3) ═══════════════════════════════════════════════════════════
  • gbm cannot be loaded (2): 'test-plotHazard.R:3:1',
    'test-plotSingleEventCB.R:3:1'
  • gbm not implemented (1): 'test-gbm.R:2:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-absRiskComp.R:173:5'): should output probabilities with data tables - two covariate profile ──
  all(absRiskMC <= 1 + eps) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  
  [ FAIL 1 | WARN 3 | SKIP 3 | PASS 235 ]
  Error: Test failures
  Execution halted