diff --git a/404.html b/404.html index 91e437d..ce3d34e 100644 --- a/404.html +++ b/404.html @@ -32,7 +32,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/CONDUCT.html b/CONDUCT.html index 8dd5809..4b3a541 100644 --- a/CONDUCT.html +++ b/CONDUCT.html @@ -17,7 +17,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/LICENSE-text.html b/LICENSE-text.html index c1d9e4d..e743663 100644 --- a/LICENSE-text.html +++ b/LICENSE-text.html @@ -17,7 +17,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/articles/competingRisk.html b/articles/competingRisk.html index b44e156..0483b58 100644 --- a/articles/competingRisk.html +++ b/articles/competingRisk.html @@ -33,7 +33,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -106,7 +106,7 @@

Competing risk analysis

Maxime Turgeon

-

2023-08-03

+

2024-02-01

Source: vignettes/competingRisk.Rmd @@ -498,9 +498,9 @@

Absolute risk

Session information

-
## R version 4.3.1 (2023-06-16)
+
## R version 4.3.2 (2023-10-31)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
-## Running under: Ubuntu 22.04.2 LTS
+## Running under: Ubuntu 22.04.3 LTS
 ## 
 ## Matrix products: default
 ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
@@ -510,24 +510,23 @@ 

Session information## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: -## [1] casebase_0.10.2.9999 +## [1] casebase_0.10.4 ## ## loaded via a namespace (and not attached): -## [1] sass_0.4.7 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 -## [5] lattice_0.21-8 digest_0.6.33 magrittr_2.0.3 evaluate_0.21 -## [9] grid_4.3.1 fastmap_1.1.1 rprojroot_2.0.3 jsonlite_1.8.7 -## [13] Matrix_1.5-4.1 survival_3.5-5 mgcv_1.8-42 purrr_1.0.1 -## [17] fansi_1.0.4 scales_1.2.1 textshaping_0.3.6 jquerylib_0.1.4 -## [21] cli_3.6.1 rlang_1.1.1 munsell_0.5.0 splines_4.3.1 -## [25] cachem_1.0.8 yaml_2.3.7 tools_4.3.1 memoise_2.0.1 -## [29] dplyr_1.1.2 colorspace_2.1-0 ggplot2_3.4.2 VGAM_1.1-8 -## [33] vctrs_0.6.3 R6_2.5.1 stats4_4.3.1 lifecycle_1.0.3 -## [37] stringr_1.5.0 fs_1.6.3 ragg_1.2.5 pkgconfig_2.0.3 -## [41] desc_1.4.2 pkgdown_2.0.7 bslib_0.5.0 pillar_1.9.0 -## [45] gtable_0.3.3 data.table_1.14.8 glue_1.6.2 systemfonts_1.0.4 -## [49] xfun_0.39 tibble_3.2.1 tidyselect_1.2.0 highr_0.10 -## [53] knitr_1.43 htmltools_0.5.5 nlme_3.1-162 rmarkdown_2.23 -## [57] compiler_4.3.1

+## [1] sass_0.4.8 utf8_1.2.4 generics_0.1.3 stringi_1.8.3 +## [5] lattice_0.21-9 digest_0.6.34 magrittr_2.0.3 evaluate_0.23 +## [9] grid_4.3.2 fastmap_1.1.1 jsonlite_1.8.8 Matrix_1.6-1.1 +## [13] survival_3.5-7 mgcv_1.9-0 purrr_1.0.2 fansi_1.0.6 +## [17] scales_1.3.0 textshaping_0.3.7 jquerylib_0.1.4 cli_3.6.2 +## [21] rlang_1.1.3 munsell_0.5.0 splines_4.3.2 cachem_1.0.8 +## [25] yaml_2.3.8 tools_4.3.2 memoise_2.0.1 dplyr_1.1.4 +## [29] colorspace_2.1-0 ggplot2_3.4.4 VGAM_1.1-9 vctrs_0.6.5 +## [33] R6_2.5.1 stats4_4.3.2 lifecycle_1.0.4 stringr_1.5.1 +## [37] fs_1.6.3 ragg_1.2.7 pkgconfig_2.0.3 desc_1.4.3 +## [41] pkgdown_2.0.7 bslib_0.6.1 pillar_1.9.0 gtable_0.3.4 +## [45] data.table_1.15.0 glue_1.7.0 systemfonts_1.0.5 xfun_0.41 +## [49] tibble_3.2.1 tidyselect_1.2.0 highr_0.10 knitr_1.45 +## [53] htmltools_0.5.7 nlme_3.1-163 rmarkdown_2.25 compiler_4.3.2

References diff --git a/articles/customizingpopTime.html b/articles/customizingpopTime.html index b4b81cd..6ff7050 100644 --- a/articles/customizingpopTime.html +++ b/articles/customizingpopTime.html @@ -33,7 +33,7 @@ casebase - 0.10.2.9999 + 0.10.4

@@ -106,7 +106,7 @@

Customizing Population Time Plots

Sahir R. Bhatnagar

-

2023-08-03

+

2024-02-01

Source: vignettes/customizingpopTime.Rmd @@ -134,19 +134,21 @@

Setup x <- popTime(ERSPC, time = "Follow.Up.Time", event = "DeadOfPrCa", exposure = "ScrArm") head(x)
##           ScrArm   time event original.time original.event event status ycoord
+##           <fctr>  <num> <num>         <num>          <int>       <fctr>  <int>
 ## 1: Control group 0.0027     0        0.0027              0     censored  88232
 ## 2: Control group 0.0027     0        0.0027              0     censored  88231
 ## 3: Control group 0.0027     0        0.0027              0     censored  88230
 ## 4: Control group 0.0027     0        0.0027              0     censored  88229
 ## 5: Control group 0.0137     0        0.0137              0     censored  88228
 ## 6: Control group 0.0137     0        0.0137              0     censored  88227
-##    yc n_available
-## 1:  0           0
-## 2:  0           0
-## 3:  0           0
-## 4:  0           0
-## 5:  0           0
-## 6:  0           0
+## yc n_available +## <int> <int> +## 1: 0 0 +## 2: 0 0 +## 3: 0 0 +## 4: 0 0 +## 5: 0 0 +## 6: 0 0

Introduction @@ -197,6 +199,7 @@

The .params arguments= 0.5)

## $data
 ##                  ScrArm    time event original.time original.event event status
+##                  <fctr>   <num> <num>         <num>          <int>       <fctr>
 ##      1:   Control group  0.0027     0        0.0027              0     censored
 ##      2:   Control group  0.0027     0        0.0027              0     censored
 ##      3:   Control group  0.0027     0        0.0027              0     censored
@@ -208,18 +211,19 @@ 

The .params arguments## 159891: Screening group 14.9405 0 14.9405 0 censored ## 159892: Screening group 14.9405 0 14.9405 0 censored ## 159893: Screening group 14.9405 0 14.9405 0 censored -## ycoord yc n_available -## 1: 88232 0 0 -## 2: 88231 0 0 -## 3: 88230 0 0 -## 4: 88229 0 0 -## 5: 88228 0 0 -## --- -## 159889: 5 0 0 -## 159890: 4 0 0 -## 159891: 3 0 0 -## 159892: 2 0 0 -## 159893: 1 0 0 +## ycoord yc n_available +## <int> <int> <int> +## 1: 88232 0 0 +## 2: 88231 0 0 +## 3: 88230 0 0 +## 4: 88229 0 0 +## 5: 88228 0 0 +## --- +## 159889: 5 0 0 +## 159890: 4 0 0 +## 159891: 3 0 0 +## 159892: 2 0 0 +## 159893: 1 0 0 ## ## $mapping ## Aesthetic mapping: @@ -249,6 +253,7 @@

The .params argumentsribbon.params))

## $data
 ##                  ScrArm    time event original.time original.event event status
+##                  <fctr>   <num> <num>         <num>          <int>       <fctr>
 ##      1:   Control group  0.0027     0        0.0027              0     censored
 ##      2:   Control group  0.0027     0        0.0027              0     censored
 ##      3:   Control group  0.0027     0        0.0027              0     censored
@@ -260,18 +265,19 @@ 

The .params arguments## 159891: Screening group 14.9405 0 14.9405 0 censored ## 159892: Screening group 14.9405 0 14.9405 0 censored ## 159893: Screening group 14.9405 0 14.9405 0 censored -## ycoord yc n_available -## 1: 88232 0 0 -## 2: 88231 0 0 -## 3: 88230 0 0 -## 4: 88229 0 0 -## 5: 88228 0 0 -## --- -## 159889: 5 0 0 -## 159890: 4 0 0 -## 159891: 3 0 0 -## 159892: 2 0 0 -## 159893: 1 0 0 +## ycoord yc n_available +## <int> <int> <int> +## 1: 88232 0 0 +## 2: 88231 0 0 +## 3: 88230 0 0 +## 4: 88229 0 0 +## 5: 88228 0 0 +## --- +## 159889: 5 0 0 +## 159890: 4 0 0 +## 159891: 3 0 0 +## 159892: 2 0 0 +## 159893: 1 0 0 ## ## $mapping ## Aesthetic mapping: @@ -499,9 +505,9 @@

