Running 'testthat.R' [58s]
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: 69 
  Number of base moments: 6900 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1753  -0.1753  -0.1146  -0.1146   3.1717  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.1385     0.1896   0.731 0.464887    
  Z             0.8556     0.2464   3.472 0.000516 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 774.20  on 6968  degrees of freedom
  Residual deviance: 761.86  on 6967  degrees of freedom
  AIC: 765.86
  
  Number of Fisher Scoring iterations: 7
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 69 
  Number of base moments: 6900 
  ----
  
  Call:
  fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime")
  
  Deviance Residuals: 
      Min       1Q   Median       3Q      Max  
  -0.1732  -0.1732  -0.1154  -0.1154   3.1668  
  
  Coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.1539     0.1896   0.812 0.416785    
  Z             0.8159     0.2464   3.312 0.000928 ***
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  
  (Dispersion parameter for binomial family taken to be 1)
  
      Null deviance: 774.20  on 6968  degrees of freedom
  Residual deviance: 762.97  on 6967  degrees of freedom
  AIC: 766.97
  
  Number of Fisher Scoring iterations: 7
  
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 85 
  Number of base moments: 850 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.2881     0.1793   1.607    0.108    
  Z             0.9662     0.2473   3.907 9.33e-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.332  1.597  0.692   0.715
  
  R-sq.(adj) =  0.0163   Deviance explained = 2.99%
  UBRE = -0.40179  Scale est. = 1         n = 935
  Fitting smooth hazards with case-base sampling
  
  Sample size: 200 
  Number of events: 85 
  Number of base moments: 850 
  ----
  
  Family: binomial 
  Link function: logit 
  
  Formula:
  event ~ s(ftime) + Z + offset(offset)
  
  Parametric coefficients:
              Estimate Std. Error z value Pr(>|z|)    
  (Intercept)   0.2457     0.1855   1.324    0.185    
  Z             1.0343     0.2560   4.040 5.35e-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) 2.671  3.351  3.371   0.367
  
  R-sq.(adj) =  0.0188   Deviance explained = 3.45%
  UBRE = -0.40175  Scale est. = 1         n = 935
  [ 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