Autoplot for estimatR, inferencR and clustR
Usage
plotR(
list,
y = 100,
col = cancR_palette,
table.col = "#616161",
risk.col = F,
time.unit = "m2y",
labs = levels,
print.est = TRUE,
contrast = "rd",
se = T,
border = T,
p.values = T,
style = NULL,
linewidth = 0.8,
title = "",
title.size = 7,
title.shift = c(0, 0),
x.title = unit,
x.title.size = 6,
x.title.shift = 0,
x.text.size = 6,
y.title = "Risk of Event (%)",
y.title.size = 6,
y.title.shift = 0,
y.text.size = 6,
res.size = 5,
res.shift = c(0, 0),
res.spacing = 1,
res.digits = 1,
border.shift = 0,
contrast.digits = 1,
table = c("event", "risk"),
table.space = 1,
table.padding = 1,
table.title.size = 6,
table.text.size = 5,
table.linewidth = 0.8,
border.linewidth = 0.8,
legend.pos = c(0.5, 0.9),
legend.size = 16,
tscale = 1,
censur = F
)Arguments
- list
an object of class estimatR, inferencR or clustR
- y
Upper limit for y-axis
- col
Vector of colors
- table.col
Grid color
- risk.col
Whether risk table numbers should be colored (T/F)
- time.unit
Specification of the time-unit and optional conversion. Conversions include Months to years ("m2y"), days to years ("d2y") and days to months ("d2m")
- labs
Character vector of similar length to the number of levels in the group with labels. Reference is first.
- print.est
Whether absolute risks at the time horizon should be printet. Defaults to TRUE
- contrast
The type of contrast that should be provided. Includes risk difference ("rd", default), risk ratio ("rr"), hazard ratio ("hr") or "none".
- se
whether the confidence interval should be shown
- border
whether there should be borders around the results
- p.values
whether p-values should be printed in the results, default = T
- style
the formatting style of the contrast. Currently JAMA and italic
- linewidth
thickness of the risk curve lines
- title
Plot title
- title.size
Plot title size
- title.shift
vector of XY shifting of the plot title
- x.title
X-axis title
- x.title.size
X-axis title size
- x.title.shift
X-axis vertical shift
- x.text.size
X-axis text size
- y.title
Y-axis title
- y.title.size
Y-axis title size
- y.title.shift
Y-axis title horizontal shift
- y.text.size
Y-axis text.size
- res.size
Size of the results
- res.shift
Vector of XY shifting of the results
- res.spacing
Vertical spacing between results
- res.digits
Number of digits on the risk estimates
- border.shift
Horizontal shifting of right border
- contrast.digits
Number of digits on the contrasts
- table
Which parts of the risk table should be provided ("event", "risk", "none"). Default is c("event", "risk")
- table.space
Spacing between counts in risk table
- table.padding
Spacing between lines and first/last rows in the risk table
- table.title.size
Risk table titles size
- table.text.size
Risk table text size
- table.linewidth
Risk table linewidth
- border.linewidth
Results box linewidth
- legend.pos
XY vector of legend position in percentage
- tscale
Global size scaler
- censur
Whether values <= 3 should be censored. Default = FALSE
Examples
#Risk in one group
estimatR(analysis_df,
timevar = ttt,
event = event)
#>
#> estimatR initialized: 2026-03-27 23:12:49
#>
#>
#> Total runtime:
#> 0.18 secs
#> $table
#> time n.risk n.event est se.est lower upper cumsum
#> 1 0 2000 0 1.0000000 0.0000000000 1.0000000 1.0000000 0
#> 2 1 2000 0 1.0000000 0.0000000000 1.0000000 1.0000000 0
#> 3 2 1999 1 0.9994997 0.0005001250 0.9985195 1.0000000 1
#> 4 3 1990 1 0.9989975 0.0007085289 0.9976088 1.0000000 2
#> 5 4 1981 1 0.9984932 0.0008693020 0.9967894 1.0000000 3
#> 6 5 1970 1 0.9979863 0.0010058255 0.9960150 0.9999577 4
#> 7 6 1960 0 0.9979863 0.0010058255 0.9960150 0.9999577 4
#> 8 7 1960 0 0.9979863 0.0010058255 0.9960150 0.9999577 4
#> 9 8 1942 3 0.9964447 0.0013414938 0.9938154 0.9990739 7
#> 10 9 1924 3 0.9948910 0.0016116490 0.9917322 0.9980497 10
#> 11 10 1907 2 0.9938475 0.0017708043 0.9903768 0.9973183 12
#> 12 11 1890 6 0.9906925 0.0021839603 0.9864120 0.9949730 18
#> 13 12 1855 0 0.9885562 0.0024264337 0.9838005 0.9933119 18
#> 14 13 1855 4 0.9885562 0.0024264337 0.9838005 0.9933119 22
#> 15 14 1820 4 0.9863836 0.0026531564 0.9811835 0.9915836 26
#> 16 15 1798 6 0.9830920 0.0029651451 0.9772804 0.9889035 32
#> 17 16 1775 1 0.9825381 0.0030147577 0.9766293 0.9884469 33
#> 18 17 1758 1 0.9819792 0.0030644108 0.9759731 0.9879853 34
#> 19 18 1738 0 0.9780242 0.0033971663 0.9713658 0.9846825 34
#> 20 19 1738 7 0.9780242 0.0033971663 0.9713658 0.9846825 41
#> 21 20 1705 10 0.9722880 0.0038310410 0.9647793 0.9797967 51
#> 22 21 1682 5 0.9693977 0.0040318129 0.9614955 0.9772999 56
#> 23 22 1665 4 0.9670688 0.0041869048 0.9588626 0.9752750 60
#> 24 23 1638 9 0.9617552 0.0045230446 0.9528902 0.9706202 69
#> 25 24 1608 0 0.9557742 0.0048743552 0.9462206 0.9653277 69
#> 26 25 1608 10 0.9557742 0.0048743552 0.9462206 0.9653277 79
#> 27 26 1587 7 0.9515584 0.0051066583 0.9415495 0.9615673 86
#> 28 27 1563 6 0.9479056 0.0053003240 0.9375171 0.9582940 92
#> 29 28 1547 8 0.9430037 0.0055490248 0.9321278 0.9538796 100
#> 30 29 1525 12 0.9355833 0.0059043511 0.9240110 0.9471556 112
#> 31 30 1490 0 0.9299322 0.0061618565 0.9178551 0.9420092 112
#> 32 31 1490 9 0.9299322 0.0061618565 0.9178551 0.9420092 121
#> 33 32 1466 12 0.9223202 0.0064914136 0.9095972 0.9350431 133
#> 34 33 1443 10 0.9159285 0.0067537757 0.9026913 0.9291656 143
#> 35 34 1415 8 0.9107501 0.0069593242 0.8971101 0.9243901 151
#> 36 35 1394 9 0.9048701 0.0071850998 0.8907875 0.9189526 160
#> 37 36 1363 0 0.8995590 0.0073842145 0.8850862 0.9140318 160
#> 38 37 1363 8 0.8995590 0.0073842145 0.8850862 0.9140318 168
#> 39 38 1337 9 0.8935036 0.0076053763 0.8785974 0.9084099 177
#> 40 39 1311 8 0.8880513 0.0077994432 0.8727647 0.9033379 185
#> 41 40 1285 5 0.8845958 0.0079207056 0.8690715 0.9001201 190
#> 42 41 1262 4 0.8817920 0.0080187023 0.8660757 0.8975084 194
#> 43 42 1244 0 0.8761214 0.0082139503 0.8600223 0.8922204 194
#> 44 43 1244 8 0.8761214 0.0082139503 0.8600223 0.8922204 202
#> 45 44 1215 14 0.8660261 0.0085509508 0.8492666 0.8827857 216
#> 46 45 1188 10 0.8587363 0.0087842100 0.8415196 0.8759531 226
#> 47 46 1166 10 0.8513715 0.0090123249 0.8337077 0.8690354 236
#> 48 47 1147 8 0.8454335 0.0091907454 0.8274199 0.8634470 244
#> 49 48 1126 0 0.8409285 0.0093239707 0.8226538 0.8592031 244
#> 50 49 1126 6 0.8409285 0.0093239707 0.8226538 0.8592031 250
#> 51 50 1105 8 0.8348403 0.0095016768 0.8162174 0.8534633 258
#> 52 51 1087 8 0.8286961 0.0096768793 0.8097298 0.8476625 266
#> 53 52 1073 9 0.8217453 0.0098691912 0.8024020 0.8410886 275
#> 54 53 1051 7 0.8162722 0.0100179117 0.7966375 0.8359069 282
#> 55 54 1030 0 0.8075547 0.0102499371 0.7874652 0.8276442 282
#> 56 55 1030 11 0.8075547 0.0102499371 0.7874652 0.8276442 293
#> 57 56 1010 9 0.8003587 0.0104354951 0.7799055 0.8208119 302
#> 58 57 989 8 0.7938846 0.0105991392 0.7731107 0.8146585 310
#> 59 58 972 8 0.7873506 0.0107607103 0.7662600 0.8084412 318
#> 60 59 946 11 0.7781953 0.0109839399 0.7566672 0.7997235 329
#> 61 60 925 0 0.7697824 0.0111827396 0.7478647 0.7917002 329
#> 62 61 925 10 0.7697824 0.0111827396 0.7478647 0.7917002 339
#> 63 62 909 5 0.7655482 0.0112804137 0.7434390 0.7876574 344
#> 64 63 892 16 0.7518164 0.0115886796 0.7291030 0.7745298 360
#> 65 64 870 12 0.7414465 0.0118091442 0.7183010 0.7645920 372
#> 66 65 850 10 0.7327236 0.0119880464 0.7092275 0.7562197 382
#> 67 66 832 0 0.7230362 0.0121801884 0.6991634 0.7469089 382
#> 68 67 832 11 0.7230362 0.0121801884 0.6991634 0.7469089 393
#> 69 68 814 8 0.7159302 0.0123168622 0.6917895 0.7400708 401
#> 70 69 795 7 0.7096264 0.0124367261 0.6852508 0.7340019 408
#> 71 70 782 11 0.6996444 0.0126207007 0.6749083 0.7243805 419
#> 72 71 769 6 0.6941855 0.0127174690 0.6692598 0.7191113 425
#> 73 72 753 0 0.6858885 0.0128626798 0.6606781 0.7110989 425
#> 74 73 753 9 0.6858885 0.0128626798 0.6606781 0.7110989 434
#> 75 74 731 14 0.6727525 0.0130866823 0.6471030 0.6984019 448
#> 76 75 712 8 0.6651935 0.0132097084 0.6393029 0.6910840 456
#> 77 76 701 6 0.6594999 0.0132995692 0.6334333 0.6855666 462
#> 78 77 688 3 0.6566242 0.0133448095 0.6304689 0.6827796 465
#> 79 78 679 0 0.6469537 0.0134941150 0.6205058 0.6734017 465
#> 80 79 679 10 0.6469537 0.0134941150 0.6205058 0.6734017 475
#> 81 80 663 12 0.6352442 0.0136666974 0.6084579 0.6620304 487
#> 82 81 643 7 0.6283286 0.0137656024 0.6013485 0.6553087 494
#> 83 82 633 7 0.6213803 0.0138616306 0.5942120 0.6485486 501
#> 84 83 619 5 0.6163610 0.0139302208 0.5890583 0.6436638 506
#> 85 84 608 0 0.6112923 0.0139988839 0.5838550 0.6387296 506
#> 86 85 608 5 0.6112923 0.0139988839 0.5838550 0.6387296 511
#> 87 86 599 7 0.6041486 0.0140932724 0.5765263 0.6317709 518
#> 88 87 589 9 0.5949172 0.0142098918 0.5670663 0.6227680 527
#> 89 88 574 6 0.5886985 0.0142863442 0.5606978 0.6166992 533
#> 90 89 566 8 0.5803777 0.0143841232 0.5521853 0.6085700 541
#> 91 90 555 0 0.5720119 0.0144776880 0.5436361 0.6003876 541
#> 92 91 555 8 0.5720119 0.0144776880 0.5436361 0.6003876 549
#> 93 92 543 9 0.5625310 0.0145785708 0.5339575 0.5911045 558
#> 94 93 532 4 0.5583015 0.0146215386 0.5296438 0.5869592 562
#> 95 94 523 7 0.5508290 0.0146960858 0.5220252 0.5796328 569
#> 96 95 512 7 0.5432981 0.0147682417 0.5143529 0.5722433 576
#> 97 96 501 0 0.5335383 0.0148569545 0.5044192 0.5626574 576
#> 98 97 501 9 0.5335383 0.0148569545 0.5044192 0.5626574 585
#> 99 98 487 6 0.5269649 0.0149143050 0.4977334 0.5561964 591
#> 100 99 477 7 0.5192317 0.0149791111 0.4898731 0.5485902 598
#> 101 100 467 10 0.5081132 0.0150653503 0.4785857 0.5376408 608
#> 102 101 453 10 0.4968966 0.0151445833 0.4672137 0.5265794 618
#> 103 102 438 0 0.4912243 0.0151826683 0.4614668 0.5209817 618
#> 104 103 438 5 0.4912243 0.0151826683 0.4614668 0.5209817 623
#> 105 104 428 6 0.4843379 0.0152278855 0.4544918 0.5141840 629
#> 106 105 420 4 0.4797252 0.0152565164 0.4498230 0.5096274 633
#> 107 106 412 5 0.4739033 0.0152919156 0.4439317 0.5038749 638
#> 108 107 403 6 0.4668476 0.0153331315 0.4367953 0.4969000 644
#> 109 108 395 0 0.4573925 0.0153826772 0.4272430 0.4875420 644
#> 110 109 395 8 0.4573925 0.0153826772 0.4272430 0.4875420 652
#> 111 110 386 7 0.4490978 0.0154198845 0.4188754 0.4793202 659
#> 112 111 375 7 0.4407147 0.0154541597 0.4104251 0.4710043 666
#> 113 112 366 7 0.4322857 0.0154834856 0.4019386 0.4626328 673
#> 114 113 357 6 0.4250204 0.0155047478 0.3946316 0.4554091 679
#> 115 114 346 0 0.4176501 0.0155250946 0.3872215 0.4480787 679
#> 116 115 346 6 0.4176501 0.0155250946 0.3872215 0.4480787 685
#> 117 116 339 5 0.4114901 0.0155386058 0.3810350 0.4419452 690
#> 118 117 334 4 0.4065620 0.0155466509 0.3760912 0.4370329 694
#> 119 118 325 9 0.3953034 0.0155625005 0.3648015 0.4258053 703
#> 120 119 312 7 0.3864344 0.0155701846 0.3559174 0.4169514 710
#> 121 120 300 0 0.3825701 0.0155735102 0.3520465 0.4130936 710
#>
#> $risks
#> time est se lower upper
#> 1 0 0.0000 0.0000 0.0000 0.0000
#> 2 12 0.0114 0.0024 0.0067 0.0162
#> 3 24 0.0442 0.0049 0.0347 0.0538
#> 4 36 0.1004 0.0074 0.0860 0.1149
#> 5 48 0.1591 0.0093 0.1408 0.1773
#> 6 60 0.2302 0.0112 0.2083 0.2521
#> 7 72 0.3141 0.0129 0.2889 0.3393
#> 8 84 0.3887 0.0140 0.3613 0.4161
#> 9 96 0.4665 0.0149 0.4373 0.4956
#> 10 108 0.5426 0.0154 0.5125 0.5728
#> 11 120 0.6174 0.0156 0.5869 0.6480
#>
#> $plot_data
#> time est se lower upper
#> 1 0.0 0.0000000000 0.0000000000 0.000000e+00 0.000000000
#> 2 1.2 0.0005002501 0.0005001250 0.000000e+00 0.001480477
#> 3 2.4 0.0010025113 0.0007085289 0.000000e+00 0.002391202
#> 4 3.6 0.0015068008 0.0008693020 0.000000e+00 0.003210601
#> 5 4.8 0.0020136501 0.0010058255 4.226844e-05 0.003985032
#> 6 7.2 0.0035553386 0.0013414938 9.260592e-04 0.006184618
#> 7 8.4 0.0051090465 0.0016116490 1.950273e-03 0.008267821
#> 8 9.6 0.0061524560 0.0017708043 2.681743e-03 0.009623169
#> 9 10.8 0.0093075276 0.0021839603 5.027044e-03 0.013588011
#> 10 12.0 0.0114437917 0.0024264337 6.688069e-03 0.016199514
#> 11 13.2 0.0136164427 0.0026531564 8.416352e-03 0.018816534
#> 12 14.4 0.0169080452 0.0029651451 1.109647e-02 0.022719623
#> 13 15.6 0.0174618998 0.0030147577 1.155308e-02 0.023370716
#> 14 16.8 0.0180207952 0.0030644108 1.201466e-02 0.024026930
#> 15 18.0 0.0219758323 0.0033971663 1.531751e-02 0.028634156
#> 16 19.2 0.0277120444 0.0038310410 2.020334e-02 0.035220747
#> 17 20.4 0.0306023178 0.0040318129 2.270011e-02 0.038504526
#> 18 21.6 0.0329312011 0.0041869048 2.472502e-02 0.041137384
#> 19 22.8 0.0382447659 0.0045230446 2.937976e-02 0.047109771
#> 20 24.0 0.0442258308 0.0048743552 3.467227e-02 0.053779391
#> 21 25.2 0.0484415959 0.0051066583 3.843273e-02 0.058450462
#> 22 26.4 0.0520944113 0.0053003240 4.170597e-02 0.062482855
#> 23 27.6 0.0569963148 0.0055490248 4.612043e-02 0.067872204
#> 24 28.8 0.0644166716 0.0059043511 5.284436e-02 0.075988987
#> 25 30.0 0.0700678461 0.0061618565 5.799083e-02 0.082144863
#> 26 31.2 0.0776798419 0.0064914136 6.495691e-02 0.090402779
#> 27 32.4 0.0840715270 0.0067537757 7.083437e-02 0.097308684
#> 28 33.6 0.0892499212 0.0069593242 7.560990e-02 0.102889946
#> 29 34.8 0.0951299432 0.0071850998 8.104741e-02 0.109212480
#> 30 36.0 0.1004409927 0.0073842145 8.596820e-02 0.114913787
#> 31 37.2 0.1064963637 0.0076053763 9.159010e-02 0.121402627
#> 32 38.4 0.1119487124 0.0077994432 9.666208e-02 0.127235340
#> 33 39.6 0.1154041649 0.0079207056 9.987987e-02 0.130928463
#> 34 40.8 0.1182079552 0.0080187023 1.024916e-01 0.133924323
#> 35 42.0 0.1238786435 0.0082139503 1.077796e-01 0.139977690
#> 36 43.2 0.1339738691 0.0085509508 1.172143e-01 0.150733425
#> 37 44.4 0.1412636513 0.0087842100 1.240469e-01 0.158480387
#> 38 45.6 0.1486284570 0.0090123249 1.309646e-01 0.166292289
#> 39 46.8 0.1545665323 0.0091907454 1.365530e-01 0.172580062
#> 40 48.0 0.1590715064 0.0093239707 1.407969e-01 0.177346153
#> 41 49.2 0.1651596765 0.0095016768 1.465367e-01 0.183782621
#> 42 50.4 0.1713038555 0.0096768793 1.523375e-01 0.190270190
#> 43 51.6 0.1782547085 0.0098691912 1.589114e-01 0.197597968
#> 44 52.8 0.1837277980 0.0100179117 1.640931e-01 0.203362544
#> 45 54.0 0.1924452681 0.0102499371 1.723558e-01 0.212534776
#> 46 55.2 0.1996413004 0.0104354951 1.791881e-01 0.220094495
#> 47 56.4 0.2061153849 0.0105991392 1.853415e-01 0.226889316
#> 48 57.6 0.2126494147 0.0107607103 1.915588e-01 0.233740019
#> 49 58.8 0.2218046540 0.0109839399 2.002765e-01 0.243332781
#> 50 60.0 0.2302175767 0.0111827396 2.082998e-01 0.252135344
#> 51 61.2 0.2344518034 0.0112804137 2.123426e-01 0.256561008
#> 52 62.4 0.2481836097 0.0115886796 2.254702e-01 0.270897004
#> 53 63.6 0.2585534909 0.0118091442 2.354080e-01 0.281698988
#> 54 64.8 0.2672763910 0.0119880464 2.437803e-01 0.290772530
#> 55 66.0 0.2769638426 0.0121801884 2.530911e-01 0.300836573
#> 56 67.2 0.2840698490 0.0123168622 2.599292e-01 0.308210455
#> 57 68.4 0.2903736365 0.0124367261 2.659981e-01 0.314749172
#> 58 69.6 0.3003555930 0.0126207007 2.756195e-01 0.325091712
#> 59 70.8 0.3058144571 0.0127174690 2.808887e-01 0.330740238
#> 60 72.0 0.3141114954 0.0128626798 2.889011e-01 0.339321885
#> 61 73.2 0.3272475270 0.0130866823 3.015981e-01 0.352896953
#> 62 74.4 0.3348065435 0.0132097084 3.089160e-01 0.360697096
#> 63 75.6 0.3405000681 0.0132995692 3.144334e-01 0.366566745
#> 64 76.8 0.3433757946 0.0133448095 3.172204e-01 0.369531141
#> 65 78.0 0.3530462542 0.0134941150 3.265983e-01 0.379494234
#> 66 79.2 0.3647558242 0.0136666974 3.379696e-01 0.391542059
#> 67 80.4 0.3716713907 0.0137656024 3.446913e-01 0.398651476
#> 68 81.6 0.3786197323 0.0138616306 3.514514e-01 0.405788029
#> 69 82.8 0.3836389590 0.0139302208 3.563362e-01 0.410941690
#> 70 84.0 0.3887077176 0.0139988839 3.612704e-01 0.416145026
#> 71 85.2 0.3958513670 0.0140932724 3.682291e-01 0.423473673
#> 72 86.4 0.4050828401 0.0142098918 3.772320e-01 0.432933716
#> 73 87.6 0.4113014864 0.0142863442 3.833008e-01 0.439302207
#> 74 88.8 0.4196223135 0.0143841232 3.914300e-01 0.447814677
#> 75 90.0 0.4279881180 0.0144776880 3.996124e-01 0.456363865
#> 76 91.2 0.4374689779 0.0145785708 4.088955e-01 0.466042452
#> 77 92.4 0.4416985344 0.0146215386 4.130408e-01 0.470356224
#> 78 93.6 0.4491710206 0.0146960858 4.203672e-01 0.477974819
#> 79 94.8 0.4567018855 0.0147682417 4.277567e-01 0.485647107
#> 80 96.0 0.4664617319 0.0148569545 4.373426e-01 0.495580828
#> 81 97.2 0.4730350987 0.0149143050 4.438036e-01 0.502266599
#> 82 98.4 0.4807683362 0.0149791111 4.514098e-01 0.510126854
#> 83 99.6 0.4918867873 0.0150653503 4.623592e-01 0.521414331
#> 84 100.8 0.5031034145 0.0151445833 4.734206e-01 0.532786252
#> 85 102.0 0.5087757499 0.0151826683 4.790183e-01 0.538533233
#> 86 103.2 0.5156620712 0.0152278855 4.858160e-01 0.545508178
#> 87 104.4 0.5202748134 0.0152565164 4.903726e-01 0.550177036
#> 88 105.6 0.5260967210 0.0152919156 4.961251e-01 0.556068325
#> 89 106.8 0.5331523529 0.0153331315 5.031000e-01 0.563204738
#> 90 108.0 0.5426074951 0.0153826772 5.124580e-01 0.572756988
#> 91 109.2 0.5509021779 0.0154198845 5.206798e-01 0.581124596
#> 92 110.4 0.5592853372 0.0154541597 5.289957e-01 0.589574934
#> 93 111.6 0.5677143062 0.0154834856 5.373672e-01 0.598061380
#> 94 112.8 0.5749796119 0.0155047478 5.445909e-01 0.605368359
#> 95 114.0 0.5823499077 0.0155250946 5.519213e-01 0.612778534
#> 96 115.2 0.5885099386 0.0155386058 5.580548e-01 0.618965046
#> 97 116.4 0.5934379632 0.0155466509 5.629671e-01 0.623908839
#> 98 117.6 0.6046966043 0.0155625005 5.741947e-01 0.635198545
#> 99 118.8 0.6135655907 0.0155701846 5.830486e-01 0.644082592
#> 100 120.0 0.6174299348 0.0155735102 5.869064e-01 0.647953454
#> 101 120.6 0.6174299348 0.0155735102 5.869064e-01 0.647953454
#>
#> $time_to_event
#> quantile lower upper
#> 1 78 73.2 81.6
#>
#> $counts
#> # A tibble: 1 × 2
#> n.events total
#> <int> <int>
#> 1 936 2000
#>
#> $info
#> $info$method
#> [1] "aalen"
#>
#> $info$timevar
#> [1] "ttt"
#>
#> $info$event
#> [1] "event"
#>
#> $info$group
#> [1] "grp"
#>
#> $info$group_levels
#> [1] " "
#>
#> $info$surv
#> [1] TRUE
#>
#> $info$survscale
#> [1] "AM"
#>
#> $info$time
#> [1] 120
#>
#> $info$breaks
#> [1] 12
#>
#> $info$event.digits
#> [1] 2
#>
#> $info$alpha
#> [1] 0.05
#>
#> $info$multi
#> [1] FALSE
#>
#> $info$cause
#> [1] 1
#>
#>
#> attr(,"class")
#> [1] "estimatR"
#Risks in multiple groups
estimatR(analysis_df,
timevar = ttt,
event = event,
group = X2)
#>
#> estimatR initialized: 2026-03-27 23:12:49
#>
#> Error in select(., { { group }}): Can't select columns that don't exist.
#> ✖ Column `X2` doesn't exist.