Change Point Color and Legend Labe

Session information

-
## R version 4.3.1 (2023-06-16)
+
## R version 4.3.2 (2023-10-31)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
-## Running under: Ubuntu 22.04.2 LTS
+## Running under: Ubuntu 22.04.3 LTS
 ## 
 ## Matrix products: default
 ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
@@ -511,24 +517,24 @@ 

Session information## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: -## [1] colorspace_2.1-0 data.table_1.14.8 ggplot2_3.4.2 -## [4] casebase_0.10.2.9999 survival_3.5-5 +## [1] colorspace_2.1-0 data.table_1.15.0 ggplot2_3.4.4 casebase_0.10.4 +## [5] survival_3.5-7 ## ## loaded via a namespace (and not attached): -## [1] sass_0.4.7 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 -## [5] lattice_0.21-8 digest_0.6.33 magrittr_2.0.3 evaluate_0.21 -## [9] grid_4.3.1 fastmap_1.1.1 rprojroot_2.0.3 jsonlite_1.8.7 -## [13] Matrix_1.5-4.1 mgcv_1.8-42 purrr_1.0.1 fansi_1.0.4 -## [17] scales_1.2.1 textshaping_0.3.6 jquerylib_0.1.4 cli_3.6.1 -## [21] rlang_1.1.1 munsell_0.5.0 splines_4.3.1 withr_2.5.0 -## [25] cachem_1.0.8 yaml_2.3.7 tools_4.3.1 memoise_2.0.1 -## [29] dplyr_1.1.2 VGAM_1.1-8 vctrs_0.6.3 R6_2.5.1 -## [33] stats4_4.3.1 lifecycle_1.0.3 stringr_1.5.0 fs_1.6.3 -## [37] ragg_1.2.5 pkgconfig_2.0.3 desc_1.4.2 pkgdown_2.0.7 -## [41] bslib_0.5.0 pillar_1.9.0 gtable_0.3.3 glue_1.6.2 -## [45] systemfonts_1.0.4 highr_0.10 xfun_0.39 tibble_3.2.1 -## [49] tidyselect_1.2.0 knitr_1.43 farver_2.1.1 nlme_3.1-162 -## [53] htmltools_0.5.5 labeling_0.4.2 rmarkdown_2.23 compiler_4.3.1

+## [1] sass_0.4.8 utf8_1.2.4 generics_0.1.3 stringi_1.8.3 +## [5] lattice_0.21-9 digest_0.6.34 magrittr_2.0.3 evaluate_0.23 +## [9] grid_4.3.2 fastmap_1.1.1 jsonlite_1.8.8 Matrix_1.6-1.1 +## [13] mgcv_1.9-0 purrr_1.0.2 fansi_1.0.6 scales_1.3.0 +## [17] textshaping_0.3.7 jquerylib_0.1.4 cli_3.6.2 rlang_1.1.3 +## [21] munsell_0.5.0 splines_4.3.2 withr_3.0.0 cachem_1.0.8 +## [25] yaml_2.3.8 tools_4.3.2 memoise_2.0.1 dplyr_1.1.4 +## [29] VGAM_1.1-9 vctrs_0.6.5 R6_2.5.1 stats4_4.3.2 +## [33] lifecycle_1.0.4 stringr_1.5.1 fs_1.6.3 ragg_1.2.7 +## [37] pkgconfig_2.0.3 desc_1.4.3 pkgdown_2.0.7 bslib_0.6.1 +## [41] pillar_1.9.0 gtable_0.3.4 glue_1.7.0 systemfonts_1.0.5 +## [45] highr_0.10 xfun_0.41 tibble_3.2.1 tidyselect_1.2.0 +## [49] knitr_1.45 farver_2.1.1 htmltools_0.5.7 nlme_3.1-163 +## [53] labeling_0.4.3 rmarkdown_2.25 compiler_4.3.2
diff --git a/articles/customizingpopTime_files/figure-html/unnamed-chunk-12-1.png b/articles/customizingpopTime_files/figure-html/unnamed-chunk-12-1.png index a8fa48b..700de49 100644 Binary files a/articles/customizingpopTime_files/figure-html/unnamed-chunk-12-1.png and b/articles/customizingpopTime_files/figure-html/unnamed-chunk-12-1.png differ diff --git a/articles/customizingpopTime_files/figure-html/unnamed-chunk-15-1.png b/articles/customizingpopTime_files/figure-html/unnamed-chunk-15-1.png index 1ca7846..78cf4a4 100644 Binary files a/articles/customizingpopTime_files/figure-html/unnamed-chunk-15-1.png and b/articles/customizingpopTime_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/customizingpopTime_files/figure-html/unnamed-chunk-16-1.png b/articles/customizingpopTime_files/figure-html/unnamed-chunk-16-1.png index c0afeb4..5dad0ec 100644 Binary files a/articles/customizingpopTime_files/figure-html/unnamed-chunk-16-1.png and b/articles/customizingpopTime_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/articles/customizingpopTime_files/figure-html/unnamed-chunk-17-1.png b/articles/customizingpopTime_files/figure-html/unnamed-chunk-17-1.png index b6e6416..2196a49 100644 Binary files a/articles/customizingpopTime_files/figure-html/unnamed-chunk-17-1.png and b/articles/customizingpopTime_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/articles/index.html b/articles/index.html index 43f74eb..245d974 100644 --- a/articles/index.html +++ b/articles/index.html @@ -17,7 +17,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/articles/plotabsRisk.html b/articles/plotabsRisk.html index 732bcb7..fad841b 100644 --- a/articles/plotabsRisk.html +++ b/articles/plotabsRisk.html @@ -33,7 +33,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -107,7 +107,7 @@

Plot Cumulative Incidence and Survival

Sahir Rai Bhatnagar

-

2023-08-03

+

2024-02-01

Source: vignettes/plotabsRisk.Rmd diff --git a/articles/plotabsRisk_files/figure-html/unnamed-chunk-2-1.png b/articles/plotabsRisk_files/figure-html/unnamed-chunk-2-1.png index 4578ccc..3e901bc 100644 Binary files a/articles/plotabsRisk_files/figure-html/unnamed-chunk-2-1.png and b/articles/plotabsRisk_files/figure-html/unnamed-chunk-2-1.png differ diff --git a/articles/plotabsRisk_files/figure-html/unnamed-chunk-3-1.png b/articles/plotabsRisk_files/figure-html/unnamed-chunk-3-1.png index 4432333..2979c26 100644 Binary files a/articles/plotabsRisk_files/figure-html/unnamed-chunk-3-1.png and b/articles/plotabsRisk_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/articles/plotabsRisk_files/figure-html/unnamed-chunk-4-1.png b/articles/plotabsRisk_files/figure-html/unnamed-chunk-4-1.png index 4399cb6..4ec0aee 100644 Binary files a/articles/plotabsRisk_files/figure-html/unnamed-chunk-4-1.png and b/articles/plotabsRisk_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/articles/plotabsRisk_files/figure-html/unnamed-chunk-5-1.png b/articles/plotabsRisk_files/figure-html/unnamed-chunk-5-1.png index 8f481e9..5fc1fe7 100644 Binary files a/articles/plotabsRisk_files/figure-html/unnamed-chunk-5-1.png and b/articles/plotabsRisk_files/figure-html/unnamed-chunk-5-1.png differ diff --git a/articles/plotabsRisk_files/figure-html/unnamed-chunk-6-1.png b/articles/plotabsRisk_files/figure-html/unnamed-chunk-6-1.png index d954f9f..5bb8d48 100644 Binary files a/articles/plotabsRisk_files/figure-html/unnamed-chunk-6-1.png and b/articles/plotabsRisk_files/figure-html/unnamed-chunk-6-1.png differ diff --git a/articles/plotabsRisk_files/figure-html/unnamed-chunk-7-1.png b/articles/plotabsRisk_files/figure-html/unnamed-chunk-7-1.png index e962091..dd1cafe 100644 Binary files a/articles/plotabsRisk_files/figure-html/unnamed-chunk-7-1.png and b/articles/plotabsRisk_files/figure-html/unnamed-chunk-7-1.png differ diff --git a/articles/plotabsRisk_files/figure-html/unnamed-chunk-8-1.png b/articles/plotabsRisk_files/figure-html/unnamed-chunk-8-1.png index 5ea56cb..7208392 100644 Binary files a/articles/plotabsRisk_files/figure-html/unnamed-chunk-8-1.png and b/articles/plotabsRisk_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/articles/plotsmoothHazard.html b/articles/plotsmoothHazard.html index 41fb50c..67f228d 100644 --- a/articles/plotsmoothHazard.html +++ b/articles/plotsmoothHazard.html @@ -33,7 +33,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -106,7 +106,7 @@

