Running 'testthat.R' [52s]
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: 74 
  Number of base moments: 7400 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1759  -0.1759  -0.1054  -0.1054   3.2235  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.04671    0.20909   0.223    0.823    
  Z            1.02818    0.25226   4.076 4.58e-05 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 830.30  on 7473  degrees of freedom
  Residual deviance: 812.14  on 7472  degrees of freedom
  AIC: 816.14
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 74 
  Number of base moments: 7400 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1739  -0.1739  -0.1064  -0.1064   3.2179  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.06481    0.20911   0.310    0.757    
  Z            0.98772    0.25225   3.916 9.02e-05 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 830.30  on 7473  degrees of freedom
  Residual deviance: 813.57  on 7472  degrees of freedom
  AIC: 817.57
  
  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.1690     0.2214  -0.763    0.445    
  Z             1.1007     0.2658   4.141 3.46e-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  0.805    0.37
  
  R-sq.(adj) =  0.0187   Deviance explained = 3.64%
  UBRE = -0.40589  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.1466     0.2200  -0.667    0.505    
  Z             1.0632     0.2643   4.022 5.76e-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.001  1.001   0.09   0.765
  
  R-sq.(adj) =  0.0178   Deviance explained = 3.44%
  UBRE = -0.40467  Scale est. = 1         n = 858
  [ 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:155:5): should output probabilities with data frames - 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