Running 'testthat.R' [59s/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: 66 
  Number of base moments: 6600 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1832  -0.1832  -0.0977  -0.0977   3.2704  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.3421     0.2363  -1.448    0.148    
  Z             1.2645     0.2775   4.557 5.19e-06 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 740.54  on 6665  degrees of freedom
  Residual deviance: 716.79  on 6664  degrees of freedom
  AIC: 720.79
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 66 
  Number of base moments: 6600 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1820  -0.1820  -0.0982  -0.0982   3.2672  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.3315     0.2363  -1.403    0.161    
  Z             1.2398     0.2775   4.468  7.9e-06 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 740.54  on 6665  degrees of freedom
  Residual deviance: 717.74  on 6664  degrees of freedom
  AIC: 721.74
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 72 
  Number of base moments: 720 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.1826     0.2147  -0.851    0.395    
  Z             1.1911     0.2647   4.499 6.83e-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.063  1.124  0.793   0.443
  
  R-sq.(adj) =  0.0255   Deviance explained = 4.64%
  UBRE = -0.41126  Scale est. = 1         n = 792
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 72 
  Number of base moments: 720 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.1559     0.2146  -0.726    0.468    
  Z             1.1304     0.2659   4.251 2.13e-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.495   1.85  1.021   0.639
  
  R-sq.(adj) =  0.0243   Deviance explained = 4.48%
  UBRE = -0.40923  Scale est. = 1         n = 792
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 73 
  Number of base moments: 730 
  ----
          var  rel.inf
  ftime ftime 80.65242
  Z         Z 19.34758
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 73 
  Number of base moments: 730 
  ----
          var  rel.inf
  ftime ftime 79.48533
  Z         Z 20.51467
  Conditions used in construction of plot
  trt: 0 / 1
  offset: 0
  == Skipped tests ===============================================================
  * On CRAN (1)
  
  == Failed tests ================================================================
  -- Failure (test-absRiskComp.R:170:5): should output probabilities with data tables - two covariate profile --
  all(absRiskMC <= 1) is not TRUE
  
  `actual`:   FALSE
  `expected`: TRUE 
  
  [ FAIL 1 | WARN 1 | SKIP 1 | PASS 257 ]
  Error: Test failures
  Execution halted