Running 'testthat.R' [68s]
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.1920  -0.1920  -0.0976  -0.0976   3.2706  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept) -0.09392    0.21371  -0.439     0.66    
  Z            1.35894    0.25546   5.320 1.04e-07 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 830.3  on 7473  degrees of freedom
  Residual deviance: 798.6  on 7472  degrees of freedom
  AIC: 802.6
  
  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.1932  -0.1932  -0.0973  -0.0973   3.2730  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.1017     0.2137  -0.476    0.634    
  Z             1.3797     0.2555   5.401 6.64e-08 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 830.3  on 7473  degrees of freedom
  Residual deviance: 797.6  on 7472  degrees of freedom
  AIC: 801.6
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 86 
  Number of base moments: 860 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)  
  (Intercept)   0.3788     0.1731   2.188   0.0286 *
  Z             0.4788     0.2292   2.090   0.0367 *
  ---
  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.025   0.875
  
  R-sq.(adj) =  0.00254   Deviance explained = 0.77%
  UBRE = -0.38908  Scale est. = 1         n = 946
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 86 
  Number of base moments: 860 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)  
  (Intercept)   0.4301     0.1735    2.48   0.0132 *
  Z             0.3713     0.2292    1.62   0.1052  
  ---
  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.01   0.923
  
  R-sq.(adj) =  0.000668   Deviance explained = 0.461%
  UBRE = -0.3872  Scale est. = 1         n = 946
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 83 
  Number of base moments: 830 
  ----
          var rel.inf
  ftime ftime  87.131
  Z         Z  12.869
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 83 
  Number of base moments: 830 
  ----
          var  rel.inf
  ftime ftime 83.78046
  Z         Z 16.21954
  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