Running 'testthat.R' [55s/62s]
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: 88 
  Number of base moments: 8800 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1737  -0.1737  -0.1106  -0.1106   3.1936  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.2566     0.1801   1.425    0.154    
  Z             0.9072     0.2242   4.047 5.19e-05 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 987.39  on 8887  degrees of freedom
  Residual deviance: 970.07  on 8886  degrees of freedom
  AIC: 974.07
  
  Number of Fisher Scoring iterations: 7
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 88 
  Number of base moments: 8800 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1721  -0.1721  -0.1114  -0.1114   3.1892  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.2707     0.1801   1.503    0.133    
  Z             0.8742     0.2242   3.900 9.62e-05 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 987.39  on 8887  degrees of freedom
  Residual deviance: 971.31  on 8886  degrees of freedom
  AIC: 975.31
  
  Number of Fisher Scoring iterations: 7
  
  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.07431    0.24129  -0.308    0.758    
  Z            1.28800    0.30066   4.284 1.84e-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  1.464   0.226
  
  R-sq.(adj) =  0.028   Deviance explained = 4.66%
  UBRE = -0.41095  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.009262   0.237658  -0.039 0.968911    
  Z            1.161491   0.298681   3.889 0.000101 ***
  ---
  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  0.305   0.581
  
  R-sq.(adj) =  0.0219   Deviance explained = 3.93%
  UBRE = -0.40652  Scale est. = 1         n = 737
  == 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