Running 'testthat.R' [54s]
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: 62 
  Number of base moments: 6200 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1991  -0.1991  -0.0947  -0.0947   3.2890  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.3664     0.2362  -1.551    0.121    
  Z             1.4938     0.2810   5.315 1.07e-07 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 695.66  on 6261  degrees of freedom
  Residual deviance: 663.65  on 6260  degrees of freedom
  AIC: 667.65
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 62 
  Number of base moments: 6200 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1985  -0.1985  -0.0949  -0.0949   3.2879  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.3627     0.2362  -1.535    0.125    
  Z             1.4832     0.2810   5.278 1.31e-07 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 695.66  on 6261  degrees of freedom
  Residual deviance: 664.11  on 6260  degrees of freedom
  AIC: 668.11
  
  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.2452     0.2293  -1.070    0.285    
  Z             1.2867     0.2827   4.551 5.35e-06 ***
  ---
  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.288  1.523  0.293   0.679
  
  R-sq.(adj) =  0.0341   Deviance explained = 5.73%
  UBRE = -0.41674  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.2274     0.2295  -0.991    0.322    
  Z             1.2318     0.2831   4.351 1.36e-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.594   1.99  1.405   0.468
  
  R-sq.(adj) =  0.0335   Deviance explained = 5.67%
  UBRE = -0.4155  Scale est. = 1         n = 737
  [ 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