In: Math
ID |
Therapy |
Years |
Event |
1 |
TREAT |
1.6 |
1 |
2 |
TREAT |
2.7 |
1 |
3 |
TREAT |
4.9 |
1 |
4 |
TREAT |
5.3 |
0 |
5 |
TREAT |
6.2 |
1 |
6 |
TREAT |
6.7 |
0 |
7 |
TREAT |
7.1 |
1 |
8 |
TREAT |
7.9 |
1 |
9 |
SOC |
0.6 |
1 |
10 |
SOC |
1.4 |
1 |
11 |
SOC |
1.6 |
1 |
12 |
SOC |
3.5 |
1 |
13 |
SOC |
4.8 |
1 |
14 |
SOC |
5.7 |
1 |
15 |
SOC |
6.3 |
1 |
16 |
SOC |
7.3 |
0 |
First we have to split the data with two datasets. One is for TREAT and another is for SOC.
ID | Therapy | Years | Event(d) | At risk(n) | k_M estimates(st) | S.E | CI_upper | CI_lower |
1 | TREAT | 1.6 | 1 | 8 | 0.875 | 0.709955 | 0.960816 | 0.640137 |
2 | TREAT | 2.7 | 1 | 7 | 0.75 | 0.608533 | 0.848444 | 0.604375 |
3 | TREAT | 4.9 | 1 | 6 | 0.625 | 0.507111 | 0.716311 | 0.515768 |
4 | TREAT | 5.3 | 0 | 5 | 0.75 | 0.608533 | 0.848444 | 0.604375 |
5 | TREAT | 6.2 | 1 | 4 | 0.5625 | 0.4564 | 0.64734 | 0.467094 |
6 | TREAT | 6.7 | 0 | 3 | 0.5625 | 0.4564 | 0.64734 | 0.467094 |
7 | TREAT | 7.1 | 1 | 2 | 0.28125 | 0.2282 | 0.327176 | 0.236871 |
8 | TREAT | 7.9 | 1 | 1 | 0 | 0 | ||
ID | Therapy | Years | Event | At risk | k_M estimates | S.E | CI_upper | CI_lower |
1 | SOC | 0.6 | 1 | 8 | 0.875 | 1.042631 | 0.977541 | 0.456126 |
2 | SOC | 1.4 | 1 | 7 | 0.857143 | 1.021353 | 0.967313 | 0.489177 |
3 | SOC | 1.6 | 1 | 6 | 0.833333 | 0.992982 | 0.951399 | 0.513145 |
4 | SOC | 3.5 | 1 | 5 | 0.8 | 0.953262 | 0.925602 | 0.525154 |
5 | SOC | 4.8 | 1 | 4 | 0.75 | 0.893684 | 0.881238 | 0.519644 |
6 | SOC | 5.7 | 1 | 3 | 0.666667 | 0.794385 | 0.797511 | 0.483547 |
7 | SOC | 6.3 | 1 | 2 | 0.5 | 0.595789 | 0.610943 | 0.377177 |
8 | SOC | 7.3 | 0 | 1 | 0.5 | 0.595789 | 0.610943 | 0.377177 |
Kaplan-Meier survival estimates(Group TREAT):
We get the estimates as
k_M estimates(st) |
0.875 |
0.75 |
0.625 |
0.75 |
0.5625 |
0.5625 |
0.28125 |
0 |
We get
S.E |
0.709955 |
0.608533 |
0.507111 |
0.608533 |
0.4564 |
0.4564 |
0.2282 |
0 |
Same for Kaplan-Meier survival estimates(Group SOC):
The results are:
ID | Therapy | Years | Event | At risk | k_M estimates | S.E | CI_upper | CI_lower |
1 | SOC | 0.6 | 1 | 8 | 0.875 | 1.042631 | 0.977541 | 0.456126 |
2 | SOC | 1.4 | 1 | 7 | 0.857143 | 1.021353 | 0.967313 | 0.489177 |
3 | SOC | 1.6 | 1 | 6 | 0.833333 | 0.992982 | 0.951399 | 0.513145 |
4 | SOC | 3.5 | 1 | 5 | 0.8 | 0.953262 | 0.925602 | 0.525154 |
5 | SOC | 4.8 | 1 | 4 | 0.75 | 0.893684 | 0.881238 | 0.519644 |
6 | SOC | 5.7 | 1 | 3 | 0.666667 | 0.794385 | 0.797511 | 0.483547 |
7 | SOC | 6.3 | 1 | 2 | 0.5 | 0.595789 | 0.610943 | 0.377177 |
8 | SOC | 7.3 | 0 | 1 | 0.5 | 0.595789 | 0.610943 | 0.377177 |