Running 'testthat.R' [53s]
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: 69 
  Number of base moments: 6900 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1745  -0.1745  -0.1149  -0.1149   3.1698  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.09751    0.18958   0.514 0.606983    
  Z            0.84027    0.24638   3.410 0.000649 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 774.20  on 6968  degrees of freedom
  Residual deviance: 762.29  on 6967  degrees of freedom
  AIC: 766.29
  
  Number of Fisher Scoring iterations: 7
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 69 
  Number of base moments: 6900 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1737  -0.1737  -0.1152  -0.1152   3.1680  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.1032     0.1896   0.544 0.586166    
  Z             0.8256     0.2464   3.351 0.000805 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 774.2  on 6968  degrees of freedom
  Residual deviance: 762.7  on 6967  degrees of freedom
  AIC: 766.7
  
  Number of Fisher Scoring iterations: 7
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 65 
  Number of base moments: 650 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.0338     0.2152  -0.157 0.875175    
  Z             1.0038     0.2843   3.530 0.000415 ***
  ---
  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) 3.018  3.801   6.06   0.156
  
  R-sq.(adj) =  0.0235   Deviance explained =  4.1%
  UBRE = -0.40167  Scale est. = 1         n = 715
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 65 
  Number of base moments: 650 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)   
  (Intercept)  0.06137    0.21325   0.288  0.77352   
  Z            0.80466    0.28829   2.791  0.00525 **
  ---
  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) 3.061   3.86  2.951   0.475
  
  R-sq.(adj) =  0.0136   Deviance explained = 2.81%
  UBRE = -0.39371  Scale est. = 1         n = 715
  [ FAIL 1 | WARN 3 | SKIP 3 | PASS 235 ]
  
  ══ Skipped tests ═══════════════════════════════════════════════════════════════
  • gbm cannot be loaded (2)
  • gbm not implemented (1)
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Failure ('test-absRiskComp.R:173'): 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