Running ‘testthat.R’ [43s/65s]
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: 70 
  Number of base moments: 7000 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1907  -0.1907  -0.0984  -0.0984   3.2662  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.2463     0.2187  -1.126     0.26    
  Z             1.3314     0.2620   5.082 3.73e-07 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 785.42  on 7069  degrees of freedom
  Residual deviance: 756.58  on 7068  degrees of freedom
  AIC: 760.58
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 70 
  Number of base moments: 7000 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1895  -0.1895  -0.0988  -0.0988   3.2636  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  -0.2379     0.2188  -1.088    0.277    
  Z             1.3096     0.2620   4.999 5.76e-07 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 785.42  on 7069  degrees of freedom
  Residual deviance: 757.54  on 7068  degrees of freedom
  AIC: 761.54
  
  Number of Fisher Scoring iterations: 8
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 65 
  Number of base moments: 650 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.01751    0.22677   0.077 0.938470    
  Z            0.99983    0.28422   3.518 0.000435 ***
  ---
  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) 4.02  4.981  4.587   0.493
  
  R-sq.(adj) =  0.0283   Deviance explained =  4.8%
  UBRE = -0.40313  Scale est. = 1         n = 715
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 65 
  Number of base moments: 650 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)  0.02481    0.22594   0.110 0.912578    
  Z            1.01057    0.28161   3.589 0.000333 ***
  ---
  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) 2.572  3.185  1.551   0.749
  
  R-sq.(adj) =  0.0199   Deviance explained = 3.78%
  UBRE = -0.40096  Scale est. = 1         n = 715
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 77 
  Number of base moments: 770 
  ----
          var  rel.inf
  ftime ftime 84.28246
  Z         Z 15.71754
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 77 
  Number of base moments: 770 
  ----
          var  rel.inf
  ftime ftime 84.16222
  Z         Z 15.83778
  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 2 | SKIP 1 | PASS 257 ]
  Error: Test failures
  Execution halted