Running 'testthat.R' [33s]
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")
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.1652     0.1930   0.856  0.39219    
  Z             0.9246     0.2391   3.867  0.00011 ***
  ---
  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: 859.29  on 7876  degrees of freedom
  AIC: 863.29
  
  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")
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.1585     0.1930   0.821    0.412    
  Z             0.9404     0.2391   3.933 8.39e-05 ***
  ---
  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: 858.74  on 7876  degrees of freedom
  AIC: 862.74
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 67 
  Number of base moments: 670 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)   
  (Intercept)  0.07982    0.20303   0.393  0.69421   
  Z            0.75136    0.26482   2.837  0.00455 **
  ---
  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.001  1.001  1.901   0.168
  
  R-sq.(adj) =  0.0122   Deviance explained =  2.6%
  UBRE = -0.39844  Scale est. = 1         n = 737
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 67 
  Number of base moments: 670 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)  
  (Intercept)   0.1377     0.2031   0.678   0.4979  
  Z             0.6262     0.2652   2.362   0.0182 *
  ---
  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.592   0.207
  
  R-sq.(adj) =  0.00797   Deviance explained = 1.92%
  UBRE = -0.3943  Scale est. = 1         n = 737
  [ 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: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