Plot Hazards and Hazard Ratios

Sahir Rai Bhatnagar

-

2023-08-03

+

2024-02-01

Source: vignettes/plotsmoothHazard.Rmd @@ -168,19 +168,19 @@

One binary predictor, no interacti #> #> Coefficients: #> Estimate Std. Error z value Pr(>|z|) -#> (Intercept) -67.9011 14.4567 -4.697 2.64e-06 *** -#> ns(log(time), df = 3)1 40.2575 9.4892 4.242 2.21e-05 *** -#> ns(log(time), df = 3)2 116.2122 28.1795 4.124 3.72e-05 *** -#> ns(log(time), df = 3)3 23.9154 5.7444 4.163 3.14e-05 *** -#> hormon -0.3543 0.1256 -2.821 0.00479 ** +#> (Intercept) -83.4403 18.3248 -4.553 5.28e-06 *** +#> ns(log(time), df = 3)1 50.6330 12.0611 4.198 2.69e-05 *** +#> ns(log(time), df = 3)2 145.9994 35.6225 4.099 4.16e-05 *** +#> ns(log(time), df = 3)3 30.3923 7.3359 4.143 3.43e-05 *** +#> hormon -0.3621 0.1256 -2.883 0.00394 ** #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> #> (Dispersion parameter for binomial family taken to be 1) #> #> Null deviance: 3354.9 on 30198 degrees of freedom -#> Residual deviance: 3276.3 on 30194 degrees of freedom -#> AIC: 3286.3 +#> Residual deviance: 3275.8 on 30194 degrees of freedom +#> AIC: 3285.8 #> #> Number of Fisher Scoring iterations: 10

@@ -245,12 +245,12 @@

Hazard functions on same plots
 head(plot_results$fit)
 #>           time hormon offset cens    visregFit    visregLwr    visregUpr
-#> 1   0.04678729      0      0    0 3.242873e-30 1.526739e-40 6.888030e-20
-#> 2  26.39321585      0      0    0 3.061455e-07 1.998983e-08 4.688636e-06
-#> 3  52.73964441      0      0    0 7.469611e-06 1.638615e-06 3.405014e-05
-#> 4  79.08607297      0      0    0 3.353917e-05 1.275811e-05 8.816949e-05
-#> 5 105.43250153      0      0    0 8.167855e-05 4.243073e-05 1.572300e-04
-#> 6 131.77893009      0      0    0 1.467350e-04 9.231788e-05 2.332285e-04

+#> 1 0.01464968 0 0 0 5.785408e-37 4.698910e-50 7.123129e-24 +#> 2 26.47527900 0 0 0 3.129801e-07 2.032419e-08 4.819703e-06 +#> 3 52.93590833 0 0 0 7.769201e-06 1.712774e-06 3.524135e-05 +#> 4 79.39653765 0 0 0 3.485791e-05 1.334375e-05 9.105941e-05 +#> 5 105.85716697 0 0 0 8.456435e-05 4.418274e-05 1.618535e-04 +#> 6 132.31779629 0 0 0 1.512648e-04 9.560363e-05 2.393324e-04

ggplot2 version @@ -304,22 +304,22 @@

One binary predictor with interac #> #> Coefficients: #> Estimate Std. Error z value Pr(>|z|) -#> (Intercept) -74.617 19.978 -3.735 0.000188 *** -#> hormon -32.356 44.755 -0.723 0.469705 -#> ns(log(time), df = 3)1 44.845 13.132 3.415 0.000638 *** -#> ns(log(time), df = 3)2 128.876 38.912 3.312 0.000926 *** -#> ns(log(time), df = 3)3 26.617 7.971 3.339 0.000839 *** -#> hormon:ns(log(time), df = 3)1 21.414 29.609 0.723 0.469528 -#> hormon:ns(log(time), df = 3)2 61.676 86.779 0.711 0.477258 -#> hormon:ns(log(time), df = 3)3 13.310 17.942 0.742 0.458177 +#> (Intercept) -68.853 18.776 -3.667 0.000245 *** +#> hormon -32.717 43.515 -0.752 0.452149 +#> ns(log(time), df = 3)1 41.024 12.327 3.328 0.000874 *** +#> ns(log(time), df = 3)2 117.704 36.588 3.217 0.001295 ** +#> ns(log(time), df = 3)3 24.360 7.482 3.256 0.001130 ** +#> hormon:ns(log(time), df = 3)1 21.572 28.779 0.750 0.453508 +#> hormon:ns(log(time), df = 3)2 62.505 84.371 0.741 0.458795 +#> hormon:ns(log(time), df = 3)3 13.367 17.443 0.766 0.443487 #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> #> (Dispersion parameter for binomial family taken to be 1) #> #> Null deviance: 3354.9 on 30198 degrees of freedom -#> Residual deviance: 3275.3 on 30191 degrees of freedom -#> AIC: 3291.3 +#> Residual deviance: 3277.0 on 30191 degrees of freedom +#> AIC: 3293 #> #> Number of Fisher Scoring iterations: 11

Now we can easily plot the hazard function over time for each @@ -355,25 +355,25 @@

One continuous predictor with #> data = brcancer, time = "time") #> #> Coefficients: -#> Estimate Std. Error z value Pr(>|z|) -#> (Intercept) -109.0806 32.0380 -3.405 0.000662 *** -#> estrec -1.0734 0.5681 -1.889 0.058830 . -#> ns(log(time), df = 3)1 66.9677 21.1446 3.167 0.001540 ** -#> ns(log(time), df = 3)2 196.2522 62.0330 3.164 0.001558 ** -#> ns(log(time), df = 3)3 40.4393 12.9916 3.113 0.001854 ** -#> estrec:ns(log(time), df = 3)1 0.7285 0.3808 1.913 0.055739 . -#> estrec:ns(log(time), df = 3)2 2.0345 1.0877 1.870 0.061416 . -#> estrec:ns(log(time), df = 3)3 0.4561 0.2360 1.932 0.053300 . +#> Estimate Std. Error z value Pr(>|z|) +#> (Intercept) -56.2906 14.9408 -3.768 0.000165 *** +#> estrec -0.5393 0.2787 -1.935 0.052970 . +#> ns(log(time), df = 3)1 31.7745 9.7675 3.253 0.001142 ** +#> ns(log(time), df = 3)2 94.9238 29.1812 3.253 0.001142 ** +#> ns(log(time), df = 3)3 18.5880 5.9309 3.134 0.001724 ** +#> estrec:ns(log(time), df = 3)1 0.3690 0.1870 1.973 0.048448 * +#> estrec:ns(log(time), df = 3)2 1.0199 0.5350 1.906 0.056604 . +#> estrec:ns(log(time), df = 3)3 0.2277 0.1143 1.993 0.046267 * #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> #> (Dispersion parameter for binomial family taken to be 1) #> #> Null deviance: 3354.9 on 30198 degrees of freedom -#> Residual deviance: 3264.9 on 30191 degrees of freedom -#> AIC: 3280.9 +#> Residual deviance: 3263.2 on 30191 degrees of freedom +#> AIC: 3279.2 #> -#> Number of Fisher Scoring iterations: 14 +#> Number of Fisher Scoring iterations: 13

There are now many ways to plot the time-varying effect of estrogen receptor on the hazard function. The default is to plot the 10th, 50th and 90th quantiles of the by variable:

@@ -470,30 +470,30 @@

