R Under development (unstable) (2024-01-31 r85845 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > 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: 91 Number of base moments: 9100 ---- Call: fitSmoothHazard(formula = event ~ Z, data = DF, time = "ftime") Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.2037 0.1720 1.184 0.236 Z 1.1160 0.2178 5.124 2.99e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1021.05 on 9190 degrees of freedom Residual deviance: 993.63 on 9189 degrees of freedom AIC: 997.63 Number of Fisher Scoring iterations: 8 Fitting smooth hazards with case-base sampling Sample size: 200 Number of events: 91 Number of base moments: 9100 ---- Call: fitSmoothHazard(formula = event ~ Z, data = DT, time = "ftime") Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.1963 0.1720 1.141 0.254 Z 1.1372 0.2178 5.221 1.78e-07 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 1021.05 on 9190 degrees of freedom Residual deviance: 992.58 on 9189 degrees of freedom AIC: 996.58 Number of Fisher Scoring iterations: 8 Fitting smooth hazards with case-base sampling Sample size: 200 Number of events: 73 Number of base moments: 730 ---- Family: binomial Link function: logit Formula: event ~ s(ftime) + Z + offset(offset) Parametric coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.08171 0.20436 0.40 0.689 Z 1.13976 0.27201 4.19 2.79e-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.087 2.616 3.297 0.38 R-sq.(adj) = 0.0235 Deviance explained = 4.46% UBRE = -0.40774 Scale est. = 1 n = 803 Fitting smooth hazards with case-base sampling Sample size: 200 Number of events: 73 Number of base moments: 730 ---- Family: binomial Link function: logit Formula: event ~ s(ftime) + Z + offset(offset) Parametric coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 0.1079 0.2052 0.526 0.599 Z 1.0746 0.2721 3.949 7.85e-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.901 2.357 2.634 0.405 R-sq.(adj) = 0.0197 Deviance explained = 3.86% UBRE = -0.40454 Scale est. = 1 n = 803 [ FAIL 0 | WARN 2 | SKIP 3 | PASS 236 ] ══ Skipped tests (3) ═══════════════════════════════════════════════════════════ • gbm cannot be loaded (2): 'test-plotHazard.R:3:1', 'test-plotSingleEventCB.R:3:1' • gbm not implemented (1): 'test-gbm.R:2:1' [ FAIL 0 | WARN 2 | SKIP 3 | PASS 236 ] > > proc.time() user system elapsed 23.10 1.39 24.50