Running 'testthat.R' [49s]
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: 76 
  Number of base moments: 7600 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1731  -0.1731  -0.1135  -0.1135   3.1775  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.1492     0.1863   0.801 0.423016    
  Z             0.8490     0.2373   3.578 0.000346 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 852.74  on 7675  degrees of freedom
  Residual deviance: 839.45  on 7674  degrees of freedom
  AIC: 843.45
  
  Number of Fisher Scoring iterations: 7
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 76 
  Number of base moments: 7600 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1701  -0.1701  -0.1150  -0.1150   3.1695  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.1750     0.1863   0.939 0.347612    
  Z             0.7873     0.2372   3.318 0.000905 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 852.74  on 7675  degrees of freedom
  Residual deviance: 841.32  on 7674  degrees of freedom
  AIC: 845.32
  
  Number of Fisher Scoring iterations: 7
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 62 
  Number of base moments: 620 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.3002     0.2426  -1.237    0.216    
  Z             1.1694     0.2949   3.965 7.34e-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  1.001  2.385   0.123
  
  R-sq.(adj) =  0.0289   Deviance explained = 5.64%
  UBRE = -0.41627  Scale est. = 1         n = 682
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 62 
  Number of base moments: 620 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.2696     0.2434  -1.108 0.267956    
  Z             1.0897     0.2940   3.706 0.000211 ***
  ---
  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  2.604   0.107
  
  R-sq.(adj) =  0.0255   Deviance explained = 5.08%
  UBRE = -0.41289  Scale est. = 1         n = 682
  [ 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:160:5'): should output probabilities with data frames - 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