#> #> Coefficients: #> Estimate Std. Error z value Pr(>|z|) -#> (Intercept) -91.212702 24.493162 -3.724 0.000196 *** -#> estrec -0.618100 0.412486 -1.498 0.134009 -#> ns(log(time), df = 3)1 55.570819 16.218020 3.426 0.000611 *** -#> ns(log(time), df = 3)2 161.589843 47.523250 3.400 0.000673 *** -#> ns(log(time), df = 3)3 33.263824 9.783363 3.400 0.000674 *** -#> horThyes -0.352159 0.130173 -2.705 0.006824 ** -#> age -0.010362 0.009372 -1.106 0.268884 -#> menostatPost 0.271752 0.183668 1.480 0.138985 -#> tsize 0.007826 0.004045 1.935 0.053008 . -#> tgrade.L 0.534837 0.190911 2.801 0.005087 ** -#> tgrade.Q -0.224313 0.122553 -1.830 0.067200 . -#> pnodes 0.053247 0.007986 6.667 2.60e-11 *** -#> progrec -0.002255 0.000577 -3.909 9.27e-05 *** -#> estrec:ns(log(time), df = 3)1 0.425991 0.278114 1.532 0.125594 -#> estrec:ns(log(time), df = 3)2 1.167845 0.790237 1.478 0.139450 -#> estrec:ns(log(time), df = 3)3 0.262861 0.169300 1.553 0.120511 +#> (Intercept) -4.915e+01 1.263e+01 -3.891 9.99e-05 *** +#> estrec -4.005e-01 2.281e-01 -1.756 0.079171 . +#> ns(log(time), df = 3)1 2.707e+01 8.213e+00 3.296 0.000981 *** +#> ns(log(time), df = 3)2 8.075e+01 2.473e+01 3.265 0.001095 ** +#> ns(log(time), df = 3)3 1.621e+01 5.012e+00 3.235 0.001217 ** +#> horThyes -3.642e-01 1.301e-01 -2.799 0.005119 ** +#> age -8.533e-03 9.289e-03 -0.919 0.358310 +#> menostatPost 2.619e-01 1.838e-01 1.425 0.154133 +#> tsize 8.053e-03 4.011e-03 2.008 0.044654 * +#> tgrade.L 5.441e-01 1.910e-01 2.848 0.004399 ** +#> tgrade.Q -2.126e-01 1.228e-01 -1.731 0.083473 . +#> pnodes 4.966e-02 7.937e-03 6.257 3.92e-10 *** +#> progrec -2.213e-03 5.769e-04 -3.836 0.000125 *** +#> estrec:ns(log(time), df = 3)1 2.750e-01 1.526e-01 1.802 0.071551 . +#> estrec:ns(log(time), df = 3)2 7.586e-01 4.385e-01 1.730 0.083639 . +#> estrec:ns(log(time), df = 3)3 1.698e-01 9.351e-02 1.816 0.069326 . #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> #> (Dispersion parameter for binomial family taken to be 1) #> #> Null deviance: 3354.9 on 30198 degrees of freedom -#> Residual deviance: 3157.7 on 30183 degrees of freedom -#> AIC: 3189.7 +#> Residual deviance: 3163.3 on 30183 degrees of freedom +#> AIC: 3195.3 #> #> Number of Fisher Scoring iterations: 13

In the following plot, we show the time-varying effect of @@ -606,18 +606,18 @@

Manson Trial (eprchd)#> #> Coefficients: #> Estimate Std. Error z value Pr(>|z|) -#> (Intercept) -6.08972 0.17545 -34.709 < 2e-16 *** -#> treatmentestPro 0.58336 0.22419 2.602 0.00927 ** -#> time 0.11465 0.04772 2.403 0.01627 * -#> treatmentestPro:time -0.12567 0.06336 -1.983 0.04733 * +#> (Intercept) -6.09141 0.17582 -34.645 < 2e-16 *** +#> treatmentestPro 0.61814 0.22519 2.745 0.00605 ** +#> time 0.11173 0.04785 2.335 0.01954 * +#> treatmentestPro:time -0.13087 0.06377 -2.052 0.04015 * #> --- #> Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 #> #> (Dispersion parameter for binomial family taken to be 1) #> #> Null deviance: 3635.4 on 32723 degrees of freedom -#> Residual deviance: 3626.3 on 32720 degrees of freedom -#> AIC: 3634.3 +#> Residual deviance: 3625.8 on 32720 degrees of freedom +#> AIC: 3633.8 #> #> Number of Fisher Scoring iterations: 7

To plot the hazard ratio, we must specify the newdata @@ -716,19 +716,19 @@

Save results
 head(result)
 #>    treatment      time log_hazard_ratio standarderror hazard_ratio lowerbound
-#> 1%    estPro 0.9166667       -0.4681589     0.1764989    0.6261540  0.4430421
-#> 2%    estPro 1.7500000       -0.3634299     0.1401219    0.6952874  0.5283144
-#> 3%    estPro 2.5000000       -0.2691739     0.1184741    0.7640104  0.6056949
-#> 4%    estPro 3.1666667       -0.1853907     0.1133671    0.8307796  0.6652541
-#> 5%    estPro 3.4166667       -0.1539721     0.1154480    0.8572960  0.6836932
-#> 6%    estPro 3.9166667       -0.0911347     0.1256429    0.9128947  0.7136302
+#> 1%    estPro 0.9166667       -0.4981772     0.1770987    0.6076373  0.4294352
+#> 2%    estPro 1.7500000       -0.3891195     0.1403865    0.6776533  0.5146481
+#> 3%    estPro 2.5000000       -0.2909676     0.1185219    0.7475399  0.5925818
+#> 4%    estPro 3.1666667       -0.2037214     0.1133852    0.8156896  0.6531475
+#> 5%    estPro 3.4166667       -0.1710041     0.1155051    0.8428181  0.6720719
+#> 6%    estPro 3.9166667       -0.1055695     0.1258445    0.8998119  0.7031253
 #>    upperbound
-#> 1%  0.8849471
-#> 2%  0.9150321
-#> 3%  0.9637061
-#> 4%  1.0374905
-#> 5%  1.0749797
-#> 6%  1.1677992
+#> 1% 0.8597875 +#> 2% 0.8922874 +#> 3% 0.9430189 +#> 4% 1.0186818 +#> 5% 1.0569439 +#> 6% 1.1515181
diff --git a/articles/plotsmoothHazard_files/figure-html/many-predictors-plot-1.png b/articles/plotsmoothHazard_files/figure-html/many-predictors-plot-1.png index 1982032..3a42322 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/many-predictors-plot-1.png and b/articles/plotsmoothHazard_files/figure-html/many-predictors-plot-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/many-predictors-plot-2-1.png b/articles/plotsmoothHazard_files/figure-html/many-predictors-plot-2-1.png index e3b8373..7604d6f 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/many-predictors-plot-2-1.png and b/articles/plotsmoothHazard_files/figure-html/many-predictors-plot-2-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/plot-mason-1.png b/articles/plotsmoothHazard_files/figure-html/plot-mason-1.png index c7f2a62..4b0d951 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/plot-mason-1.png and b/articles/plotsmoothHazard_files/figure-html/plot-mason-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-11-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-11-1.png index be772ea..32d0916 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-11-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-11-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-13-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-13-1.png index 48f4ee8..c5c0e23 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-13-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-13-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-14-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-14-1.png index 4cb906d..973b0d4 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-14-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-14-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-15-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-15-1.png index 549eb6b..c11912f 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-15-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-16-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-16-1.png index c7f2a62..4b0d951 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-16-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-18-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-18-1.png index b83ffc1..4857be4 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-18-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-18-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-19-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-19-1.png index b83ffc1..4857be4 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-19-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-19-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-3-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-3-1.png index f6cf355..b06428e 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-3-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-3-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-4-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-4-1.png index b12c116..5728d2a 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-4-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-9-1.png b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-9-1.png index 799cc49..4b924dc 100644 Binary files a/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-9-1.png and b/articles/plotsmoothHazard_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/popTime.html b/articles/popTime.html index 294a78c..07ae154 100644 --- a/articles/popTime.html +++ b/articles/popTime.html @@ -33,7 +33,7 @@ casebase - 0.10.2.9999 + 0.10.4
@@ -106,7 +106,7 @@

Population Time Plots

Sahir R. Bhatnagar

-

2023-08-03

+

2024-02-01

Source: vignettes/popTime.Rmd @@ -186,19 +186,21 @@

European Ra
 head(pt_object)
##             ScrArm   time event original.time original.event event status
+##             <fctr>  <num> <num>         <num>          <int>       <fctr>
 ## 1: Screening group 0.0027     0        0.0027              0     censored
 ## 2: Screening group 0.0027     0        0.0027              0     censored
 ## 3: Screening group 0.0027     0        0.0027              0     censored
 ## 4:   Control group 0.0027     0        0.0027              0     censored
 ## 5:   Control group 0.0027     0        0.0027              0     censored
 ## 6:   Control group 0.0027     0        0.0027              0     censored
-##    ycoord yc n_available
-## 1: 159893  0           0
-## 2: 159892  0           0
-## 3: 159891  0           0
-## 4: 159890  0           0
-## 5: 159889  0           0
-## 6: 159888  0           0
+## ycoord yc n_available +## <int> <int> <int> +## 1: 159893 0 0 +## 2: 159892 0 0 +## 3: 159891 0 0 +## 4: 159890 0 0 +## 5: 159889 0 0 +## 6: 159888 0 0
 class(pt_object)
## [1] "popTime"    "data.table" "data.frame"
@@ -247,19 +249,21 @@

Exposure Stratified Population
 head(pt_object_strat)
##           ScrArm   time event original.time original.event event status ycoord
+##           <fctr>  <num> <num>         <num>          <int>       <fctr>  <int>
 ## 1: Control group 0.0027     0        0.0027              0     censored  88232
 ## 2: Control group 0.0027     0        0.0027              0     censored  88231
 ## 3: Control group 0.0027     0        0.0027              0     censored  88230
 ## 4: Control group 0.0027     0        0.0027              0     censored  88229
 ## 5: Control group 0.0137     0        0.0137              0     censored  88228
 ## 6: Control group 0.0137     0        0.0137              0     censored  88227
-##    yc n_available
-## 1:  0           0
-## 2:  0           0
-## 3:  0           0
-## 4:  0           0
-## 5:  0           0
-## 6:  0           0
+## yc n_available +## <int> <int> +## 1: 0 0 +## 2: 0 0 +## 3: 0 0 +## 4: 0 0 +## 5: 0 0 +## 6: 0 0
 class(pt_object_strat)
## [1] "popTime"    "data.table" "data.frame"
@@ -667,8 +671,8 @@

Simulate the data# e event type 0-censored, 1-event of interest, 2-competing event # t observed time/endpoint # z is a binary covariate -DTsim <- data.table(ID = seq_len(nobs), z=rbinom(nobs, 1, 0.5)) -setkey(DTsim, ID) +DTsim <- data.table(ID = seq_len(nobs), z=rbinom(nobs, 1, 0.5)) +setkey(DTsim, ID) DTsim[,`:=` (event_time = rweibull(nobs, a1, b1 * exp(z * c1)^(-1/a1)), competing_time = rweibull(nobs, a2, b2 * exp(z * c2)^(-1/a2)), end_of_study_time = eost)] @@ -704,9 +708,9 @@

Stratified by Binary Covariate z

Session information

-
## R version 4.3.1 (2023-06-16)
+
## R version 4.3.2 (2023-10-31)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
-## Running under: Ubuntu 22.04.2 LTS
+## Running under: Ubuntu 22.04.3 LTS
 ## 
 ## Matrix products: default
 ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
@@ -716,25 +720,23 @@ 

Session information## [1] stats graphics grDevices utils datasets methods base ## ## other attached packages: -## [1] data.table_1.14.8 ggplot2_3.4.2 casebase_0.10.2.9999 -## [4] survival_3.5-5 +## [1] data.table_1.15.0 ggplot2_3.4.4 casebase_0.10.4 survival_3.5-7 ## ## loaded via a namespace (and not attached): -## [1] sass_0.4.7 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 -## [5] lattice_0.21-8 digest_0.6.33 magrittr_2.0.3 evaluate_0.21 -## [9] grid_4.3.1 fastmap_1.1.1 rprojroot_2.0.3 jsonlite_1.8.7 -## [13] Matrix_1.5-4.1 mgcv_1.8-42 purrr_1.0.1 fansi_1.0.4 -## [17] scales_1.2.1 textshaping_0.3.6 jquerylib_0.1.4 cli_3.6.1 -## [21] rlang_1.1.1 munsell_0.5.0 splines_4.3.1 withr_2.5.0 -## [25] cachem_1.0.8 yaml_2.3.7 tools_4.3.1 memoise_2.0.1 -## [29] dplyr_1.1.2 colorspace_2.1-0 VGAM_1.1-8 vctrs_0.6.3 -## [33] R6_2.5.1 stats4_4.3.1 lifecycle_1.0.3 stringr_1.5.0 -## [37] fs_1.6.3 ragg_1.2.5 pkgconfig_2.0.3 desc_1.4.2 -## [41] pkgdown_2.0.7 bslib_0.5.0 pillar_1.9.0 gtable_0.3.3 -## [45] glue_1.6.2 systemfonts_1.0.4 highr_0.10 xfun_0.39 -## [49] tibble_3.2.1 tidyselect_1.2.0 knitr_1.43 farver_2.1.1 -## [53] htmltools_0.5.5 nlme_3.1-162 labeling_0.4.2 rmarkdown_2.23 -## [57] compiler_4.3.1

+## [1] sass_0.4.8 utf8_1.2.4 generics_0.1.3 stringi_1.8.3 +## [5] lattice_0.21-9 digest_0.6.34 magrittr_2.0.3 evaluate_0.23 +## [9] grid_4.3.2 fastmap_1.1.1 jsonlite_1.8.8 Matrix_1.6-1.1 +## [13] mgcv_1.9-0 purrr_1.0.2 fansi_1.0.6 scales_1.3.0 +## [17] textshaping_0.3.7 jquerylib_0.1.4 cli_3.6.2 rlang_1.1.3 +## [21] munsell_0.5.0 splines_4.3.2 withr_3.0.0 cachem_1.0.8 +## [25] yaml_2.3.8 tools_4.3.2 memoise_2.0.1 dplyr_1.1.4 +## [29] colorspace_2.1-0 VGAM_1.1-9 vctrs_0.6.5 R6_2.5.1 +## [33] stats4_4.3.2 lifecycle_1.0.4 stringr_1.5.1 fs_1.6.3 +## [37] ragg_1.2.7 pkgconfig_2.0.3 desc_1.4.3 pkgdown_2.0.7 +## [41] bslib_0.6.1 pillar_1.9.0 gtable_0.3.4 glue_1.7.0 +## [45] systemfonts_1.0.5 highr_0.10 xfun_0.41 tibble_3.2.1 +## [49] tidyselect_1.2.0 knitr_1.45 farver_2.1.1 htmltools_0.5.7 +## [53] nlme_3.1-163 rmarkdown_2.25 labeling_0.4.3 compiler_4.3.2
diff --git a/articles/popTime_files/figure-html/unnamed-chunk-10-1.png b/articles/popTime_files/figure-html/unnamed-chunk-10-1.png index 6b56495..253fb4f 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-10-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-10-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-15-1.png b/articles/popTime_files/figure-html/unnamed-chunk-15-1.png index 97b224d..7d6248c 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-15-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-15-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-16-1.png b/articles/popTime_files/figure-html/unnamed-chunk-16-1.png index f0857fe..2b79c56 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-16-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-16-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-17-1.png b/articles/popTime_files/figure-html/unnamed-chunk-17-1.png index c3f9a03..01e7e52 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-17-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-17-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-18-1.png b/articles/popTime_files/figure-html/unnamed-chunk-18-1.png index 0d930a4..8a582f6 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-18-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-18-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-19-1.png b/articles/popTime_files/figure-html/unnamed-chunk-19-1.png index 0f6ff40..9f0bc7a 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-19-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-19-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-20-1.png b/articles/popTime_files/figure-html/unnamed-chunk-20-1.png index cc33339..bf31805 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-20-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-20-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-21-1.png b/articles/popTime_files/figure-html/unnamed-chunk-21-1.png index 4812722..a1814f1 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-21-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-21-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-23-1.png b/articles/popTime_files/figure-html/unnamed-chunk-23-1.png index 0cf0575..4cd43eb 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-23-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-23-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-24-1.png b/articles/popTime_files/figure-html/unnamed-chunk-24-1.png index 6ba649c..83fa1ad 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-24-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-24-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-25-1.png b/articles/popTime_files/figure-html/unnamed-chunk-25-1.png index f3c4c83..07fe259 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-25-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-25-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-26-1.png b/articles/popTime_files/figure-html/unnamed-chunk-26-1.png index 2010b50..4480d9d 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-26-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-26-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-4-1.png b/articles/popTime_files/figure-html/unnamed-chunk-4-1.png index 050e262..f49e447 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-4-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-4-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-8-1.png b/articles/popTime_files/figure-html/unnamed-chunk-8-1.png index 3460358..7a3585d 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-8-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-8-1.png differ diff --git a/articles/popTime_files/figure-html/unnamed-chunk-9-1.png b/articles/popTime_files/figure-html/unnamed-chunk-9-1.png index 3ee1df3..cad6bfb 100644 Binary files a/articles/popTime_files/figure-html/unnamed-chunk-9-1.png and b/articles/popTime_files/figure-html/unnamed-chunk-9-1.png differ diff --git a/articles/smoothHazard.html b/articles/smoothHazard.html index 966f9bd..6c4d537 100644 --- a/articles/smoothHazard.html +++ b/articles/smoothHazard.html @@ -33,7 +33,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -106,7 +106,7 @@

Introduction to casebase sampling

Maxime Turgeon

-

2023-08-03

+

2024-02-01

Source: vignettes/smoothHazard.Rmd @@ -806,9 +806,9 @@

Cumulative Incidence Curves

Session information

-
## R version 4.3.1 (2023-06-16)
+
## R version 4.3.2 (2023-10-31)
 ## Platform: x86_64-pc-linux-gnu (64-bit)
-## Running under: Ubuntu 22.04.2 LTS
+## Running under: Ubuntu 22.04.3 LTS
 ## 
 ## Matrix products: default
 ## BLAS:   /usr/lib/x86_64-linux-gnu/openblas-pthread/libblas.so.3 
@@ -819,25 +819,24 @@ 

Session information## [8] base ## ## other attached packages: -## [1] visreg_2.7.0 eha_2.10.3 survival_3.5-5 -## [4] casebase_0.10.2.9999 +## [1] visreg_2.7.0 eha_2.11.2 survival_3.5-7 casebase_0.10.4 ## ## loaded via a namespace (and not attached): -## [1] sass_0.4.7 utf8_1.2.3 generics_0.1.3 stringi_1.7.12 -## [5] lattice_0.21-8 digest_0.6.33 magrittr_2.0.3 evaluate_0.21 -## [9] grid_4.3.1 fastmap_1.1.1 rprojroot_2.0.3 jsonlite_1.8.7 -## [13] Matrix_1.5-4.1 mgcv_1.8-42 purrr_1.0.1 fansi_1.0.4 -## [17] scales_1.2.1 textshaping_0.3.6 jquerylib_0.1.4 cli_3.6.1 -## [21] rlang_1.1.1 munsell_0.5.0 withr_2.5.0 cachem_1.0.8 -## [25] yaml_2.3.7 tools_4.3.1 memoise_2.0.1 dplyr_1.1.2 -## [29] colorspace_2.1-0 ggplot2_3.4.2 VGAM_1.1-8 vctrs_0.6.3 -## [33] R6_2.5.1 stats4_4.3.1 lifecycle_1.0.3 stringr_1.5.0 -## [37] fs_1.6.3 ragg_1.2.5 pkgconfig_2.0.3 desc_1.4.2 -## [41] pkgdown_2.0.7 bslib_0.5.0 pillar_1.9.0 gtable_0.3.3 -## [45] glue_1.6.2 data.table_1.14.8 systemfonts_1.0.4 highr_0.10 -## [49] tidyselect_1.2.0 xfun_0.39 tibble_3.2.1 knitr_1.43 -## [53] farver_2.1.1 nlme_3.1-162 htmltools_0.5.5 labeling_0.4.2 -## [57] rmarkdown_2.23 compiler_4.3.1

+## [1] sass_0.4.8 utf8_1.2.4 generics_0.1.3 stringi_1.8.3 +## [5] lattice_0.21-9 digest_0.6.34 magrittr_2.0.3 evaluate_0.23 +## [9] grid_4.3.2 fastmap_1.1.1 jsonlite_1.8.8 Matrix_1.6-1.1 +## [13] mgcv_1.9-0 purrr_1.0.2 fansi_1.0.6 scales_1.3.0 +## [17] textshaping_0.3.7 jquerylib_0.1.4 cli_3.6.2 rlang_1.1.3 +## [21] munsell_0.5.0 withr_3.0.0 cachem_1.0.8 yaml_2.3.8 +## [25] tools_4.3.2 memoise_2.0.1 dplyr_1.1.4 colorspace_2.1-0 +## [29] ggplot2_3.4.4 VGAM_1.1-9 vctrs_0.6.5 R6_2.5.1 +## [33] stats4_4.3.2 lifecycle_1.0.4 stringr_1.5.1 fs_1.6.3 +## [37] ragg_1.2.7 pkgconfig_2.0.3 desc_1.4.3 pkgdown_2.0.7 +## [41] bslib_0.6.1 pillar_1.9.0 gtable_0.3.4 data.table_1.15.0 +## [45] glue_1.7.0 systemfonts_1.0.5 highr_0.10 xfun_0.41 +## [49] tibble_3.2.1 tidyselect_1.2.0 knitr_1.45 farver_2.1.1 +## [53] nlme_3.1-163 htmltools_0.5.7 labeling_0.4.3 rmarkdown_2.25 +## [57] compiler_4.3.2

References diff --git a/articles/time-varying-covariates.html b/articles/time-varying-covariates.html index d3213f5..8ca405d 100644 --- a/articles/time-varying-covariates.html +++ b/articles/time-varying-covariates.html @@ -33,7 +33,7 @@ casebase - 0.10.2.9999 + 0.10.4

@@ -106,7 +106,7 @@

Time-Varying Covariates

Maxime Turgeon

-

2023-08-03

+

2024-02-01

Source: vignettes/time-varying-covariates.Rmd diff --git a/authors.html b/authors.html index 3548e99..a3a7617 100644 --- a/authors.html +++ b/authors.html @@ -17,7 +17,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -84,11 +84,11 @@

Authors

diff --git a/index.html b/index.html index 842a872..01310b3 100644 --- a/index.html +++ b/index.html @@ -41,7 +41,7 @@ casebase - 0.10.2.9999 + 0.10.4
@@ -379,7 +379,7 @@

Developers

  • Sahir Bhatnagar
    Author, maintainer
  • -Maxime Turgeon
    Author
  • +Maxime Turgeon
    Author
  • Jesse Islam
    Author
  • diff --git a/news/index.html b/news/index.html index 4615495..83fcc36 100644 --- a/news/index.html +++ b/news/index.html @@ -17,7 +17,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -81,6 +81,10 @@

    Changelog

    Source: NEWS.md +
    + +
    diff --git a/pkgdown.yml b/pkgdown.yml index 081e22c..a8fbc9b 100644 --- a/pkgdown.yml +++ b/pkgdown.yml @@ -9,7 +9,7 @@ articles: popTime: popTime.html smoothHazard: smoothHazard.html time-varying-covariates: time-varying-covariates.html -last_built: 2023-08-03T16:00Z +last_built: 2024-02-01T13:48Z urls: reference: https://sahirbhatnagar.com/casebase/reference article: https://sahirbhatnagar.com/casebase/articles diff --git a/reference/CompRisk-class.html b/reference/CompRisk-class.html index e679e07..8a88704 100644 --- a/reference/CompRisk-class.html +++ b/reference/CompRisk-class.html @@ -17,7 +17,7 @@ casebase - 0.10.2.9999 + 0.10.4
    diff --git a/reference/ERSPC.html b/reference/ERSPC.html index bea80d6..e041cb1 100644 --- a/reference/ERSPC.html +++ b/reference/ERSPC.html @@ -18,7 +18,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/absoluteRisk.html b/reference/absoluteRisk.html index 02d7f41..995374f 100644 --- a/reference/absoluteRisk.html +++ b/reference/absoluteRisk.html @@ -22,7 +22,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -262,8 +262,8 @@

    Details

    See also

    matplot, absoluteRisk, -as.data.table, setattr, -melt.data.table

    +as.data.table, setattr, +melt.data.table

    @@ -281,54 +281,57 @@

    Examples

    # event type 0-censored, 1-event of interest, 2-competing event # t observed time/endpoint # z is a binary covariate -DT <- data.table(z = rbinom(nobs, 1, 0.5)) +DT <- data.table(z = rbinom(nobs, 1, 0.5)) DT[,`:=` ("t_event" = rweibull(nobs, 1, b1), "t_comp" = rweibull(nobs, 1, b2))] -#> z t_event t_comp -#> 1: 1 510.83410 2.3923947 -#> 2: 1 33.98842 23.7578470 -#> 3: 1 997.76445 31.5864062 -#> 4: 1 209.28888 5.7092667 -#> 5: 0 75.35774 81.5124801 -#> --- -#> 996: 1 111.80274 0.1186062 -#> 997: 0 238.05336 60.3685477 -#> 998: 0 142.60033 3.6318489 -#> 999: 0 103.37601 24.5722384 -#> 1000: 0 255.84352 113.5144522 +#> z t_event t_comp +#> <int> <num> <num> +#> 1: 1 510.83410 2.3923947 +#> 2: 1 33.98842 23.7578470 +#> 3: 1 997.76445 31.5864062 +#> 4: 1 209.28888 5.7092667 +#> 5: 0 75.35774 81.5124801 +#> --- +#> 996: 1 111.80274 0.1186062 +#> 997: 0 238.05336 60.3685477 +#> 998: 0 142.60033 3.6318489 +#> 999: 0 103.37601 24.5722384 +#> 1000: 0 255.84352 113.5144522 DT[,`:=`("event" = 1 * (t_event < t_comp) + 2 * (t_event >= t_comp), "time" = pmin(t_event, t_comp))] -#> z t_event t_comp event time -#> 1: 1 510.83410 2.3923947 2 2.3923947 -#> 2: 1 33.98842 23.7578470 2 23.7578470 -#> 3: 1 997.76445 31.5864062 2 31.5864062 -#> 4: 1 209.28888 5.7092667 2 5.7092667 -#> 5: 0 75.35774 81.5124801 1 75.3577374 -#> --- -#> 996: 1 111.80274 0.1186062 2 0.1186062 -#> 997: 0 238.05336 60.3685477 2 60.3685477 -#> 998: 0 142.60033 3.6318489 2 3.6318489 -#> 999: 0 103.37601 24.5722384 2 24.5722384 -#> 1000: 0 255.84352 113.5144522 2 113.5144522 +#> z t_event t_comp event time +#> <int> <num> <num> <num> <num> +#> 1: 1 510.83410 2.3923947 2 2.3923947 +#> 2: 1 33.98842 23.7578470 2 23.7578470 +#> 3: 1 997.76445 31.5864062 2 31.5864062 +#> 4: 1 209.28888 5.7092667 2 5.7092667 +#> 5: 0 75.35774 81.5124801 1 75.3577374 +#> --- +#> 996: 1 111.80274 0.1186062 2 0.1186062 +#> 997: 0 238.05336 60.3685477 2 60.3685477 +#> 998: 0 142.60033 3.6318489 2 3.6318489 +#> 999: 0 103.37601 24.5722384 2 24.5722384 +#> 1000: 0 255.84352 113.5144522 2 113.5144522 DT[time >= tlim, `:=`("event" = 0, "time" = tlim)] -#> z t_event t_comp event time -#> 1: 1 510.83410 2.3923947 2 2.3923947 -#> 2: 1 33.98842 23.7578470 0 20.0000000 -#> 3: 1 997.76445 31.5864062 0 20.0000000 -#> 4: 1 209.28888 5.7092667 2 5.7092667 -#> 5: 0 75.35774 81.5124801 0 20.0000000 -#> --- -#> 996: 1 111.80274 0.1186062 2 0.1186062 -#> 997: 0 238.05336 60.3685477 0 20.0000000 -#> 998: 0 142.60033 3.6318489 2 3.6318489 -#> 999: 0 103.37601 24.5722384 0 20.0000000 -#> 1000: 0 255.84352 113.5144522 0 20.0000000 +#> z t_event t_comp event time +#> <int> <num> <num> <num> <num> +#> 1: 1 510.83410 2.3923947 2 2.3923947 +#> 2: 1 33.98842 23.7578470 0 20.0000000 +#> 3: 1 997.76445 31.5864062 0 20.0000000 +#> 4: 1 209.28888 5.7092667 2 5.7092667 +#> 5: 0 75.35774 81.5124801 0 20.0000000 +#> --- +#> 996: 1 111.80274 0.1186062 2 0.1186062 +#> 997: 0 238.05336 60.3685477 0 20.0000000 +#> 998: 0 142.60033 3.6318489 2 3.6318489 +#> 999: 0 103.37601 24.5722384 0 20.0000000 +#> 1000: 0 255.84352 113.5144522 0 20.0000000 out_linear <- fitSmoothHazard(event ~ time + z, DT, ratio = 10) #> 'time' will be used as the time variable linear_risk <- absoluteRisk(out_linear, time = 10, - newdata = data.table("z" = c(0,1))) + newdata = data.table("z" = c(0,1))) # Plot CI curves---- library(ggplot2) data("brcancer") diff --git a/reference/bmtcrr.html b/reference/bmtcrr.html index 5bf91f3..0a448e1 100644 --- a/reference/bmtcrr.html +++ b/reference/bmtcrr.html @@ -18,7 +18,7 @@ casebase - 0.10.2.9999 + 0.10.4
    diff --git a/reference/brcancer.html b/reference/brcancer.html index 2e14d01..6f52056 100644 --- a/reference/brcancer.html +++ b/reference/brcancer.html @@ -18,7 +18,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/checkArgsEventIndicator.html b/reference/checkArgsEventIndicator.html index 69f1a5b..3e542cb 100644 --- a/reference/checkArgsEventIndicator.html +++ b/reference/checkArgsEventIndicator.html @@ -18,7 +18,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/confint.absRiskCB.html b/reference/confint.absRiskCB.html index c20a183..850cad4 100644 --- a/reference/confint.absRiskCB.html +++ b/reference/confint.absRiskCB.html @@ -20,7 +20,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/eprchd.html b/reference/eprchd.html index 3281624..d2292f2 100644 --- a/reference/eprchd.html +++ b/reference/eprchd.html @@ -18,7 +18,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/fitSmoothHazard.html b/reference/fitSmoothHazard.html index 763ee8d..230de83 100644 --- a/reference/fitSmoothHazard.html +++ b/reference/fitSmoothHazard.html @@ -20,7 +20,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -235,52 +235,55 @@

    Examples

    # event type 0-censored, 1-event of interest, 2-competing event # t observed time/endpoint # z is a binary covariate -DT <- data.table(z = rbinom(nobs, 1, 0.5)) +DT <- data.table(z = rbinom(nobs, 1, 0.5)) DT[, `:=`( "t_event" = rweibull(nobs, 1, b1), "t_comp" = rweibull(nobs, 1, b2) )] -#> z t_event t_comp -#> 1: 0 125.67322 53.090763 -#> 2: 0 27.92365 41.517160 -#> 3: 1 625.41749 23.956800 -#> 4: 0 279.93382 62.361918 -#> 5: 1 315.90292 19.739612 -#> --- -#> 496: 1 111.76799 57.900562 -#> 497: 1 153.70621 63.501104 -#> 498: 0 38.02085 14.325562 -#> 499: 0 109.52164 20.573577 -#> 500: 0 575.37257 8.339102 +#> z t_event t_comp +#> <int> <num> <num> +#> 1: 0 125.67322 53.090763 +#> 2: 0 27.92365 41.517160 +#> 3: 1 625.41749 23.956800 +#> 4: 0 279.93382 62.361918 +#> 5: 1 315.90292 19.739612 +#> --- +#> 496: 1 111.76799 57.900562 +#> 497: 1 153.70621 63.501104 +#> 498: 0 38.02085 14.325562 +#> 499: 0 109.52164 20.573577 +#> 500: 0 575.37257 8.339102 DT[, `:=`( "event" = 1 * (t_event < t_comp) + 2 * (t_event >= t_comp), "time" = pmin(t_event, t_comp) )] -#> z t_event t_comp event time -#> 1: 0 125.67322 53.090763 2 53.090763 -#> 2: 0 27.92365 41.517160 1 27.923655 -#> 3: 1 625.41749 23.956800 2 23.956800 -#> 4: 0 279.93382 62.361918 2 62.361918 -#> 5: 1 315.90292 19.739612 2 19.739612 -#> --- -#> 496: 1 111.76799 57.900562 2 57.900562 -#> 497: 1 153.70621 63.501104 2 63.501104 -#> 498: 0 38.02085 14.325562 2 14.325562 -#> 499: 0 109.52164 20.573577 2 20.573577 -#> 500: 0 575.37257 8.339102 2 8.339102 +#> z t_event t_comp event time +#> <int> <num> <num> <num> <num> +#> 1: 0 125.67322 53.090763 2 53.090763 +#> 2: 0 27.92365 41.517160 1 27.923655 +#> 3: 1 625.41749 23.956800 2 23.956800 +#> 4: 0 279.93382 62.361918 2 62.361918 +#> 5: 1 315.90292 19.739612 2 19.739612 +#> --- +#> 496: 1 111.76799 57.900562 2 57.900562 +#> 497: 1 153.70621 63.501104 2 63.501104 +#> 498: 0 38.02085 14.325562 2 14.325562 +#> 499: 0 109.52164 20.573577 2 20.573577 +#> 500: 0 575.37257 8.339102 2 8.339102 DT[time >= tlim, `:=`("event" = 0, "time" = tlim)] -#> z t_event t_comp event time -#> 1: 0 125.67322 53.090763 0 20.000000 -#> 2: 0 27.92365 41.517160 0 20.000000 -#> 3: 1 625.41749 23.956800 0 20.000000 -#> 4: 0 279.93382 62.361918 0 20.000000 -#> 5: 1 315.90292 19.739612 2 19.739612 -#> --- -#> 496: 1 111.76799 57.900562 0 20.000000 -#> 497: 1 153.70621 63.501104 0 20.000000 -#> 498: 0 38.02085 14.325562 2 14.325562 -#> 499: 0 109.52164 20.573577 0 20.000000 -#> 500: 0 575.37257 8.339102 2 8.339102 +#> z t_event t_comp event time +#> <int> <num> <num> <num> <num> +#> 1: 0 125.67322 53.090763 0 20.000000 +#> 2: 0 27.92365 41.517160 0 20.000000 +#> 3: 1 625.41749 23.956800 0 20.000000 +#> 4: 0 279.93382 62.361918 0 20.000000 +#> 5: 1 315.90292 19.739612 2 19.739612 +#> --- +#> 496: 1 111.76799 57.900562 0 20.000000 +#> 497: 1 153.70621 63.501104 0 20.000000 +#> 498: 0 38.02085 14.325562 2 14.325562 +#> 499: 0 109.52164 20.573577 0 20.000000 +#> 500: 0 575.37257 8.339102 2 8.339102 out_linear <- fitSmoothHazard(event ~ time + z, DT, ratio = 10) #> 'time' will be used as the time variable @@ -290,20 +293,21 @@

    Examples

    # Use GAMs library(mgcv) #> Loading required package: nlme -#> This is mgcv 1.8-42. For overview type 'help("mgcv-package")'. +#> This is mgcv 1.9-0. For overview type 'help("mgcv-package")'. DT[event == 2, event := 1] -#> z t_event t_comp event time -#> 1: 0 125.67322 53.090763 0 20.000000 -#> 2: 0 27.92365 41.517160 0 20.000000 -#> 3: 1 625.41749 23.956800 0 20.000000 -#> 4: 0 279.93382 62.361918 0 20.000000 -#> 5: 1 315.90292 19.739612 1 19.739612 -#> --- -#> 496: 1 111.76799 57.900562 0 20.000000 -#> 497: 1 153.70621 63.501104 0 20.000000 -#> 498: 0 38.02085 14.325562 1 14.325562 -#> 499: 0 109.52164 20.573577 0 20.000000 -#> 500: 0 575.37257 8.339102 1 8.339102 +#> z t_event t_comp event time +#> <int> <num> <num> <num> <num> +#> 1: 0 125.67322 53.090763 0 20.000000 +#> 2: 0 27.92365 41.517160 0 20.000000 +#> 3: 1 625.41749 23.956800 0 20.000000 +#> 4: 0 279.93382 62.361918 0 20.000000 +#> 5: 1 315.90292 19.739612 1 19.739612 +#> --- +#> 496: 1 111.76799 57.900562 0 20.000000 +#> 497: 1 153.70621 63.501104 0 20.000000 +#> 498: 0 38.02085 14.325562 1 14.325562 +#> 499: 0 109.52164 20.573577 0 20.000000 +#> 500: 0 575.37257 8.339102 1 8.339102 out_gam <- fitSmoothHazard(event ~ s(time) + z, DT, ratio = 10, family = "gam") #> 'time' will be used as the time variable diff --git a/reference/hazardPlot.html b/reference/hazardPlot.html index 560dc76..4e12313 100644 --- a/reference/hazardPlot.html +++ b/reference/hazardPlot.html @@ -22,7 +22,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/index.html b/reference/index.html index 3e141d7..dda28a1 100644 --- a/reference/index.html +++ b/reference/index.html @@ -17,7 +17,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/plot.singleEventCB.html b/reference/plot.singleEventCB.html index a907845..4a7abdf 100644 --- a/reference/plot.singleEventCB.html +++ b/reference/plot.singleEventCB.html @@ -20,7 +20,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/popTime.html b/reference/popTime.html index d5ce0b2..bdddbdd 100644 --- a/reference/popTime.html +++ b/reference/popTime.html @@ -19,7 +19,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/sampleCaseBase.html b/reference/sampleCaseBase.html index 9e000af..deb71b1 100644 --- a/reference/sampleCaseBase.html +++ b/reference/sampleCaseBase.html @@ -19,7 +19,7 @@ casebase - 0.10.2.9999 + 0.10.4 @@ -175,52 +175,55 @@

    Examples

    # event type 0-censored, 1-event of interest, 2-competing event # t observed time/endpoint # z is a binary covariate -DT <- data.table(z = rbinom(nobs, 1, 0.5)) +DT <- data.table(z = rbinom(nobs, 1, 0.5)) DT[, `:=`( "t_event" = rweibull(nobs, 1, b1), "t_comp" = rweibull(nobs, 1, b2) )] -#> z t_event t_comp -#> 1: 1 312.74831 127.708526 -#> 2: 1 53.25243 8.497106 -#> 3: 1 34.48639 249.441113 -#> 4: 1 13.62873 52.322220 -#> 5: 0 78.36455 18.839434 -#> --- -#> 496: 0 29.81916 142.094179 -#> 497: 1 157.21649 53.021951 -#> 498: 1 299.22847 36.967088 -#> 499: 1 194.74603 63.880643 -#> 500: 1 402.21055 55.350048 +#> z t_event t_comp +#> <int> <num> <num> +#> 1: 1 312.74831 127.708526 +#> 2: 1 53.25243 8.497106 +#> 3: 1 34.48639 249.441113 +#> 4: 1 13.62873 52.322220 +#> 5: 0 78.36455 18.839434 +#> --- +#> 496: 0 29.81916 142.094179 +#> 497: 1 157.21649 53.021951 +#> 498: 1 299.22847 36.967088 +#> 499: 1 194.74603 63.880643 +#> 500: 1 402.21055 55.350048 DT[, `:=`( "event" = 1 * (t_event < t_comp) + 2 * (t_event >= t_comp), "time" = pmin(t_event, t_comp) )] -#> z t_event t_comp event time -#> 1: 1 312.74831 127.708526 2 127.708526 -#> 2: 1 53.25243 8.497106 2 8.497106 -#> 3: 1 34.48639 249.441113 1 34.486389 -#> 4: 1 13.62873 52.322220 1 13.628727 -#> 5: 0 78.36455 18.839434 2 18.839434 -#> --- -#> 496: 0 29.81916 142.094179 1 29.819162 -#> 497: 1 157.21649 53.021951 2 53.021951 -#> 498: 1 299.22847 36.967088 2 36.967088 -#> 499: 1 194.74603 63.880643 2 63.880643 -#> 500: 1 402.21055 55.350048 2 55.350048 +#> z t_event t_comp event time +#> <int> <num> <num> <num> <num> +#> 1: 1 312.74831 127.708526 2 127.708526 +#> 2: 1 53.25243 8.497106 2 8.497106 +#> 3: 1 34.48639 249.441113 1 34.486389 +#> 4: 1 13.62873 52.322220 1 13.628727 +#> 5: 0 78.36455 18.839434 2 18.839434 +#> --- +#> 496: 0 29.81916 142.094179 1 29.819162 +#> 497: 1 157.21649 53.021951 2 53.021951 +#> 498: 1 299.22847 36.967088 2 36.967088 +#> 499: 1 194.74603 63.880643 2 63.880643 +#> 500: 1 402.21055 55.350048 2 55.350048 DT[time >= tlim, `:=`("event" = 0, "time" = tlim)] -#> z t_event t_comp event time -#> 1: 1 312.74831 127.708526 0 10.000000 -#> 2: 1 53.25243 8.497106 2 8.497106 -#> 3: 1 34.48639 249.441113 0 10.000000 -#> 4: 1 13.62873 52.322220 0 10.000000 -#> 5: 0 78.36455 18.839434 0 10.000000 -#> --- -#> 496: 0 29.81916 142.094179 0 10.000000 -#> 497: 1 157.21649 53.021951 0 10.000000 -#> 498: 1 299.22847 36.967088 0 10.000000 -#> 499: 1 194.74603 63.880643 0 10.000000 -#> 500: 1 402.21055 55.350048 0 10.000000 +#> z t_event t_comp event time +#> <int> <num> <num> <num> <num> +#> 1: 1 312.74831 127.708526 0 10.000000 +#> 2: 1 53.25243 8.497106 2 8.497106 +#> 3: 1 34.48639 249.441113 0 10.000000 +#> 4: 1 13.62873 52.322220 0 10.000000 +#> 5: 0 78.36455 18.839434 0 10.000000 +#> --- +#> 496: 0 29.81916 142.094179 0 10.000000 +#> 497: 1 157.21649 53.021951 0 10.000000 +#> 498: 1 299.22847 36.967088 0 10.000000 +#> 499: 1 194.74603 63.880643 0 10.000000 +#> 500: 1 402.21055 55.350048 0 10.000000 out <- sampleCaseBase(DT, time = "time", event = "event", comprisk = TRUE) diff --git a/reference/simdat.html b/reference/simdat.html index 832dd94..bc5e1ff 100644 --- a/reference/simdat.html +++ b/reference/simdat.html @@ -18,7 +18,7 @@ casebase - 0.10.2.9999 + 0.10.4 diff --git a/reference/support.html b/reference/support.html index 690d877..c288b2e 100644 --- a/reference/support.html +++ b/reference/support.html @@ -22,7 +22,7 @@ casebase - 0.10.2.9999 + 0.10.4