Regresi Survival Untuk Analisis Ketahanan Hidup Pasien Penyakit Sirosis

Anggota Kelompok 1:

1. Saeful Fikri - 5003211049

2. Hanif Choiruddin - 5003211063

3. I Wayan Rama - 5003211112

Load Data

library(dplyr)
## Warning: package 'dplyr' was built under R version 4.2.3
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
library(ggplot2)
## Warning: package 'ggplot2' was built under R version 4.2.3
library(gridExtra)
## Warning: package 'gridExtra' was built under R version 4.2.2
## 
## Attaching package: 'gridExtra'
## The following object is masked from 'package:dplyr':
## 
##     combine
library(writexl)
## Warning: package 'writexl' was built under R version 4.2.3
library(survival)
## Warning: package 'survival' was built under R version 4.2.3
library(readxl)
setwd("C:/KULIAH/Semester 7/Ansur E/FP ANSUR")
data = read.csv("cirrhosis.csv")
head(data)
##   ID N_Days Status            Drug   Age Sex Ascites Hepatomegaly Spiders Edema
## 1  1    400      D D-penicillamine 21464   F       Y            Y       Y     Y
## 2  2   4500      C D-penicillamine 20617   F       N            Y       Y     N
## 3  3   1012      D D-penicillamine 25594   M       N            N       N     S
## 4  4   1925      D D-penicillamine 19994   F       N            Y       Y     S
## 5  5   1504     CL         Placebo 13918   F       N            Y       Y     N
## 6  6   2503      D         Placebo 24201   F       N            Y       N     N
##   Bilirubin Cholesterol Albumin Copper Alk_Phos   SGOT Tryglicerides Platelets
## 1      14.5         261    2.60    156   1718.0 137.95           172       190
## 2       1.1         302    4.14     54   7394.8 113.52            88       221
## 3       1.4         176    3.48    210    516.0  96.10            55       151
## 4       1.8         244    2.54     64   6121.8  60.63            92       183
## 5       3.4         279    3.53    143    671.0 113.15            72       136
## 6       0.8         248    3.98     50    944.0  93.00            63        NA
##   Prothrombin Stage
## 1        12.2     4
## 2        10.6     3
## 3        12.0     4
## 4        10.3     4
## 5        10.9     3
## 6        11.0     3

Preprocessing dan Eksplorasi Data

str(data)
## 'data.frame':    418 obs. of  20 variables:
##  $ ID           : int  1 2 3 4 5 6 7 8 9 10 ...
##  $ N_Days       : int  400 4500 1012 1925 1504 2503 1832 2466 2400 51 ...
##  $ Status       : chr  "D" "C" "D" "D" ...
##  $ Drug         : chr  "D-penicillamine" "D-penicillamine" "D-penicillamine" "D-penicillamine" ...
##  $ Age          : int  21464 20617 25594 19994 13918 24201 20284 19379 15526 25772 ...
##  $ Sex          : chr  "F" "F" "M" "F" ...
##  $ Ascites      : chr  "Y" "N" "N" "N" ...
##  $ Hepatomegaly : chr  "Y" "Y" "N" "Y" ...
##  $ Spiders      : chr  "Y" "Y" "N" "Y" ...
##  $ Edema        : chr  "Y" "N" "S" "S" ...
##  $ Bilirubin    : num  14.5 1.1 1.4 1.8 3.4 0.8 1 0.3 3.2 12.6 ...
##  $ Cholesterol  : int  261 302 176 244 279 248 322 280 562 200 ...
##  $ Albumin      : num  2.6 4.14 3.48 2.54 3.53 3.98 4.09 4 3.08 2.74 ...
##  $ Copper       : int  156 54 210 64 143 50 52 52 79 140 ...
##  $ Alk_Phos     : num  1718 7395 516 6122 671 ...
##  $ SGOT         : num  137.9 113.5 96.1 60.6 113.2 ...
##  $ Tryglicerides: int  172 88 55 92 72 63 213 189 88 143 ...
##  $ Platelets    : int  190 221 151 183 136 NA 204 373 251 302 ...
##  $ Prothrombin  : num  12.2 10.6 12 10.3 10.9 11 9.7 11 11 11.5 ...
##  $ Stage        : int  4 3 4 4 3 3 3 3 2 4 ...
# Jumlah data NA
sum(is.na(data))
## [1] 1033
colSums(is.na(data))
##            ID        N_Days        Status          Drug           Age 
##             0             0             0           106             0 
##           Sex       Ascites  Hepatomegaly       Spiders         Edema 
##             0           106           106           106             0 
##     Bilirubin   Cholesterol       Albumin        Copper      Alk_Phos 
##             0           134             0           108           106 
##          SGOT Tryglicerides     Platelets   Prothrombin         Stage 
##           106           136            11             2             6
# Jumlah data Duplikat
duplicates <- duplicated(data)
sum(duplicates)
## [1] 0
# Ganti tipe data Stage (int --> factor)
data$Stage <- as.factor(data$Stage)

# Ganti semua variabel bertipe data chr menjadi factor
data <- data %>%
  mutate(across(where(is.character), as.factor))

# Hapus baris data yang NA di variabel Drug
data <- na.omit(data, col = "Drug")

str(data)
## 'data.frame':    276 obs. of  20 variables:
##  $ ID           : int  1 2 3 4 5 7 8 9 10 11 ...
##  $ N_Days       : int  400 4500 1012 1925 1504 1832 2466 2400 51 3762 ...
##  $ Status       : Factor w/ 3 levels "C","CL","D": 3 1 3 3 2 1 3 3 3 3 ...
##  $ Drug         : Factor w/ 2 levels "D-penicillamine",..: 1 1 1 1 2 2 2 1 2 2 ...
##  $ Age          : int  21464 20617 25594 19994 13918 20284 19379 15526 25772 19619 ...
##  $ Sex          : Factor w/ 2 levels "F","M": 1 1 2 1 1 1 1 1 1 1 ...
##  $ Ascites      : Factor w/ 2 levels "N","Y": 2 1 1 1 1 1 1 1 2 1 ...
##  $ Hepatomegaly : Factor w/ 2 levels "N","Y": 2 2 1 2 2 2 1 1 1 2 ...
##  $ Spiders      : Factor w/ 2 levels "N","Y": 2 2 1 2 2 1 1 2 2 2 ...
##  $ Edema        : Factor w/ 3 levels "N","S","Y": 3 1 2 2 1 1 1 1 3 1 ...
##  $ Bilirubin    : num  14.5 1.1 1.4 1.8 3.4 1 0.3 3.2 12.6 1.4 ...
##  $ Cholesterol  : int  261 302 176 244 279 322 280 562 200 259 ...
##  $ Albumin      : num  2.6 4.14 3.48 2.54 3.53 4.09 4 3.08 2.74 4.16 ...
##  $ Copper       : int  156 54 210 64 143 52 52 79 140 46 ...
##  $ Alk_Phos     : num  1718 7395 516 6122 671 ...
##  $ SGOT         : num  137.9 113.5 96.1 60.6 113.2 ...
##  $ Tryglicerides: int  172 88 55 92 72 213 189 88 143 79 ...
##  $ Platelets    : int  190 221 151 183 136 204 373 251 302 258 ...
##  $ Prothrombin  : num  12.2 10.6 12 10.3 10.9 9.7 11 11 11.5 12 ...
##  $ Stage        : Factor w/ 4 levels "1","2","3","4": 4 3 4 4 3 3 3 2 4 4 ...
##  - attr(*, "na.action")= 'omit' Named int [1:142] 6 14 40 41 42 45 49 53 58 70 ...
##   ..- attr(*, "names")= chr [1:142] "6" "14" "40" "41" ...
#Kategorisasi Variabel Numerik 
data$Bilirubin_cat = cut(data$Bilirubin, 
                       breaks = c(0, 1.2, Inf), # Kategori: 0-1.2, >1.2
                       labels = c("Normal", "Increased"), 
                       right = FALSE)
data$Cholesterol_cat = cut(data$Cholesterol, 
                         breaks = c(0, 200, 239, Inf), # Kategori: <200, 200-239, >239
                         labels = c("Normal", "Borderline", "High"), 
                         right = FALSE)
data$Platelets_cat = cut(data$Platelets, 
                       breaks = c(0, 150, 450, Inf), # Kategori: <150, 150-450, >450
                       labels = c("Low", "Normal", "High"), 
                       right = FALSE)
data$Prothrombin_cat = cut(data$Prothrombin, 
                         breaks = c(0, 12, Inf), # Kategori: 0-12, >12
                         labels = c("Normal", "Prolonged"), 
                         right = FALSE)
data$Alk_Phos_cat = cut(data$Alk_Phos, 
                      breaks = c(0, 1300, Inf), # Kategori: 0-1300, >1300
                      labels = c("Normal", "High"), 
                      right = FALSE)
data$SGOT_cat = cut(data$SGOT, 
                  breaks = c(0, 48, Inf), # Kategori: 0-48, >48
                  labels = c("Normal", "High"), 
                  right = FALSE)
data$Age_years = data$Age / 365.25
data$Age_cat = cut(data$Age_years, 
                 breaks = c(-Inf, 40, 60, Inf), # Kategori: <40, 40-60, >60
                 labels = c("Young", "Middle-aged", "Old"),
                 include.lowest = TRUE)

str(data)
## 'data.frame':    276 obs. of  28 variables:
##  $ ID             : int  1 2 3 4 5 7 8 9 10 11 ...
##  $ N_Days         : int  400 4500 1012 1925 1504 1832 2466 2400 51 3762 ...
##  $ Status         : Factor w/ 3 levels "C","CL","D": 3 1 3 3 2 1 3 3 3 3 ...
##  $ Drug           : Factor w/ 2 levels "D-penicillamine",..: 1 1 1 1 2 2 2 1 2 2 ...
##  $ Age            : int  21464 20617 25594 19994 13918 20284 19379 15526 25772 19619 ...
##  $ Sex            : Factor w/ 2 levels "F","M": 1 1 2 1 1 1 1 1 1 1 ...
##  $ Ascites        : Factor w/ 2 levels "N","Y": 2 1 1 1 1 1 1 1 2 1 ...
##  $ Hepatomegaly   : Factor w/ 2 levels "N","Y": 2 2 1 2 2 2 1 1 1 2 ...
##  $ Spiders        : Factor w/ 2 levels "N","Y": 2 2 1 2 2 1 1 2 2 2 ...
##  $ Edema          : Factor w/ 3 levels "N","S","Y": 3 1 2 2 1 1 1 1 3 1 ...
##  $ Bilirubin      : num  14.5 1.1 1.4 1.8 3.4 1 0.3 3.2 12.6 1.4 ...
##  $ Cholesterol    : int  261 302 176 244 279 322 280 562 200 259 ...
##  $ Albumin        : num  2.6 4.14 3.48 2.54 3.53 4.09 4 3.08 2.74 4.16 ...
##  $ Copper         : int  156 54 210 64 143 52 52 79 140 46 ...
##  $ Alk_Phos       : num  1718 7395 516 6122 671 ...
##  $ SGOT           : num  137.9 113.5 96.1 60.6 113.2 ...
##  $ Tryglicerides  : int  172 88 55 92 72 213 189 88 143 79 ...
##  $ Platelets      : int  190 221 151 183 136 204 373 251 302 258 ...
##  $ Prothrombin    : num  12.2 10.6 12 10.3 10.9 9.7 11 11 11.5 12 ...
##  $ Stage          : Factor w/ 4 levels "1","2","3","4": 4 3 4 4 3 3 3 2 4 4 ...
##  $ Bilirubin_cat  : Factor w/ 2 levels "Normal","Increased": 2 1 2 2 2 1 1 2 2 2 ...
##  $ Cholesterol_cat: Factor w/ 3 levels "Normal","Borderline",..: 3 3 1 3 3 3 3 3 2 3 ...
##  $ Platelets_cat  : Factor w/ 3 levels "Low","Normal",..: 2 2 2 2 1 2 2 2 2 2 ...
##  $ Prothrombin_cat: Factor w/ 2 levels "Normal","Prolonged": 2 1 2 1 1 1 1 1 1 2 ...
##  $ Alk_Phos_cat   : Factor w/ 2 levels "Normal","High": 2 2 1 2 1 1 2 2 1 1 ...
##  $ SGOT_cat       : Factor w/ 2 levels "Normal","High": 2 2 2 2 2 2 1 2 2 2 ...
##  $ Age_years      : num  58.8 56.4 70.1 54.7 38.1 ...
##  $ Age_cat        : Factor w/ 3 levels "Young","Middle-aged",..: 2 2 3 2 1 2 2 2 3 2 ...
##  - attr(*, "na.action")= 'omit' Named int [1:142] 6 14 40 41 42 45 49 53 58 70 ...
##   ..- attr(*, "names")= chr [1:142] "6" "14" "40" "41" ...
# Boxplot
boxplot(data$N_Days, main = "Boxplot of N_Days")

# Seleksi variabel terpilih
selected_vars = c("ID", "N_Days", "Status", "Drug", "Sex", "Ascites", "Spiders", "Edema", 
                  "Stage", "Bilirubin_cat", "Cholesterol_cat", "Platelets_cat", 
                  "Prothrombin_cat", "Alk_Phos_cat", "SGOT_cat")
df <- data[, selected_vars]
head(df)
##   ID N_Days Status            Drug Sex Ascites Spiders Edema Stage
## 1  1    400      D D-penicillamine   F       Y       Y     Y     4
## 2  2   4500      C D-penicillamine   F       N       Y     N     3
## 3  3   1012      D D-penicillamine   M       N       N     S     4
## 4  4   1925      D D-penicillamine   F       N       Y     S     4
## 5  5   1504     CL         Placebo   F       N       Y     N     3
## 7  7   1832      C         Placebo   F       N       N     N     3
##   Bilirubin_cat Cholesterol_cat Platelets_cat Prothrombin_cat Alk_Phos_cat
## 1     Increased            High        Normal       Prolonged         High
## 2        Normal            High        Normal          Normal         High
## 3     Increased          Normal        Normal       Prolonged       Normal
## 4     Increased            High        Normal          Normal         High
## 5     Increased            High           Low          Normal       Normal
## 7        Normal            High        Normal          Normal       Normal
##   SGOT_cat
## 1     High
## 2     High
## 3     High
## 4     High
## 5     High
## 7     High
# Statistika deskriptif
summary(df$N_Days)
##    Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
##      41    1186    1788    1979    2690    4556
# Filter kolom bertipe data kategorik
cat_col <- df[sapply(df, is.factor)]

# Buat pie chart tiap variabel kategorik
plot_list <- lapply(colnames(cat_col), function(col) {
  counts <- table(cat_col[[col]])
  df <- data.frame(Category = names(counts), Freq = as.numeric(counts))
  df$Percentage <- round(df$Freq / sum(df$Freq) * 100, 1)
  df$Label <- ifelse(df$Percentage == max(df$Percentage), paste(df$Percentage, "%"), "")
  ggplot(df, aes(x = "", y = Freq, fill = Category)) +
    geom_bar(stat = "identity", width = 1) +
    coord_polar(theta = "y") +
    theme_void() +
    ggtitle(col) +
    theme(plot.title = element_text(hjust = 0.5, size = 14, face = "bold")) + 
    theme(legend.title = element_blank(), legend.position = "top") +
    geom_text(aes(label = Label), color = "white", size = 5, 
              fontface = "bold", position = position_stack(vjust = 0.5))
})

# Menampilkan semua pie chart dalam satu grid
grid.arrange(grobs = plot_list, ncol = 5)

# Simpan data dalam bentuk xlsx
write_xlsx(df, "datafix.xlsx")
data_fp = read_excel("data_fp.xlsx")
head(data_fp)
## # A tibble: 6 × 20
##      ID N_Days Status Drug          Age Sex   Ascites Hepatomegaly Spiders Edema
##   <dbl>  <dbl> <chr>  <chr>       <dbl> <chr> <chr>   <chr>        <chr>   <chr>
## 1     1    400 D      D-penicill… 21464 F     Y       Y            Y       Y    
## 2     2   4500 C      D-penicill… 20617 F     N       Y            Y       N    
## 3     3   1012 D      D-penicill… 25594 M     N       N            N       S    
## 4     4   1925 D      D-penicill… 19994 F     N       Y            Y       S    
## 5     5   1504 C      Placebo     13918 F     N       Y            Y       N    
## 6     7   1832 C      Placebo     20284 F     N       Y            N       N    
## # ℹ 10 more variables: Bilirubin <dbl>, Cholesterol <dbl>, Albumin <dbl>,
## #   Copper <dbl>, Alk_Phos <dbl>, SGOT <dbl>, Tryglicerides <dbl>,
## #   Platelets <dbl>, Prothrombin <dbl>, Stage <chr>
#pilih variabel
select_var = c('N_Days','Status','Drug','Age', 'Sex', 'Ascites', 'Spiders', 'Bilirubin', 'Cholesterol', 'Alk_Phos', 'SGOT', 'Platelets', 'Prothrombin', 'Stage')

df = data_fp[select_var]

#kategori -> faktor
df$Drug = as.factor(df$Drug)
df$Sex = as.factor(df$Sex)
df$Ascites = as.factor(df$Ascites)
df$Spiders = as.factor(df$Spiders)
df$Stage = as.factor(df$Stage)
df$Status = as.factor(df$Status)

#ubah satuan age menjadi tahun
df$Age_years = df$Age / 365.25

#numerik -> kategorik
numerical_vars = c("Bilirubin", "Cholesterol", "Alk_Phos", "SGOT", "Platelets", "Prothrombin")

df$Bilirubin_cat = cut(df$Bilirubin, 
                        breaks = c(0, 1.2, Inf), 
                        labels = c("Normal", "Increased"), 
                        right = FALSE)

df$Cholesterol_cat = cut(df$Cholesterol, 
                          breaks = c(0, 200, 239, Inf), 
                          labels = c("Normal", "Borderline", "High"), 
                          right = FALSE)

df$Platelets_cat = cut(df$Platelets, 
                        breaks = c(0, 150, 450, Inf), 
                        labels = c("Low", "Normal", "High"), 
                        right = FALSE)


df$Prothrombin_cat = cut(df$Prothrombin, 
                          breaks = c(0, 12, Inf), 
                          labels = c("Normal", "Prolonged"), 
                          right = FALSE)


df$Alk_Phos_cat = cut(df$Alk_Phos, 
                       breaks = c(0, 1300, Inf), 
                       labels = c("Normal", "High"), 
                       right = FALSE)


df$SGOT_cat = cut(df$SGOT, 
                   breaks = c(0, 48, Inf), 
                   labels = c("Normal", "High"), 
                   right = FALSE)


df$Age_cat = cut(
  df$Age_years, 
  breaks = c(-Inf, 40, 60, Inf), # Kategori: <40, 40-60, >60
  labels = c("Young", "Middle-aged", "Old"),
  include.lowest = TRUE
)

str(df)
## tibble [276 × 22] (S3: tbl_df/tbl/data.frame)
##  $ N_Days         : num [1:276] 400 4500 1012 1925 1504 ...
##  $ Status         : Factor w/ 2 levels "C","D": 2 1 2 2 1 1 2 2 2 2 ...
##  $ Drug           : Factor w/ 2 levels "D-penicillamine",..: 1 1 1 1 2 2 2 1 2 2 ...
##  $ Age            : num [1:276] 21464 20617 25594 19994 13918 ...
##  $ Sex            : Factor w/ 2 levels "F","M": 1 1 2 1 1 1 1 1 1 1 ...
##  $ Ascites        : Factor w/ 2 levels "N","Y": 2 1 1 1 1 1 1 1 2 1 ...
##  $ Spiders        : Factor w/ 2 levels "N","Y": 2 2 1 2 2 1 1 2 2 2 ...
##  $ Bilirubin      : num [1:276] 14.5 1.1 1.4 1.8 3.4 1 0.3 3.2 12.6 1.4 ...
##  $ Cholesterol    : num [1:276] 261 302 176 244 279 322 280 562 200 259 ...
##  $ Alk_Phos       : num [1:276] 1718 7395 516 6122 671 ...
##  $ SGOT           : num [1:276] 137.9 113.5 96.1 60.6 113.2 ...
##  $ Platelets      : num [1:276] 190 221 151 183 136 204 373 251 302 258 ...
##  $ Prothrombin    : num [1:276] 12.2 10.6 12 10.3 10.9 9.7 11 11 11.5 12 ...
##  $ Stage          : Factor w/ 4 levels "1","2","3","4": 4 3 4 4 3 3 3 2 4 4 ...
##  $ Age_years      : num [1:276] 58.8 56.4 70.1 54.7 38.1 ...
##  $ Bilirubin_cat  : Factor w/ 2 levels "Normal","Increased": 2 1 2 2 2 1 1 2 2 2 ...
##  $ Cholesterol_cat: Factor w/ 3 levels "Normal","Borderline",..: 3 3 1 3 3 3 3 3 2 3 ...
##  $ Platelets_cat  : Factor w/ 3 levels "Low","Normal",..: 2 2 2 2 1 2 2 2 2 2 ...
##  $ Prothrombin_cat: Factor w/ 2 levels "Normal","Prolonged": 2 1 2 1 1 1 1 1 1 2 ...
##  $ Alk_Phos_cat   : Factor w/ 2 levels "Normal","High": 2 2 1 2 1 1 2 2 1 1 ...
##  $ SGOT_cat       : Factor w/ 2 levels "Normal","High": 2 2 2 2 2 2 1 2 2 2 ...
##  $ Age_cat        : Factor w/ 3 levels "Young","Middle-aged",..: 2 2 3 2 1 2 2 2 3 2 ...

K-M Curve

# Variabel outcome (waktu survival)
y = Surv(time = df$N_Days, event = df$Status == "D")
y
##   [1]  400  4500+ 1012  1925  1504+ 1832+ 2466  2400    51  3762   304  3577+
##  [13] 3584  3672+  769   131  4232+ 1356  3445+  673   264  4079  4127+ 1444 
##  [25]   77   549  4509+  321  3839  4523+ 3170  3933+ 2847  3611+  223  3244 
##  [37] 2297  4556+ 3428  2256  2576+ 4427+ 2598  3853  2386  1434  1360  1847 
##  [49] 3282  2224  4365+ 4256+ 3090   859  1487  3992+ 4191  2769  4039+ 1170 
##  [61] 4196+ 4184+ 4190+ 1827  1191    71   326  1690  3707+  890  2540  3574 
##  [73] 4050+ 4032+ 3358  1657   198  2452+ 1741  2689   460   388  3913+  750 
##  [85]  611  3823+ 3820+  552  3581+ 3099+  110  3086  3092+ 3388+ 2583  2504+
##  [97] 2105  2350+ 3445   980  3395  3422+ 3336+ 1083  2288   515  2033+  191 
## [109] 3297+ 3069+ 2468+ 3255+ 1413   850  2944+ 2796  3149+ 3150+ 3098+ 2990+
## [121] 1297  2106+ 3059+ 3050+ 2419   786   943  2976+ 2995+ 1427   762  2870+
## [133] 1152  2863+  140  2666+  853  2835+ 2475+ 1536  2772+ 2797+  186  2055 
## [145] 1077  2721+ 1682  1212  2692+ 2301+ 2657+ 2624+ 2609+ 2573+ 2563+ 2556+
## [157] 2241+  974  2527+ 1576   733  2332+ 2456+  216  2443+  797  2449+ 2330+
## [169] 2363+ 2365+ 2357+ 1592+ 2318+ 2294+ 2272+ 2221+ 2090  2255+  904  2216+
## [181] 2224+ 2176+ 2178+ 1786  1080   790  2157+ 1235  2050+  597   334  1945+
## [193] 2022+ 1978+  999  1967+  348  1979+ 1165  1951+ 1932+ 1776+ 1882+ 1908+
## [205] 1882+  694  1831+  837+ 1810+  930  1690  1790+ 1435+  732+ 1785+ 1783+
## [217] 1769+ 1457+ 1770+ 1765+  737+ 1735+ 1701+ 1614+ 1702+ 1615+ 1656+ 1666+
## [229] 1301+ 1542+ 1084+ 1614+  179  1191  1363+ 1568+ 1569+ 1525+ 1558+ 1349+
## [241] 1481+ 1434+ 1420+ 1433+ 1412+   41  1455+ 1030+ 1418+ 1401+ 1408+ 1234+
## [253] 1067+  799  1363+  901+ 1329+ 1320+ 1302+  877+ 1321+  533+ 1300+ 1293+
## [265] 1295+ 1271+ 1250+ 1230+ 1216+ 1216+ 1149+ 1153+  994+  939+  839+  788+
# PLOT K-M CURVE
variables = c("Drug", "Sex", "Ascites", "Spiders", 
               "Bilirubin_cat", "Cholesterol_cat", "Alk_Phos_cat", 
               "SGOT_cat", "Platelets_cat", "Prothrombin_cat", "Age_cat")


for (var in variables) {
  df_clean = df[!is.na(df[[var]]), ]
  fit = survfit(y ~ df_clean[[var]], data = df_clean)
  plot(fit, 
       main = paste("KM Curve by", var),   
       xlab = "Time (Days)",               
       ylab = "Survival Probability",      
       col = 1:length(unique(df_clean[[var]])),  
       lty = 1,  
       conf.int = FALSE)                   
  
  legend("topright", cex=0.6,
         legend = levels(df_clean[[var]]),  
         col = 1:length(unique(df_clean[[var]])),  
         lty = 1,  
         title = var)  
}

LOG-RANK

# LOG-RANK
variables = c("Drug", "Sex", "Ascites", "Spiders", 
               "Bilirubin_cat", "Cholesterol_cat", "Alk_Phos_cat", 
               "SGOT_cat", "Platelets_cat", "Prothrombin_cat", "Age_cat")

for (var in variables) {
  df_clean = df[!is.na(df[[var]]), ]
  log_rank_test = survdiff(y ~ df_clean[[var]], data = df_clean)
  cat("\nLog-Rank Test for", var, ":\n")
  print(log_rank_test)
  cat("\n-----------------------------------------------\n")
}
## 
## Log-Rank Test for Drug :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                                   N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=D-penicillamine 136       57     53.7     0.209     0.405
## df_clean[[var]]=Placebo         140       54     57.3     0.195     0.405
## 
##  Chisq= 0.4  on 1 degrees of freedom, p= 0.5 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Sex :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                     N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=F 242       90     97.3     0.546      4.47
## df_clean[[var]]=M  34       21     13.7     3.878      4.47
## 
##  Chisq= 4.5  on 1 degrees of freedom, p= 0.03 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Ascites :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                     N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=N 257       93   108.69      2.26       110
## df_clean[[var]]=Y  19       18     2.31    106.56       110
## 
##  Chisq= 110  on 1 degrees of freedom, p= <2e-16 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Spiders :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                     N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=N 196       65     87.3      5.69      27.2
## df_clean[[var]]=Y  80       46     23.7     20.96      27.2
## 
##  Chisq= 27.2  on 1 degrees of freedom, p= 2e-07 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Bilirubin_cat :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                             N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=Normal    115       19     58.2      26.4      56.4
## df_clean[[var]]=Increased 161       92     52.8      29.0      56.4
## 
##  Chisq= 56.4  on 1 degrees of freedom, p= 6e-14 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Cholesterol_cat :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                              N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=Normal      20       11     6.18  3.761079   3.99579
## df_clean[[var]]=Borderline  36       10    14.72  1.512593   1.74892
## df_clean[[var]]=High       220       90    90.10  0.000117   0.00062
## 
##  Chisq= 5.3  on 2 degrees of freedom, p= 0.07 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Alk_Phos_cat :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                          N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=Normal 140       40     55.4      4.28      8.64
## df_clean[[var]]=High   136       71     55.6      4.26      8.64
## 
##  Chisq= 8.6  on 1 degrees of freedom, p= 0.003 
## 
## -----------------------------------------------
## 
## Log-Rank Test for SGOT_cat :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                          N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=Normal   6        3     2.42   0.13794     0.142
## df_clean[[var]]=High   270      108   108.58   0.00308     0.142
## 
##  Chisq= 0.1  on 1 degrees of freedom, p= 0.7 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Platelets_cat :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                          N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=Low     32       20    10.08    9.7661   10.7681
## df_clean[[var]]=Normal 236       88    97.37    0.9026    7.3666
## df_clean[[var]]=High     8        3     3.55    0.0841    0.0875
## 
##  Chisq= 10.8  on 2 degrees of freedom, p= 0.005 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Prothrombin_cat :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                             N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=Normal    245       85   102.32      2.93      37.7
## df_clean[[var]]=Prolonged  31       26     8.68     34.58      37.7
## 
##  Chisq= 37.7  on 1 degrees of freedom, p= 8e-10 
## 
## -----------------------------------------------
## 
## Log-Rank Test for Age_cat :
## Call:
## survdiff(formula = y ~ df_clean[[var]], data = df_clean)
## 
##                               N Observed Expected (O-E)^2/E (O-E)^2/V
## df_clean[[var]]=Young        53       12     20.0     3.220      3.96
## df_clean[[var]]=Middle-aged 174       69     75.5     0.556      1.76
## df_clean[[var]]=Old          49       30     15.5    13.588     15.89
## 
##  Chisq= 17.4  on 2 degrees of freedom, p= 2e-04 
## 
## -----------------------------------------------

COX PH Model

cox_model = coxph(y ~ Drug + Age + Sex + Ascites + Spiders + Bilirubin + Cholesterol + Alk_Phos + SGOT + Platelets + Prothrombin + Stage, data = df)
summary(cox_model)
## Call:
## coxph(formula = y ~ Drug + Age + Sex + Ascites + Spiders + Bilirubin + 
##     Cholesterol + Alk_Phos + SGOT + Platelets + Prothrombin + 
##     Stage, data = df)
## 
##   n= 276, number of events= 111 
## 
##                   coef  exp(coef)   se(coef)      z Pr(>|z|)    
## DrugPlacebo -1.501e-01  8.606e-01  2.039e-01 -0.736  0.46166    
## Age          8.581e-05  1.000e+00  3.014e-05  2.847  0.00442 ** 
## SexM         2.285e-01  1.257e+00  2.802e-01  0.816  0.41472    
## AscitesY     6.452e-01  1.906e+00  3.412e-01  1.891  0.05866 .  
## SpidersY     2.479e-01  1.281e+00  2.315e-01  1.071  0.28432    
## Bilirubin    9.643e-02  1.101e+00  2.112e-02  4.565 4.99e-06 ***
## Cholesterol  1.869e-04  1.000e+00  4.534e-04  0.412  0.68024    
## Alk_Phos     5.694e-05  1.000e+00  3.839e-05  1.483  0.13807    
## SGOT         5.362e-03  1.005e+00  1.901e-03  2.821  0.00479 ** 
## Platelets   -3.987e-04  9.996e-01  1.125e-03 -0.354  0.72297    
## Prothrombin  2.780e-01  1.321e+00  1.126e-01  2.469  0.01354 *  
## Stage2       1.424e+00  4.152e+00  1.094e+00  1.301  0.19329    
## Stage3       1.809e+00  6.103e+00  1.060e+00  1.706  0.08802 .  
## Stage4       2.342e+00  1.040e+01  1.051e+00  2.228  0.02587 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## DrugPlacebo    0.8606    1.16198    0.5770     1.283
## Age            1.0001    0.99991    1.0000     1.000
## SexM           1.2567    0.79571    0.7257     2.176
## AscitesY       1.9064    0.52456    0.9767     3.721
## SpidersY       1.2813    0.78045    0.8139     2.017
## Bilirubin      1.1012    0.90808    1.0566     1.148
## Cholesterol    1.0002    0.99981    0.9993     1.001
## Alk_Phos       1.0001    0.99994    1.0000     1.000
## SGOT           1.0054    0.99465    1.0016     1.009
## Platelets      0.9996    1.00040    0.9974     1.002
## Prothrombin    1.3205    0.75728    1.0590     1.647
## Stage2         4.1520    0.24085    0.4862    35.459
## Stage3         6.1029    0.16386    0.7639    48.759
## Stage4        10.4033    0.09612    1.3256    81.645
## 
## Concordance= 0.839  (se = 0.018 )
## Likelihood ratio test= 148  on 14 df,   p=<2e-16
## Wald test            = 161.4  on 14 df,   p=<2e-16
## Score (logrank) test = 256.8  on 14 df,   p=<2e-16
cox_num = coxph(y ~ Age + Bilirubin + Cholesterol + Alk_Phos + SGOT + Platelets + Prothrombin, data = df)
summary(cox_num)
## Call:
## coxph(formula = y ~ Age + Bilirubin + Cholesterol + Alk_Phos + 
##     SGOT + Platelets + Prothrombin, data = df)
## 
##   n= 276, number of events= 111 
## 
##                   coef  exp(coef)   se(coef)      z Pr(>|z|)    
## Age          1.276e-04  1.000e+00  2.887e-05  4.422 9.80e-06 ***
## Bilirubin    1.137e-01  1.120e+00  1.654e-02  6.874 6.23e-12 ***
## Cholesterol  2.169e-04  1.000e+00  4.299e-04  0.504 0.613958    
## Alk_Phos     4.558e-05  1.000e+00  3.646e-05  1.250 0.211275    
## SGOT         4.360e-03  1.004e+00  1.792e-03  2.433 0.014995 *  
## Platelets   -1.717e-03  9.983e-01  1.099e-03 -1.563 0.118052    
## Prothrombin  2.694e-01  1.309e+00  7.311e-02  3.685 0.000229 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## Age            1.0001     0.9999    1.0001     1.000
## Bilirubin      1.1204     0.8925    1.0847     1.157
## Cholesterol    1.0002     0.9998    0.9994     1.001
## Alk_Phos       1.0000     1.0000    1.0000     1.000
## SGOT           1.0044     0.9956    1.0008     1.008
## Platelets      0.9983     1.0017    0.9961     1.000
## Prothrombin    1.3092     0.7638    1.1344     1.511
## 
## Concordance= 0.808  (se = 0.021 )
## Likelihood ratio test= 115.2  on 7 df,   p=<2e-16
## Wald test            = 138.1  on 7 df,   p=<2e-16
## Score (logrank) test = 201.1  on 7 df,   p=<2e-16
cox_cat = coxph(y ~ Drug + Sex + Ascites + Spiders + Stage, data = df)
summary(cox_cat)
## Call:
## coxph(formula = y ~ Drug + Sex + Ascites + Spiders + Stage, data = df)
## 
##   n= 276, number of events= 111 
## 
##                 coef exp(coef) se(coef)      z Pr(>|z|)    
## DrugPlacebo -0.07599   0.92682  0.19651 -0.387  0.69897    
## SexM         0.47497   1.60797  0.24699  1.923  0.05448 .  
## AscitesY     1.63670   5.13819  0.30080  5.441 5.29e-08 ***
## SpidersY     0.59587   1.81462  0.20965  2.842  0.00448 ** 
## Stage2       1.35801   3.88846  1.03650  1.310  0.19013    
## Stage3       1.87686   6.53298  1.01567  1.848  0.06461 .  
## Stage4       2.33090  10.28723  1.02160  2.282  0.02251 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## DrugPlacebo    0.9268    1.07896    0.6306     1.362
## SexM           1.6080    0.62190    0.9909     2.609
## AscitesY       5.1382    0.19462    2.8495     9.265
## SpidersY       1.8146    0.55108    1.2032     2.737
## Stage2         3.8885    0.25717    0.5099    29.652
## Stage3         6.5330    0.15307    0.8924    47.824
## Stage4        10.2872    0.09721    1.3890    76.188
## 
## Concordance= 0.758  (se = 0.025 )
## Likelihood ratio test= 81.93  on 7 df,   p=6e-15
## Wald test            = 100.5  on 7 df,   p=<2e-16
## Score (logrank) test = 145.4  on 7 df,   p=<2e-16

Cek Asumsi PH

Transformasi Log-log (Log-log Plot)

#fugnsi transformasi minus log-log
minusloglog = function(surv) {
  -log(-log(surv))
}


results_list = list()

variables = c("Drug", "Sex", "Ascites", "Spiders", 
               "Bilirubin_cat", "Cholesterol_cat", "Alk_Phos_cat", 
               "SGOT_cat", "Platelets_cat", "Prothrombin_cat", "Age_cat")

# Log-log Survival Plots dan Transformasi
for (var in variables) {
  df_clean = df[!is.na(df[[var]]), ] 
  fit = survfit(y ~ df_clean[[var]], data = df_clean)   
  
  plot(fit, 
       fun = minusloglog,              
       main = paste("Log-Log Survival Plot by", var),  
       xlab = "Time (Days)",              
       ylab = "-log-log S",               
       col = 1:length(unique(df_clean[[var]])),  
       lty = 1,  
       conf.int = FALSE)                  
  legend("topright", 
         legend = levels(df_clean[[var]]), 
         col = 1:length(unique(df_clean[[var]])),  
         lty = 1,  
         title = var)
  
  # Summary 
  summary_km = summary(fit)
  time = summary_km$time
  surv = summary_km$surv
  loglog_surv = minusloglog(surv)  
  n_risk = summary_km$n.risk      
  n_censor = summary_km$n.censor    
  n_event = summary_km$n.event     
  
  # Simpan hasil transformasi ke dalam list
  results_list[[var]] = data.frame(
    Time = time,
    N_at_risk = n_risk,
    Censored = n_censor,
    Observed = n_event,
    Survival = surv,
    MinusLogLog_S = loglog_surv
  )
}

variables = c("Drug", "Sex", "Ascites", "Spiders", 
               "Bilirubin_cat", "Cholesterol_cat", "Alk_Phos_cat", 
               "SGOT_cat", "Platelets_cat", "Prothrombin_cat", "Age_cat")

# Print hasil transformasi untuk setiap variabel
for (var in variables) {
  cat("\nHasil transformasi minus log-log untuk variabel:", var, "\n")
  print(results_list[[var]])
}
## 
## Hasil transformasi minus log-log untuk variabel: Drug 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1     41       136        0        1 0.9926471    4.90896710
## 2     71       135        0        1 0.9852941    4.21210931
## 3    131       134        0        1 0.9779412    3.80291045
## 4    140       133        0        1 0.9705882    3.51147118
## 5    179       132        0        1 0.9632353    3.28454665
## 6    198       131        0        1 0.9558824    3.09842002
## 7    223       130        0        1 0.9485294    2.94043984
## 8    334       129        0        1 0.9411765    2.80305417
## 9    348       128        0        1 0.9338235    2.68139173
## 10   388       127        0        1 0.9264706    2.57212633
## 11   400       126        0        1 0.9191176    2.47288541
## 12   515       125        0        1 0.9117647    2.38191709
## 13   673       123        1        1 0.9043520    2.29723313
## 14   694       122        0        1 0.8969393    2.21854611
## 15   750       119        2        1 0.8894020    2.14382222
## 16   762       118        0        1 0.8818647    2.07372441
## 17   799       117        0        1 0.8743273    2.00767596
## 18   904       113        3        1 0.8665899    1.94358719
## 19   980       111        1        1 0.8587828    1.88230221
## 20   999       110        0        1 0.8509757    1.82404489
## 21  1012       109        0        1 0.8431686    1.76850191
## 22  1077       108        0        1 0.8353615    1.71540558
## 23  1083       107        0        1 0.8275544    1.66452531
## 24  1152       106        0        1 0.8197472    1.61566108
## 25  1170       104        1        1 0.8118651    1.56819453
## 26  1191       103        0        2 0.7961007    1.47827978
## 27  1235        99        2        1 0.7880593    1.43472026
## 28  1297        96        2        1 0.7798503    1.39169579
## 29  1360        93        2        1 0.7714648    1.34913654
## 30  1434        88        4        1 0.7626982    1.30603175
## 31  1576        82        5        1 0.7533970    1.26173262
## 32  1657        78        3        1 0.7437380    1.21717155
## 33  1682        77        0        1 0.7340791    1.17396596
## 34  1690        76        0        2 0.7147612    1.09121952
## 35  1741        72        2        1 0.7048340    1.05041383
## 36  1827        67        4        1 0.6943141    1.00832148
## 37  1925        63        3        1 0.6832932    0.96539909
## 38  2055        57        5        1 0.6713056    0.91997059
## 39  2105        56        0        1 0.6593180    0.87575054
## 40  2224        54        1        1 0.6471084    0.83185446
## 41  2256        52        1        1 0.6346640    0.78820653
## 42  2288        50        1        1 0.6219708    0.74473064
## 43  2297        49        0        1 0.6092775    0.70222530
## 44  2386        43        5        1 0.5951082    0.65582832
## 45  2400        42        0        1 0.5809390    0.61044427
## 46  2540        37        4        1 0.5652379    0.56122721
## 47  2583        35        1        1 0.5490883    0.51166591
## 48  2598        34        0        1 0.5329386    0.46306932
## 49  2689        32        1        1 0.5162843    0.41385364
## 50  3086        22        9        1 0.4928168    0.34585128
## 51  3282        18        3        1 0.4654381    0.26817213
## 52  3574        15        2        1 0.4344089    0.18179889
## 53  3584        14        0        1 0.4033797    0.09664640
## 54  4079         6        7        1 0.3361498   -0.08635982
## 55  4191         5        0        1 0.2689198   -0.27257510
## 56    51       140        0        1 0.9928571    4.93806032
## 57    77       139        0        1 0.9857143    4.24130950
## 58   110       138        0        1 0.9785714    3.83221894
## 59   186       137        0        1 0.9714286    3.54088930
## 60   191       136        0        1 0.9642857    3.31407580
## 61   216       135        0        1 0.9571429    3.12806159
## 62   264       134        0        1 0.9500000    2.97019525
## 63   304       133        0        1 0.9428571    2.83292489
## 64   321       132        0        1 0.9357143    2.71137925
## 65   326       131        0        1 0.9285714    2.60223217
## 66   460       130        0        1 0.9214286    2.50311113
## 67   549       129        0        1 0.9142857    2.41226427
## 68   552       128        0        1 0.9071429    2.32836110
## 69   597       127        0        1 0.9000000    2.25036733
## 70   611       126        0        1 0.8928571    2.17746296
## 71   733       125        0        1 0.8857143    2.10898688
## 72   769       124        0        1 0.8785714    2.04439826
## 73   786       123        0        1 0.8714286    1.98324900
## 74   790       121        1        1 0.8642267    1.92469551
## 75   797       120        0        1 0.8570248    1.86893150
## 76   850       118        1        1 0.8497619    1.81523823
## 77   853       117        0        1 0.8424989    1.76385526
## 78   859       116        0        1 0.8352360    1.71457108
## 79   890       115        0        1 0.8279731    1.66720153
## 80   930       114        0        1 0.8207102    1.62158521
## 81   943       113        0        1 0.8134473    1.57757989
## 82   974       112        0        1 0.8061843    1.53505959
## 83  1080       108        3        1 0.7987197    1.49278776
## 84  1165       105        2        1 0.7911128    1.45109021
## 85  1212       104        0        1 0.7835060    1.41068293
## 86  1356        94        9        1 0.7751708    1.36777924
## 87  1413        92        1        1 0.7667450    1.32576022
## 88  1427        89        2        1 0.7581299    1.28409696
## 89  1444        86        2        1 0.7493144    1.24272554
## 90  1487        84        1        1 0.7403940    1.20206545
## 91  1536        82        1        1 0.7313648    1.16205430
## 92  1786        71       10        1 0.7210639    1.11771107
## 93  1847        68        2        1 0.7104600    1.07340498
## 94  2090        62        5        1 0.6990010    1.02693438
## 95  2419        50       11        1 0.6850210    0.97205243
## 96  2466        47        2        1 0.6704461    0.91676084
## 97  2769        37        9        1 0.6523259    0.85047730
## 98  2796        35        1        1 0.6336880    0.78482723
## 99  2847        32        2        1 0.6138853    0.71754806
## 100 3090        30        1        1 0.5934224    0.65037746
## 101 3170        27        2        1 0.5714438    0.58055253
## 102 3244        26        0        1 0.5494652    0.51281126
## 103 3358        24        1        1 0.5265708    0.44414967
## 104 3395        22        1        1 0.5026358    0.37412716
## 105 3428        20        1        1 0.4775040    0.30221013
## 106 3445        19        1        1 0.4523722    0.23161691
## 107 3762        13        4        1 0.4175744    0.13548455
## 108 3839        11        1        1 0.3796130    0.03190062
## 109 3853        10        0        1 0.3416517   -0.07135587
## 
## Hasil transformasi minus log-log untuk variabel: Sex 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1     41       242        0        1 0.9958678   5.486868044
## 2     51       241        0        1 0.9917355   4.791644014
## 3     71       240        0        1 0.9876033   4.384094834
## 4     77       239        0        1 0.9834711   4.094321413
## 5    110       238        0        1 0.9793388   3.869079183
## 6    131       237        0        1 0.9752066   3.684651559
## 7    179       236        0        1 0.9710744   3.528387369
## 8    186       235        0        1 0.9669421   3.392734965
## 9    198       234        0        1 0.9628099   3.272823360
## 10   216       233        0        1 0.9586777   3.165326658
## 11   223       232        0        1 0.9545455   3.067872615
## 12   264       231        0        1 0.9504132   2.978709640
## 13   304       230        0        1 0.9462810   2.896507537
## 14   321       229        0        1 0.9421488   2.820232311
## 15   326       228        0        1 0.9380165   2.749064266
## 16   334       227        0        1 0.9338843   2.682342588
## 17   348       226        0        1 0.9297521   2.619526764
## 18   388       225        0        1 0.9256198   2.560169036
## 19   400       224        0        1 0.9214876   2.503894324
## 20   460       223        0        1 0.9173554   2.450385297
## 21   515       222        0        1 0.9132231   2.399371090
## 22   549       221        0        1 0.9090909   2.350618656
## 23   597       220        0        1 0.9049587   2.303926028
## 24   673       219        0        1 0.9008264   2.259117034
## 25   694       218        0        1 0.8966942   2.216037074
## 26   733       216        1        1 0.8925429   2.174361179
## 27   750       214        1        1 0.8883721   2.133985575
## 28   769       213        0        1 0.8842013   2.094997978
## 29   786       212        0        1 0.8800306   2.057299428
## 30   790       210        1        1 0.8758399   2.020630045
## 31   797       209        0        1 0.8716493   1.985091206
## 32   850       206        2        1 0.8674180   1.950279761
## 33   853       205        0        1 0.8631867   1.916477745
## 34   859       204        0        1 0.8589554   1.883622984
## 35   904       202        1        1 0.8547031   1.851502698
## 36   930       201        0        1 0.8504509   1.820229284
## 37   943       199        1        1 0.8461773   1.789603399
## 38   974       198        0        1 0.8419036   1.759739419
## 39   980       197        0        1 0.8376300   1.730596051
## 40  1080       193        3        1 0.8332900   1.701698016
## 41  1083       192        0        1 0.8289499   1.673467061
## 42  1165       188        3        1 0.8245406   1.645433668
## 43  1170       187        0        1 0.8201313   1.618020534
## 44  1191       186        0        2 0.8113127   1.564934366
## 45  1212       184        0        1 0.8069034   1.539206214
## 46  1235       179        4        1 0.8023955   1.513429807
## 47  1356       169        9        1 0.7976476   1.486829503
## 48  1413       163        5        1 0.7927541   1.459974494
## 49  1427       160        2        1 0.7877994   1.433336446
## 50  1434       158        2        1 0.7828133   1.407064417
## 51  1444       155        1        1 0.7777629   1.380974324
## 52  1487       151        3        1 0.7726122   1.354880596
## 53  1576       144        6        1 0.7672468   1.328226358
## 54  1657       139        4        1 0.7617270   1.301339381
## 55  1690       137        1        2 0.7506069   1.248715109
## 56  1741       132        3        1 0.7449205   1.222551796
## 57  1786       126        5        1 0.7390084   1.195852761
## 58  1827       123        2        1 0.7330002   1.169219618
## 59  1847       120        2        1 0.7268919   1.142634742
## 60  1925       116        3        1 0.7206256   1.115853407
## 61  2055       107        8        1 0.7138908   1.087597297
## 62  2090       106        0        1 0.7071560   1.059860809
## 63  2105       105        0        1 0.7004211   1.032618142
## 64  2224        98        6        1 0.6932740   1.004220744
## 65  2256        95        2        1 0.6859764   0.975743281
## 66  2288        93        1        1 0.6786003   0.947464076
## 67  2297        91        1        1 0.6711431   0.919363322
## 68  2400        82        8        1 0.6629585   0.889057586
## 69  2419        81        0        1 0.6547738   0.859283320
## 70  2466        76        4        1 0.6461583   0.828484341
## 71  2540        71        4        1 0.6370575   0.796520063
## 72  2583        66        4        1 0.6274051   0.763220357
## 73  2598        65        0        1 0.6177527   0.730502310
## 74  2769        58        6        1 0.6071018   0.695031503
## 75  2847        54        3        1 0.5958592   0.658261120
## 76  3086        45        8        1 0.5826179   0.615771939
## 77  3090        44        0        1 0.5693766   0.574096978
## 78  3170        38        5        1 0.5543930   0.527833644
## 79  3244        37        0        1 0.5394094   0.482431813
## 80  3282        35        1        1 0.5239977   0.436541014
## 81  3358        32        2        1 0.5076228   0.388583376
## 82  3428        29        2        1 0.4901185   0.338122385
## 83  3445        28        0        1 0.4726143   0.288381446
## 84  3574        27        0        1 0.4551101   0.239252632
## 85  3584        24        2        1 0.4361471   0.186599981
## 86  3762        20        3        1 0.4143398   0.126619461
## 87  3839        18        1        1 0.3913209   0.063763031
## 88  3853        17        0        1 0.3683020   0.001148734
## 89   140        34        0        1 0.9705882   3.511471176
## 90   191        33        0        1 0.9411765   2.803054168
## 91   552        31        1        1 0.9108159   2.370709292
## 92   611        30        0        1 0.8804554   2.061083123
## 93   762        29        0        1 0.8500949   1.817647802
## 94   799        28        0        1 0.8197343   1.615581947
## 95   890        26        1        1 0.7882061   1.435502784
## 96   999        25        0        1 0.7566779   1.277197231
## 97  1012        24        0        1 0.7251496   1.135139511
## 98  1077        23        0        1 0.6936214   1.005589145
## 99  1152        22        0        1 0.6620931   0.885885054
## 100 1297        21        0        1 0.6305649   0.774055276
## 101 1360        18        2        1 0.5955335   0.657205610
## 102 1536        17        0        1 0.5605021   0.546587076
## 103 1682        15        1        1 0.5231353   0.433995560
## 104 2386        11        3        1 0.4755776   0.296756034
## 105 2689        10        0        1 0.4280198   0.164184048
## 106 2796         9        0        1 0.3804620   0.034209672
## 107 3395         7        1        1 0.3261103  -0.113792455
## 108 4079         4        2        1 0.2445827  -0.342313440
## 109 4191         3        0        1 0.1630552  -0.595350610
## 
## Hasil transformasi minus log-log untuk variabel: Ascites 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1     71       257        0        1 0.9961089   5.547127398
## 2    131       256        0        1 0.9922179   4.852025178
## 3    140       255        0        1 0.9883268   4.444598632
## 4    186       254        0        1 0.9844358   4.154948679
## 5    198       253        0        1 0.9805447   3.929830757
## 6    304       252        0        1 0.9766537   3.745528295
## 7    321       251        0        1 0.9727626   3.589390127
## 8    326       250        0        1 0.9688716   3.453864616
## 9    460       249        0        1 0.9649805   3.334080785
## 10   515       248        0        1 0.9610895   3.226712747
## 11   552       246        1        1 0.9571826   3.129010586
## 12   597       245        0        1 0.9532758   3.039662032
## 13   611       244        0        1 0.9493689   2.957322642
## 14   673       243        0        1 0.9454620   2.880948254
## 15   694       242        0        1 0.9415552   2.809711721
## 16   733       240        1        1 0.9376320   2.742677017
## 17   750       238        1        1 0.9336924   2.679342421
## 18   762       237        0        1 0.9297527   2.619536830
## 19   769       236        0        1 0.9258131   2.562874051
## 20   786       235        0        1 0.9218735   2.509027876
## 21   790       233        1        1 0.9179169   2.457505175
## 22   797       232        0        1 0.9139604   2.408300966
## 23   799       231        0        1 0.9100039   2.361205957
## 24   850       228        2        1 0.9060126   2.315649699
## 25   853       227        0        1 0.9020214   2.271890482
## 26   859       226        0        1 0.8980301   2.229784065
## 27   890       224        1        1 0.8940211   2.189024897
## 28   904       222        1        1 0.8899940   2.149515461
## 29   930       221        0        1 0.8859668   2.111338750
## 30   943       219        1        1 0.8819213   2.074235638
## 31   974       218        0        1 0.8778758   2.038298493
## 32   980       217        0        1 0.8738303   2.003450676
## 33   999       215        1        1 0.8697660   1.969467742
## 34  1012       214        0        1 0.8657016   1.936450368
## 35  1077       211        2        1 0.8615988   1.904040174
## 36  1080       210        0        1 0.8574959   1.872500001
## 37  1083       209        0        1 0.8533931   1.841779852
## 38  1152       206        2        1 0.8492504   1.811546779
## 39  1165       204        1        1 0.8450874   1.781916804
## 40  1170       203        0        1 0.8409244   1.752999484
## 41  1212       202        0        1 0.8367614   1.724757402
## 42  1235       197        4        1 0.8325139   1.696601932
## 43  1297       192        4        1 0.8281779   1.668512482
## 44  1356       184        7        1 0.8236769   1.640016200
## 45  1360       183        0        1 0.8191760   1.612159786
## 46  1413       177        5        1 0.8145479   1.584149852
## 47  1427       174        2        1 0.8098665   1.556438487
## 48  1444       170        3        1 0.8051026   1.528846756
## 49  1487       166        3        1 0.8002526   1.501355804
## 50  1536       163        2        1 0.7953431   1.474113148
## 51  1576       158        4        1 0.7903093   1.446762510
## 52  1657       152        5        1 0.7851099   1.419100148
## 53  1682       150        1        1 0.7798758   1.391827200
## 54  1690       149        0        2 0.7694077   1.338898201
## 55  1741       144        3        1 0.7640646   1.312661079
## 56  1786       138        5        1 0.7585279   1.285993899
## 57  1827       135        2        1 0.7529091   1.259447685
## 58  1847       132        2        1 0.7472053   1.233005760
## 59  1925       128        3        1 0.7413677   1.206447487
## 60  2055       118        9        1 0.7350850   1.178405119
## 61  2090       117        0        1 0.7288022   1.150896770
## 62  2105       116        0        1 0.7225194   1.123896223
## 63  2224       109        7        1 0.7158908   1.095932889
## 64  2256       105        2        1 0.7090728   1.067703577
## 65  2288       103        1        1 0.7021886   1.039721055
## 66  2297       101        1        1 0.6952362   1.011966021
## 67  2386        92        8        1 0.6876793   0.982343221
## 68  2400        91        0        1 0.6801224   0.953259411
## 69  2419        90        0        1 0.6725655   0.924686306
## 70  2466        85        4        1 0.6646529   0.895287145
## 71  2540        80        4        1 0.6563448   0.864958401
## 72  2583        75        4        1 0.6475935   0.833577543
## 73  2598        74        0        1 0.6388422   0.802743900
## 74  2689        69        4        1 0.6295837   0.770683861
## 75  2769        66        2        1 0.6200445   0.738219838
## 76  2796        64        1        1 0.6103563   0.705802180
## 77  2847        61        2        1 0.6003505   0.672870801
## 78  3086        51        9        1 0.5885789   0.634794694
## 79  3170        45        5        1 0.5754994   0.593270798
## 80  3244        44        0        1 0.5624198   0.552504457
## 81  3282        42        1        1 0.5490289   0.511485468
## 82  3358        39        2        1 0.5349512   0.469076523
## 83  3395        37        1        1 0.5204931   0.426210793
## 84  3428        35        1        1 0.5056218   0.382775151
## 85  3445        34        1        1 0.4907506   0.339931354
## 86  3574        32        0        1 0.4754147   0.296295215
## 87  3584        29        2        1 0.4590211   0.250181809
## 88  3762        25        3        1 0.4406602   0.199083825
## 89  3839        22        2        1 0.4206302   0.143868970
## 90  3853        21        0        1 0.4006002   0.089059243
## 91  4079        14        6        1 0.3719859   0.011162723
## 92  4191        10        3        1 0.3347873  -0.090078212
## 93    41        19        0        1 0.9473684   2.917527168
## 94    51        18        0        1 0.8947368   2.196194392
## 95    77        17        0        1 0.8421053   1.761131781
## 96   110        16        0        1 0.7894737   1.442277465
## 97   179        15        0        1 0.7368421   1.186192975
## 98   191        14        0        1 0.6842105   0.968928030
## 99   216        13        0        1 0.6315789   0.777545982
## 100  223        12        0        1 0.5789474   0.604141000
## 101  264        11        0        1 0.5263158   0.443394593
## 102  334        10        0        1 0.4736842   0.291403118
## 103  348         9        0        1 0.4210526   0.145028734
## 104  388         8        0        1 0.3684211   0.001472253
## 105  400         7        0        1 0.3157895  -0.142089241
## 106  549         6        0        1 0.2631579  -0.288932091
## 107 1191         5        0        2 0.1578947  -0.612927248
## 108 1434         3        0        1 0.1052632  -0.811504184
## 109 3090         1        1        1 0.0000000          -Inf
## 
## Hasil transformasi minus log-log untuk variabel: Spiders 
##     Time N_at_risk Censored Observed   Survival MinusLogLog_S
## 1     41       196        0        1 0.99489796   5.275558199
## 2    191       195        0        1 0.98979592   4.579843612
## 3    198       194        0        1 0.98469388   4.171800048
## 4    223       193        0        1 0.97959184   3.881528369
## 5    334       192        0        1 0.97448980   3.655783955
## 6    348       191        0        1 0.96938776   3.470850172
## 7    388       190        0        1 0.96428571   3.314075796
## 8    552       188        1        1 0.95915653   3.177230406
## 9    597       187        0        1 0.95402736   3.056269567
## 10   611       186        0        1 0.94889818   2.947822841
## 11   733       184        1        1 0.94374112   2.848979404
## 12   769       183        0        1 0.93858407   2.758561920
## 13   786       182        0        1 0.93342701   2.675207840
## 14   790       181        0        1 0.92826996   2.597860070
## 15   797       180        0        1 0.92311290   2.525681974
## 16   799       179        0        1 0.91795584   2.458000031
## 17   853       177        1        1 0.91276965   2.393914213
## 18   890       175        1        1 0.90755383   2.333019543
## 19   904       173        1        1 0.90230785   2.274974603
## 20   930       172        0        1 0.89706187   2.219803621
## 21   943       170        1        1 0.89178504   2.166917071
## 22   974       169        0        1 0.88650821   2.116396879
## 23   999       167        1        1 0.88119977   2.067742869
## 24  1012       166        0        1 0.87589134   2.021072747
## 25  1077       163        2        1 0.87051777   1.975679174
## 26  1080       162        0        1 0.86514421   1.931993930
## 27  1152       159        2        1 0.85970305   1.889361886
## 28  1191       157        1        1 0.85422723   1.847961389
## 29  1212       156        0        1 0.84875142   1.807956359
## 30  1297       150        5        1 0.84309308   1.767977023
## 31  1356       144        5        1 0.83723826   1.727959171
## 32  1360       143        0        1 0.83138345   1.689216459
## 33  1427       136        6        1 0.82527034   1.650029379
## 34  1487       129        6        1 0.81887289   1.610306255
## 35  1536       127        1        1 0.81242507   1.571508482
## 36  1682       119        7        1 0.80559797   1.531688039
## 37  1690       118        0        1 0.79877087   1.493073016
## 38  1741       115        2        1 0.79182504   1.454938045
## 39  1786       111        3        1 0.78469148   1.416899310
## 40  2055        97       13        1 0.77660188   1.375048049
## 41  2090        96        0        1 0.76851227   1.334465971
## 42  2256        88        7        1 0.75977918   1.291975789
## 43  2288        86        1        1 0.75094454   1.250283854
## 44  2297        84        1        1 0.74200472   1.209321504
## 45  2386        79        4        1 0.73261226   1.167516487
## 46  2419        78        0        1 0.72321979   1.126881820
## 47  2466        73        4        1 0.71331267   1.085196406
## 48  2583        65        7        1 0.70233863   1.040325608
## 49  2598        64        0        1 0.69136459   0.996720262
## 50  2689        61        2        1 0.68003074   0.952909925
## 51  2769        58        2        1 0.66830607   0.908796348
## 52  2796        56        1        1 0.65637204   0.865057079
## 53  2847        53        2        1 0.64398766   0.820808487
## 54  3086        44        8        1 0.62935158   0.769887342
## 55  3090        43        0        1 0.61471549   0.720321622
## 56  3170        37        5        1 0.59810156   0.665542315
## 57  3282        35        1        1 0.58101294   0.610678663
## 58  3358        33        1        1 0.56340649   0.555554719
## 59  3395        31        1        1 0.54523209   0.499978462
## 60  3574        30        0        1 0.52705769   0.445591602
## 61  3584        27        2        1 0.50753703   0.388334278
## 62  3839        21        5        1 0.48336860   0.318862135
## 63  3853        20        0        1 0.45920017   0.250682977
## 64  4079        13        6        1 0.42387708   0.152787878
## 65  4191         9        3        1 0.37677963   0.024195561
## 66    51        80        0        1 0.98750000   4.375743836
## 67    71        79        0        1 0.97500000   3.676247258
## 68    77        78        0        1 0.96250000   3.264364608
## 69   110        77        0        1 0.95000000   2.970195249
## 70   131        76        0        1 0.93750000   2.740493007
## 71   140        75        0        1 0.92500000   2.551539632
## 72   179        74        0        1 0.91250000   2.390682221
## 73   186        73        0        1 0.90000000   2.250367327
## 74   216        72        0        1 0.88750000   2.125722093
## 75   264        71        0        1 0.87500000   2.013418678
## 76   304        70        0        1 0.86250000   1.911082813
## 77   321        69        0        1 0.85000000   1.816960795
## 78   326        68        0        1 0.83750000   1.729720233
## 79   400        67        0        1 0.82500000   1.648324840
## 80   460        66        0        1 0.81250000   1.571952527
## 81   515        65        0        1 0.80000000   1.499939987
## 82   549        64        0        1 0.78750000   1.431744096
## 83   673        63        0        1 0.77500000   1.366914374
## 84   694        62        0        1 0.76250000   1.305072888
## 85   750        60        1        1 0.74979167   1.244934083
## 86   762        59        0        1 0.73708333   1.187265413
## 87   850        56        2        1 0.72392113   1.129877508
## 88   859        55        0        1 0.71075893   1.074636129
## 89   980        54        0        1 0.69759673   1.021334355
## 90  1083        53        0        1 0.68443452   0.969790948
## 91  1165        52        0        1 0.67127232   0.919846094
## 92  1170        51        0        1 0.65811012   0.871357980
## 93  1191        50        0        1 0.64494792   0.824200014
## 94  1235        47        2        1 0.63122562   0.776328983
## 95  1413        42        4        1 0.61619644   0.725278979
## 96  1434        41        0        1 0.60116726   0.675538951
## 97  1444        40        0        1 0.58613808   0.626985180
## 98  1576        35        4        1 0.56939127   0.574142795
## 99  1657        34        0        1 0.55264447   0.522492767
## 100 1690        33        0        1 0.53589767   0.471906157
## 101 1827        28        4        1 0.51675847   0.415243216
## 102 1847        27        0        1 0.49761926   0.359650763
## 103 1925        25        1        1 0.47771449   0.302806516
## 104 2105        22        2        1 0.45600020   0.241737817
## 105 2224        19        2        1 0.43200019   0.175152213
## 106 2400        14        4        1 0.40114303   0.090540623
## 107 2540        13        0        1 0.37028588   0.006541414
## 108 3244         8        4        1 0.32400014  -0.119569285
## 109 3428         5        2        1 0.25920011  -0.300219310
## 110 3445         4        1        1 0.19440008  -0.493376439
## 111 3762         2        0        1 0.09720004  -0.846290552
## 
## Hasil transformasi minus log-log untuk variabel: Bilirubin_cat 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1    198       115        0        1 0.9913043    4.74056847
## 2    515       114        0        1 0.9826087    4.04302562
## 3    694       113        0        1 0.9739130    3.63313232
## 4   1682        90       22        1 0.9630918    3.28057684
## 5   1786        82        7        1 0.9513468    2.99820232
## 6   1847        78        3        1 0.9391500    2.76811785
## 7   2055        70        7        1 0.9257336    2.56176015
## 8   2090        69        0        1 0.9123172    2.38849607
## 9   2224        64        5        1 0.8980622    2.23011608
## 10  2297        58        4        1 0.8825784    2.08018028
## 11  2419        54        3        1 0.8662343    1.94072484
## 12  2466        51        2        1 0.8492493    1.81153909
## 13  2583        47        3        1 0.8311802    1.68789332
## 14  2598        46        0        1 0.8131111    1.57557980
## 15  2769        42        3        1 0.7937513    1.46540201
## 16  3086        32        9        1 0.7689466    1.33661387
## 17  3170        26        5        1 0.7393717    1.19747885
## 18  3584        18        7        1 0.6982955    1.02411834
## 19  3853        13        4        1 0.6445804    0.82290138
## 20    41       161        0        1 0.9937888    5.07829071
## 21    51       160        0        1 0.9875776    4.38201361
## 22    71       159        0        1 0.9813665    3.97340215
## 23    77       158        0        1 0.9751553    3.68255710
## 24   110       157        0        1 0.9689441    3.45623374
## 25   131       156        0        1 0.9627329    3.27071537
## 26   140       155        0        1 0.9565217    3.11335066
## 27   179       154        0        1 0.9503106    2.97658783
## 28   186       153        0        1 0.9440994    2.85555574
## 29   191       152        0        1 0.9378882    2.74692833
## 30   216       151        0        1 0.9316770    2.64833323
## 31   223       150        0        1 0.9254658    2.55801866
## 32   264       149        0        1 0.9192547    2.47465429
## 33   304       148        0        1 0.9130435    2.39720595
## 34   321       147        0        1 0.9068323    2.32485378
## 35   326       146        0        1 0.9006211    2.25693679
## 36   334       145        0        1 0.8944099    2.19291429
## 37   348       144        0        1 0.8881988    2.13233835
## 38   388       143        0        1 0.8819876    2.07483371
## 39   400       142        0        1 0.8757764    2.02008285
## 40   460       141        0        1 0.8695652    1.96781472
## 41   549       139        1        1 0.8633094    1.91744385
## 42   552       138        0        1 0.8570535    1.86914853
## 43   597       137        0        1 0.8507976    1.82274878
## 44   611       136        0        1 0.8445418    1.77808679
## 45   673       135        0        1 0.8382859    1.73502338
## 46   733       133        1        1 0.8319830    1.69312782
## 47   750       131        1        1 0.8256320    1.65231330
## 48   762       130        0        1 0.8192810    1.61280257
## 49   769       129        0        1 0.8129299    1.57450358
## 50   786       128        0        1 0.8065789    1.53733347
## 51   790       126        1        1 0.8001775    1.50093475
## 52   797       125        0        1 0.7937761    1.46553733
## 53   799       124        0        1 0.7873747    1.43107807
## 54   850       121        2        1 0.7808674    1.39695146
## 55   853       120        0        1 0.7743602    1.36367953
## 56   859       119        0        1 0.7678530    1.33121169
## 57   890       117        1        1 0.7612901    1.29923363
## 58   904       115        1        1 0.7546702    1.26771373
## 59   930       114        0        1 0.7480503    1.23689193
## 60   943       112        1        1 0.7413713    1.20646352
## 61   974       111        0        1 0.7346923    1.17667043
## 62   980       110        0        1 0.7280132    1.14747895
## 63   999       109        0        1 0.7213342    1.11885779
## 64  1012       108        0        1 0.7146552    1.09077782
## 65  1077       106        1        1 0.7079132    1.06295419
## 66  1080       105        0        1 0.7011711    1.03562826
## 67  1083       104        0        1 0.6944291    1.00877564
## 68  1152       102        1        1 0.6876210    0.98211679
## 69  1165       101        0        1 0.6808129    0.95589520
## 70  1170       100        0        1 0.6740047    0.93009013
## 71  1191        99        0        2 0.6603885    0.87965263
## 72  1212        97        0        1 0.6535803    0.85498444
## 73  1235        94        2        1 0.6466274    0.83014722
## 74  1297        92        1        1 0.6395988    0.80538872
## 75  1356        87        4        1 0.6322471    0.77984953
## 76  1360        86        0        1 0.6248954    0.75465876
## 77  1413        81        4        1 0.6171806    0.72858049
## 78  1427        78        2        1 0.6092681    0.70219407
## 79  1434        77        0        1 0.6013555    0.67615431
## 80  1444        75        1        1 0.5933374    0.65010291
## 81  1487        73        1        1 0.5852095    0.62402161
## 82  1536        71        1        1 0.5769671    0.59789152
## 83  1576        68        2        1 0.5684823    0.57130997
## 84  1657        64        3        1 0.5595998    0.54380784
## 85  1690        62        1        2 0.5415482    0.48886311
## 86  1741        60        0        1 0.5325224    0.46182850
## 87  1827        56        3        1 0.5230130    0.43363482
## 88  1925        52        3        1 0.5129551    0.40411554
## 89  2105        49        2        1 0.5024866    0.37369573
## 90  2256        46        2        1 0.4915630    0.34225768
## 91  2288        45        0        1 0.4806394    0.31110351
## 92  2386        39        5        1 0.4683153    0.27626282
## 93  2400        38        0        1 0.4559912    0.24171268
## 94  2540        33        4        1 0.4421733    0.20327545
## 95  2689        28        4        1 0.4263814    0.15967465
## 96  2796        25        2        1 0.4093261    0.11289654
## 97  2847        23        1        1 0.3915293    0.06433072
## 98  3090        20        2        1 0.3719529    0.01107295
## 99  3244        19        0        1 0.3523764   -0.04215424
## 100 3282        18        0        1 0.3327999   -0.09550449
## 101 3358        16        1        1 0.3119999   -0.15250843
## 102 3395        15        0        1 0.2911999   -0.21005438
## 103 3428        14        0        1 0.2703999   -0.26838696
## 104 3445        13        0        1 0.2496000   -0.32778881
## 105 3574        12        0        1 0.2288000   -0.38859508
## 106 3762        11        0        1 0.2080000   -0.45121408
## 107 3839         9        1        1 0.1848889   -0.52354465
## 108 4079         5        3        1 0.1479111   -0.64770200
## 109 4191         4        0        1 0.1109333   -0.78792360
## 
## Hasil transformasi minus log-log untuk variabel: Cholesterol_cat 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1     41        20        0        1 0.9500000    2.97019525
## 2     77        19        0        1 0.9000000    2.25036733
## 3    110        18        0        1 0.8500000    1.81696079
## 4    131        17        0        1 0.8000000    1.49993999
## 5    140        16        0        1 0.7500000    1.24589932
## 6    191        15        0        1 0.7000000    1.03093043
## 7    348        14        0        1 0.6500000    0.84215099
## 8    552        13        0        1 0.6000000    0.67172699
## 9   1012        12        0        1 0.5500000    0.51443714
## 10  1077        11        0        1 0.5000000    0.36651292
## 11  2583         4        6        1 0.3750000    0.01935689
## 12    51        36        0        1 0.9722222    3.56946657
## 13   179        35        0        1 0.9444444    2.86192868
## 14   304        34        0        1 0.9166667    2.44171640
## 15   388        33        0        1 0.8888889    2.13891103
## 16   549        32        0        1 0.8611111    1.90024664
## 17   750        30        1        1 0.8324074    1.69590424
## 18  1576        25        4        1 0.7991111    1.49497023
## 19  2055        20        4        1 0.7591556    1.28899135
## 20  3170         6       13        1 0.6326296    0.78116969
## 21  3584         4        1        1 0.4744722    0.29363012
## 22    71       220        0        1 0.9954545    5.39135050
## 23   186       219        0        1 0.9909091    4.69591760
## 24   198       218        0        1 0.9863636    4.28815802
## 25   216       217        0        1 0.9818182    3.99817264
## 26   223       216        0        1 0.9772727    3.77271690
## 27   264       215        0        1 0.9727273    3.58807417
## 28   321       214        0        1 0.9681818    3.43159327
## 29   326       213        0        1 0.9636364    3.29572254
## 30   334       212        0        1 0.9590909    3.17559096
## 31   400       211        0        1 0.9545455    3.06787262
## 32   460       210        0        1 0.9500000    2.97019525
## 33   515       209        0        1 0.9454545    2.88080724
## 34   597       207        1        1 0.9408871    2.79799530
## 35   611       206        0        1 0.9363197    2.72116157
## 36   673       205        0        1 0.9317523    2.64947569
## 37   694       204        0        1 0.9271849    2.58226883
## 38   733       202        1        1 0.9225949    2.51869010
## 39   762       201        0        1 0.9180048    2.45862375
## 40   769       200        0        1 0.9134148    2.40168576
## 41   786       199        0        1 0.9088248    2.34755163
## 42   790       197        1        1 0.9042115    2.29568876
## 43   797       196        0        1 0.8995981    2.24613749
## 44   799       195        0        1 0.8949848    2.19868899
## 45   850       192        2        1 0.8903234    2.15269667
## 46   853       191        0        1 0.8856621    2.10850118
## 47   859       190        0        1 0.8810007    2.06595786
## 48   890       188        1        1 0.8763145    2.02472444
## 49   904       186        1        1 0.8716031    1.98470557
## 50   930       185        0        1 0.8668918    1.94602220
## 51   943       183        1        1 0.8621547    1.90837912
## 52   974       182        0        1 0.8574175    1.87190551
## 53   980       181        0        1 0.8526804    1.83652399
## 54   999       179        1        1 0.8479169    1.80197531
## 55  1080       176        2        1 0.8430991    1.76801922
## 56  1083       175        0        1 0.8382814    1.73499326
## 57  1152       172        2        1 0.8334077    1.70247298
## 58  1165       170        1        1 0.8285053    1.67061126
## 59  1170       169        0        1 0.8236029    1.63955302
## 60  1191       168        0        2 0.8137981    1.57967059
## 61  1212       166        0        1 0.8088957    1.55076685
## 62  1235       162        3        1 0.8039025    1.52198927
## 63  1297       157        4        1 0.7987821    1.49313579
## 64  1356       150        6        1 0.7934569    1.46379750
## 65  1360       149        0        1 0.7881317    1.43510627
## 66  1413       143        5        1 0.7826203    1.40605784
## 67  1427       140        2        1 0.7770302    1.37723106
## 68  1434       139        1        1 0.7714400    1.34901256
## 69  1444       136        1        1 0.7657677    1.32096935
## 70  1487       134        1        1 0.7600530    1.29328810
## 71  1536       132        1        1 0.7542950    1.26594839
## 72  1657       123        8        1 0.7481625    1.23740874
## 73  1682       121        1        1 0.7419794    1.20920693
## 74  1690       120        0        2 0.7296130    1.15441791
## 75  1741       116        2        1 0.7233233    1.12732340
## 76  1786       109        6        1 0.7166873    1.09926540
## 77  1827       106        2        1 0.7099261    1.07120791
## 78  1847       104        1        1 0.7030999    1.04339609
## 79  1925       100        3        1 0.6960689    1.01526421
## 80  2090        92        7        1 0.6885029    0.98554499
## 81  2105        91        0        1 0.6809369    0.95636926
## 82  2224        87        4        1 0.6731101    0.92672897
## 83  2256        85        0        1 0.6651911    0.89727057
## 84  2288        84        0        1 0.6572722    0.86831740
## 85  2297        83        0        1 0.6493532    0.83984272
## 86  2386        78        4        1 0.6410282    0.81039623
## 87  2400        77        0        1 0.6327032    0.78142354
## 88  2419        76        0        1 0.6243781    0.75289901
## 89  2466        71        4        1 0.6155841    0.72322754
## 90  2540        67        3        1 0.6063962    0.69270397
## 91  2598        62        4        1 0.5966156    0.66071450
## 92  2689        59        2        1 0.5865035    0.62815262
## 93  2769        56        2        1 0.5760302    0.59494099
## 94  2796        55        0        1 0.5655570    0.56221672
## 95  2847        52        2        1 0.5546809    0.52871411
## 96  3086        43        8        1 0.5417813    0.48956518
## 97  3090        42        0        1 0.5288818    0.45100071
## 98  3244        36        5        1 0.5141906    0.40772576
## 99  3282        34        1        1 0.4990673    0.36382296
## 100 3358        31        2        1 0.4829684    0.31772343
## 101 3395        30        0        1 0.4668695    0.27219515
## 102 3428        28        1        1 0.4501955    0.22555490
## 103 3445        27        1        1 0.4335216    0.17934969
## 104 3574        25        0        1 0.4161808    0.13166392
## 105 3762        21        3        1 0.3963626    0.07750140
## 106 3839        18        2        1 0.3743425    0.01756929
## 107 3853        17        0        1 0.3523223   -0.04230132
## 108 4079        11        5        1 0.3202930   -0.12972825
## 109 4191         8        2        1 0.2802564   -0.24063004
## 
## Hasil transformasi minus log-log untuk variabel: Alk_Phos_cat 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1     41       140        0        1 0.9928571    4.93806032
## 2     51       139        0        1 0.9857143    4.24130950
## 3    110       138        0        1 0.9785714    3.83221894
## 4    131       137        0        1 0.9714286    3.54088930
## 5    140       136        0        1 0.9642857    3.31407580
## 6    179       135        0        1 0.9571429    3.12806159
## 7    186       134        0        1 0.9500000    2.97019525
## 8    191       133        0        1 0.9428571    2.83292489
## 9    304       132        0        1 0.9357143    2.71137925
## 10   348       131        0        1 0.9285714    2.60223217
## 11   515       130        0        1 0.9214286    2.50311113
## 12   552       128        1        1 0.9142299    2.41158338
## 13   750       126        1        1 0.9069741    2.32645405
## 14   799       125        0        1 0.8997183    2.24740078
## 15   850       122        2        1 0.8923436    2.17239897
## 16   980       120        1        1 0.8849074    2.10150487
## 17  1012       118        1        1 0.8774082    2.03421600
## 18  1080       115        2        1 0.8697785    1.96957129
## 19  1191       111        3        1 0.8619427    1.90672267
## 20  1487        95       15        1 0.8528696    1.83791692
## 21  1536        92        2        1 0.8435993    1.77150006
## 22  1576        89        2        1 0.8341206    1.70717629
## 23  1682        84        4        1 0.8241906    1.64323559
## 24  1690        83        0        1 0.8142606    1.58243199
## 25  1741        79        3        1 0.8039535    1.52227995
## 26  1827        73        5        1 0.7929405    1.46098719
## 27  2055        61       11        1 0.7799414    1.39216585
## 28  2090        60        0        1 0.7669424    1.32672989
## 29  2105        59        0        1 0.7539434    1.26429629
## 30  2288        50        8        1 0.7388645    1.19520903
## 31  2419        45        4        1 0.7224453    1.12358080
## 32  2540        38        6        1 0.7034336    1.04474421
## 33  2583        36        1        1 0.6838938    0.96770860
## 34  2598        35        0        1 0.6643540    0.89418634
## 35  2796        31        3        1 0.6429232    0.81705638
## 36  3244        20       10        1 0.6107770    0.70719880
## 37  3395        16        3        1 0.5726035    0.58418185
## 38  3428        15        0        1 0.5344299    0.46751918
## 39  3445        14        1        1 0.4962563    0.35572870
## 40  3762         9        3        1 0.4411167    0.20034820
## 41    71       136        0        1 0.9926471    4.90896710
## 42    77       135        0        1 0.9852941    4.21210931
## 43   198       134        0        1 0.9779412    3.80291045
## 44   216       133        0        1 0.9705882    3.51147118
## 45   223       132        0        1 0.9632353    3.28454665
## 46   264       131        0        1 0.9558824    3.09842002
## 47   321       130        0        1 0.9485294    2.94043984
## 48   326       129        0        1 0.9411765    2.80305417
## 49   334       128        0        1 0.9338235    2.68139173
## 50   388       127        0        1 0.9264706    2.57212633
## 51   400       126        0        1 0.9191176    2.47288541
## 52   460       125        0        1 0.9117647    2.38191709
## 53   549       124        0        1 0.9044118    2.29789082
## 54   597       123        0        1 0.8970588    2.21977231
## 55   611       122        0        1 0.8897059    2.14674150
## 56   673       121        0        1 0.8823529    2.07813725
## 57   694       120        0        1 0.8750000    2.01341868
## 58   733       118        1        1 0.8675847    1.95163191
## 59   762       117        0        1 0.8601695    1.89295649
## 60   769       116        0        1 0.8527542    1.83706721
## 61   786       115        0        1 0.8453390    1.78368673
## 62   790       113        1        1 0.8378581    1.73213384
## 63   797       112        0        1 0.8303772    1.68267987
## 64   853       111        0        1 0.8228964    1.63514030
## 65   859       110        0        1 0.8154155    1.58935344
## 66   890       109        0        1 0.8079346    1.54517680
## 67   904       107        1        1 0.8003838    1.50209182
## 68   930       106        0        1 0.7928330    1.46040325
## 69   943       104        1        1 0.7852096    1.41962550
## 70   974       103        0        1 0.7775862    1.38007085
## 71   999       102        0        1 0.7699628    1.34165364
## 72  1077       101        0        1 0.7623394    1.30429655
## 73  1083       100        0        1 0.7547160    1.26792947
## 74  1152        99        0        1 0.7470927    1.23248866
## 75  1165        98        0        1 0.7394693    1.19791597
## 76  1170        97        0        1 0.7318459    1.16415819
## 77  1191        96        0        1 0.7242225    1.13116652
## 78  1212        95        0        1 0.7165991    1.09889604
## 79  1235        92        2        1 0.7088100    1.06662586
## 80  1297        89        2        1 0.7008458    1.03432177
## 81  1356        85        3        1 0.6926006    1.00157130
## 82  1360        84        0        1 0.6843553    0.96948574
## 83  1413        81        2        1 0.6759065    0.93725762
## 84  1427        79        1        1 0.6673507    0.90525292
## 85  1434        78        1        1 0.6587949    0.87384689
## 86  1444        75        1        1 0.6500110    0.84219024
## 87  1657        70        4        1 0.6407251    0.80933332
## 88  1690        68        1        1 0.6313027    0.77659438
## 89  1786        65        2        1 0.6215903    0.74344304
## 90  1847        63        1        1 0.6117238    0.71034551
## 91  1925        61        1        1 0.6016956    0.67726663
## 92  2224        58        2        1 0.5913215    0.64360415
## 93  2256        55        2        1 0.5805702    0.60927574
## 94  2297        53        1        1 0.5696161    0.57484386
## 95  2386        48        4        1 0.5577491    0.53811778
## 96  2400        47        0        1 0.5458821    0.50194459
## 97  2466        45        1        1 0.5337513    0.46549348
## 98  2689        38        6        1 0.5197053    0.42389370
## 99  2769        35        2        1 0.5048565    0.38055644
## 100 2847        33        1        1 0.4895578    0.33651853
## 101 3086        30        2        1 0.4732393    0.29014617
## 102 3090        29        0        1 0.4569207    0.24430907
## 103 3170        25        3        1 0.4386438    0.19350282
## 104 3282        24        0        1 0.4203670    0.14314646
## 105 3358        22        1        1 0.4012594    0.09085824
## 106 3574        20        1        1 0.3811964    0.03620720
## 107 3584        18        1        1 0.3600189   -0.02136890
## 108 3839        14        3        1 0.3343032   -0.09139966
## 109 3853        13        0        1 0.3085876   -0.16190584
## 110 4079         9        3        1 0.2743001   -0.25737690
## 111 4191         8        0        1 0.2400126   -0.35561916
## 
## Hasil transformasi minus log-log untuk variabel: SGOT_cat 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1    191         6        0        1 0.8333333    1.70198336
## 2   2466         4        1        1 0.6250000    0.75501486
## 3   3090         1        2        1 0.0000000          -Inf
## 4     41       270        0        1 0.9962963    5.59656724
## 5     51       269        0        1 0.9925926    4.90155959
## 6     71       268        0        1 0.9888889    4.49422822
## 7     77       267        0        1 0.9851852    4.20467406
## 8    110       266        0        1 0.9814815    3.97965254
## 9    131       265        0        1 0.9777778    3.79544710
## 10   140       264        0        1 0.9740741    3.63940660
## 11   179       263        0        1 0.9703704    3.50397938
## 12   186       262        0        1 0.9666667    3.38429449
## 13   198       261        0        1 0.9629630    3.27702605
## 14   216       260        0        1 0.9592593    3.17980182
## 15   223       259        0        1 0.9555556    3.09087024
## 16   264       258        0        1 0.9518519    3.00890112
## 17   304       257        0        1 0.9481481    2.93286049
## 18   321       256        0        1 0.9444444    2.86192868
## 19   326       255        0        1 0.9407407    2.79544487
## 20   334       254        0        1 0.9370370    2.73286859
## 21   348       253        0        1 0.9333333    2.67375209
## 22   388       252        0        1 0.9296296    2.61772031
## 23   400       251        0        1 0.9259259    2.56445594
## 24   460       250        0        1 0.9222222    2.51368814
## 25   515       249        0        1 0.9185185    2.46518387
## 26   549       247        1        1 0.9147998    2.41855712
## 27   552       246        0        1 0.9110811    2.37383044
## 28   597       245        0        1 0.9073624    2.33084750
## 29   611       244        0        1 0.9036437    2.28947041
## 30   673       243        0        1 0.8999250    2.24957695
## 31   694       242        0        1 0.8962063    2.21105828
## 32   733       240        1        1 0.8924721    2.17366442
## 33   750       238        1        1 0.8887223    2.13732052
## 34   762       237        0        1 0.8849724    2.10210559
## 35   769       236        0        1 0.8812225    2.06794669
## 36   786       235        0        1 0.8774726    2.03477763
## 37   790       233        1        1 0.8737066    2.00240178
## 38   797       232        0        1 0.8699406    1.97090799
## 39   799       231        0        1 0.8661747    1.94024539
## 40   850       228        2        1 0.8623757    1.91010863
## 41   853       227        0        1 0.8585766    1.88072630
## 42   859       226        0        1 0.8547776    1.85205792
## 43   890       224        1        1 0.8509617    1.82394265
## 44   904       222        1        1 0.8471285    1.79635274
## 45   930       221        0        1 0.8432953    1.76938349
## 46   943       219        1        1 0.8394447    1.74288531
## 47   974       218        0        1 0.8355940    1.71695403
## 48   980       217        0        1 0.8317434    1.69156295
## 49   999       215        1        1 0.8278748    1.66657261
## 50  1012       214        0        1 0.8240062    1.64207879
## 51  1077       211        2        1 0.8201010    1.61783396
## 52  1080       210        0        1 0.8161957    1.59405140
## 53  1083       209        0        1 0.8122905    1.57071121
## 54  1152       206        2        1 0.8083473    1.54757424
## 55  1165       204        1        1 0.8043848    1.52474078
## 56  1170       203        0        1 0.8004223    1.50230805
## 57  1191       202        0        2 0.7924974    1.45858084
## 58  1212       200        0        1 0.7885349    1.43725664
## 59  1235       196        3        1 0.7845117    1.41595500
## 60  1297       191        4        1 0.7804044    1.39455605
## 61  1356       183        7        1 0.7761399    1.37269702
## 62  1360       182        0        1 0.7718753    1.35118900
## 63  1413       176        5        1 0.7674897    1.32942179
## 64  1427       173        2        1 0.7630533    1.30775180
## 65  1434       171        2        1 0.7585910    1.28629531
## 66  1444       168        1        1 0.7540756    1.26491732
## 67  1487       164        3        1 0.7494776    1.24348018
## 68  1536       161        2        1 0.7448225    1.22210483
## 69  1576       156        4        1 0.7400479    1.20051113
## 70  1657       150        5        1 0.7351143    1.17853482
## 71  1682       148        1        1 0.7301473    1.15674266
## 72  1690       147        0        2 0.7202133    1.11410827
## 73  1741       142        3        1 0.7151414    1.09280423
## 74  1786       135        6        1 0.7098441    1.07087077
## 75  1827       132        2        1 0.7044665    1.04892377
## 76  1847       129        2        1 0.6990055    1.02695220
## 77  1925       125        3        1 0.6934134    1.00476988
## 78  2055       115        9        1 0.6873837    0.98119583
## 79  2090       114        0        1 0.6813541    0.95796416
## 80  2105       113        0        1 0.6753244    0.93506045
## 81  2224       106        7        1 0.6689534    0.91120151
## 82  2256       102        2        1 0.6623950    0.88699125
## 83  2288       100        1        1 0.6557711    0.86288384
## 84  2297        98        1        1 0.6490795    0.83886681
## 85  2386        89        8        1 0.6417865    0.81305846
## 86  2400        88        0        1 0.6344935    0.78761554
## 87  2419        87        0        1 0.6272005    0.76252066
## 88  2540        78        8        1 0.6191594    0.73523562
## 89  2583        73        4        1 0.6106778    0.70686928
## 90  2598        72        0        1 0.6021962    0.67890498
## 91  2689        68        3        1 0.5933403    0.65011233
## 92  2769        65        2        1 0.5842120    0.62084266
## 93  2796        63        1        1 0.5749388    0.59150858
## 94  2847        60        2        1 0.5653565    0.56159487
## 95  3086        51        8        1 0.5542711    0.52746087
## 96  3170        45        5        1 0.5419539    0.49008509
## 97  3244        44        0        1 0.5296368    0.45324282
## 98  3282        42        1        1 0.5170264    0.41602870
## 99  3358        39        2        1 0.5037693    0.37740720
## 100 3395        37        1        1 0.4901539    0.33822365
## 101 3428        35        1        1 0.4761495    0.29837459
## 102 3445        34        1        1 0.4621451    0.25893098
## 103 3574        32        0        1 0.4477031    0.21862254
## 104 3584        29        2        1 0.4322651    0.17588275
## 105 3762        25        3        1 0.4149745    0.12835816
## 106 3839        22        2        1 0.3961120    0.07681806
## 107 3853        21        0        1 0.3772495    0.02547321
## 108 4079        14        6        1 0.3503031   -0.04779583
## 109 4191        10        3        1 0.3152728   -0.14350881
## 
## Hasil transformasi minus log-log untuk variabel: Platelets_cat 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1     41        32        0        1 0.9687500    3.44990355
## 2     77        31        0        1 0.9375000    2.74049301
## 3    110        30        0        1 0.9062500    2.31830731
## 4    140        29        0        1 0.8750000    2.01341868
## 5    223        28        0        1 0.8437500    1.77255092
## 6    304        27        0        1 0.8125000    1.57195253
## 7    321        26        0        1 0.7812500    1.39893359
## 8    326        25        0        1 0.7500000    1.24589932
## 9    348        24        0        1 0.7187500    1.10793051
## 10   388        23        0        1 0.6875000    0.98164706
## 11   549        22        0        1 0.6562500    0.86461553
## 12   552        21        0        1 0.6250000    0.75501486
## 13   762        20        0        1 0.5937500    0.65143549
## 14   850        19        0        1 0.5625000    0.55275214
## 15  1191        18        0        1 0.5312500    0.45803939
## 16  2105        11        6        1 0.4829545    0.31768401
## 17  2598         6        4        1 0.4024621    0.09414114
## 18  3445         4        1        1 0.3018466   -0.18051690
## 19  4079         2        1        1 0.1509233   -0.63709709
## 20  4191         1        0        1 0.0000000          -Inf
## 21    51       236        0        1 0.9957627    5.46170941
## 22    71       235        0        1 0.9915254    4.76643230
## 23   131       234        0        1 0.9872881    4.35882966
## 24   179       233        0        1 0.9830508    4.06900240
## 25   186       232        0        1 0.9788136    3.84370595
## 26   191       231        0        1 0.9745763    3.65922372
## 27   198       230        0        1 0.9703390    3.50290453
## 28   216       229        0        1 0.9661017    3.36719673
## 29   264       228        0        1 0.9618644    3.24722932
## 30   334       227        0        1 0.9576271    3.13967642
## 31   400       226        0        1 0.9533898    3.04216576
## 32   460       225        0        1 0.9491525    2.95294575
## 33   515       224        0        1 0.9449153    2.87068619
## 34   597       222        1        1 0.9406589    2.79402135
## 35   611       221        0        1 0.9364025    2.72250615
## 36   673       220        0        1 0.9321461    2.65547171
## 37   694       219        0        1 0.9278898    2.59237134
## 38   733       217        1        1 0.9236138    2.53248519
## 39   750       215        1        1 0.9193179    2.47547156
## 40   769       214        0        1 0.9150220    2.42128799
## 41   786       213        0        1 0.9107261    2.36965426
## 42   790       211        1        1 0.9064099    2.32010106
## 43   797       210        0        1 0.9020937    2.27266778
## 44   799       209        0        1 0.8977774    2.22717056
## 45   853       206        2        1 0.8934193    2.18303211
## 46   859       205        0        1 0.8890611    2.14055740
## 47   890       203        1        1 0.8846815    2.09941928
## 48   904       201        1        1 0.8802801    2.05952046
## 49   930       200        0        1 0.8758787    2.02096401
## 50   943       198        1        1 0.8714551    1.98347014
## 51   980       197        0        1 0.8670315    1.94715080
## 52   999       195        1        1 0.8625851    1.91175038
## 53  1012       194        0        1 0.8581388    1.87738673
## 54  1077       191        2        1 0.8536460    1.84365036
## 55  1080       190        0        1 0.8491531    1.81084566
## 56  1083       189        0        1 0.8446602    1.77891717
## 57  1152       186        2        1 0.8401190    1.74748405
## 58  1165       184        1        1 0.8355532    1.71668184
## 59  1170       183        0        1 0.8309873    1.68663882
## 60  1191       182        0        1 0.8264214    1.65731375
## 61  1212       181        0        1 0.8218556    1.62866861
## 62  1235       176        4        1 0.8171859    1.60003908
## 63  1297       171        4        1 0.8124071    1.57140180
## 64  1356       164        6        1 0.8074534    1.54238704
## 65  1360       163        0        1 0.8024997    1.51401937
## 66  1413       158        4        1 0.7974206    1.48557090
## 67  1427       155        2        1 0.7922759    1.45737978
## 68  1434       153        2        1 0.7870976    1.42960702
## 69  1444       150        1        1 0.7818503    1.40204995
## 70  1487       147        2        1 0.7765316    1.37469020
## 71  1536       145        1        1 0.7711762    1.34769546
## 72  1576       140        4        1 0.7656678    1.32048090
## 73  1657       134        5        1 0.7599539    1.29281298
## 74  1682       132        1        1 0.7541966    1.26548608
## 75  1690       131        0        2 0.7426822    1.21238455
## 76  1741       126        3        1 0.7367879    1.18595206
## 77  1786       120        5        1 0.7306480    1.15892462
## 78  1827       117        2        1 0.7244031    1.13193987
## 79  1847       114        2        1 0.7180487    1.10497896
## 80  1925       110        3        1 0.7115210    1.07777979
## 81  2055       101        8        1 0.7044762    1.04896345
## 82  2090       100        0        1 0.6974315    1.02067672
## 83  2224        94        6        1 0.6900120    0.99142845
## 84  2288        90        2        1 0.6823452    0.96175999
## 85  2386        83        6        1 0.6741242    0.93053938
## 86  2400        82        0        1 0.6659031    0.89989822
## 87  2419        81        0        1 0.6576821    0.86980426
## 88  2466        76        4        1 0.6490284    0.83868455
## 89  2540        71        4        1 0.6398872    0.80639779
## 90  2583        67        3        1 0.6303366    0.77327040
## 91  2689        63        3        1 0.6203313    0.73918767
## 92  2769        60        2        1 0.6099924    0.70459493
## 93  2796        58        1        1 0.5994753    0.67001577
## 94  2847        56        1        1 0.5887704    0.63540858
## 95  3086        46        9        1 0.5759710    0.59475463
## 96  3090        45        0        1 0.5631717    0.55482841
## 97  3170        40        4        1 0.5490924    0.51167835
## 98  3244        39        0        1 0.5350131    0.46926140
## 99  3282        38        0        1 0.5209338    0.42750780
## 100 3358        35        2        1 0.5060500    0.38401699
## 101 3395        33        1        1 0.4907151    0.33982975
## 102 3428        31        1        1 0.4748856    0.29479889
## 103 3574        29        1        1 0.4585102    0.24875287
## 104 3584        26        2        1 0.4408752    0.19967929
## 105 3762        22        3        1 0.4208354    0.14443244
## 106 3839        19        2        1 0.3986862    0.08383758
## 107 3853        18        0        1 0.3765370    0.02353579
## 108  974         8        0        1 0.8750000    2.01341868
## 109 2256         7        0        1 0.7500000    1.24589932
## 110 2297         5        1        1 0.6000000    0.67172699
## 
## Hasil transformasi minus log-log untuk variabel: Prothrombin_cat 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1     51       245        0        1 0.9959184    5.49921391
## 2     71       244        0        1 0.9918367    4.80401545
## 3    110       243        0        1 0.9877551    4.39649200
## 4    198       242        0        1 0.9836735    4.10674450
## 5    264       241        0        1 0.9795918    3.88152837
## 6    321       240        0        1 0.9755102    3.69712703
## 7    334       239        0        1 0.9714286    3.54088930
## 8    348       238        0        1 0.9673469    3.40526356
## 9    460       237        0        1 0.9632653    3.28537879
## 10   515       236        0        1 0.9591837    3.17790913
## 11   611       234        1        1 0.9550846    3.08008483
## 12   673       233        0        1 0.9509855    2.99061658
## 13   694       232        0        1 0.9468864    2.90815920
## 14   733       230        1        1 0.9427695    2.83134717
## 15   750       228        1        1 0.9386346    2.75941163
## 16   762       227        0        1 0.9344996    2.69201885
## 17   769       226        0        1 0.9303647    2.62861121
## 18   786       225        0        1 0.9262297    2.56872770
## 19   790       223        1        1 0.9220762    2.51173485
## 20   797       222        0        1 0.9179227    2.45757884
## 21   799       221        0        1 0.9137692    2.40597856
## 22   853       218        2        1 0.9095776    2.35625048
## 23   859       217        0        1 0.9053860    2.30866490
## 24   890       215        1        1 0.9011749    2.26282725
## 25   904       213        1        1 0.8969441    2.21859540
## 26   930       212        0        1 0.8927132    2.17604135
## 27   943       210        1        1 0.8884622    2.13484273
## 28   974       209        0        1 0.8842112    2.09508844
## 29   980       208        0        1 0.8799602    2.05667354
## 30   999       206        1        1 0.8756885    2.01932652
## 31  1077       203        2        1 0.8713748    1.98280048
## 32  1080       202        0        1 0.8670610    1.94738989
## 33  1083       201        0        1 0.8627473    1.91302277
## 34  1152       198        2        1 0.8583900    1.87930135
## 35  1165       196        1        1 0.8540104    1.84635177
## 36  1191       195        0        2 0.8452514    1.78307001
## 37  1212       193        0        1 0.8408718    1.75263854
## 38  1235       188        4        1 0.8363991    1.72233014
## 39  1297       183        4        1 0.8318286    1.69211950
## 40  1360       176        6        1 0.8271023    1.66164283
## 41  1413       170        5        1 0.8222370    1.63103653
## 42  1427       167        2        1 0.8173134    1.60081214
## 43  1434       165        2        1 0.8123600    1.57112308
## 44  1444       162        1        1 0.8073455    1.54176229
## 45  1487       158        3        1 0.8022357    1.51252510
## 46  1536       155        2        1 0.7970600    1.48357483
## 47  1657       145        9        1 0.7915630    1.45352100
## 48  1682       143        1        1 0.7860276    1.42394061
## 49  1690       142        0        2 0.7749568    1.36669557
## 50  1741       137        3        1 0.7693002    1.33836527
## 51  1786       130        6        1 0.7633825    1.30934772
## 52  1827       127        2        1 0.7573716    1.28048929
## 53  1847       124        2        1 0.7512637    1.25176871
## 54  1925       120        3        1 0.7450032    1.22292883
## 55  2055       110        9        1 0.7382305    1.19237619
## 56  2090       109        0        1 0.7314577    1.16246020
## 57  2105       108        0        1 0.7246849    1.13314696
## 58  2224       101        7        1 0.7175098    1.10271485
## 59  2288        96        3        1 0.7100358    1.07165907
## 60  2297        94        1        1 0.7024822    1.04090428
## 61  2386        85        8        1 0.6942177    1.00794105
## 62  2400        84        0        1 0.6859532    0.97565373
## 63  2419        83        0        1 0.6776887    0.94400317
## 64  2466        79        3        1 0.6691104    0.91178530
## 65  2540        74        4        1 0.6600683    0.87848475
## 66  2583        69        4        1 0.6505021    0.84394521
## 67  2598        68        0        1 0.6409359    0.81007259
## 68  2689        63        4        1 0.6307623    0.77473449
## 69  2769        60        2        1 0.6202496    0.73891213
## 70  2796        58        1        1 0.6095557    0.70314706
## 71  2847        55        2        1 0.5984729    0.66675043
## 72  3086        45        9        1 0.5851735    0.62390666
## 73  3244        39        5        1 0.5701690    0.57656939
## 74  3358        35        3        1 0.5538785    0.52626081
## 75  3395        34        0        1 0.5375879    0.47696708
## 76  3428        32        1        1 0.5207883    0.42707954
## 77  3445        31        1        1 0.5039887    0.37804235
## 78  3574        29        0        1 0.4866098    0.32809748
## 79  3584        26        2        1 0.4678940    0.27507717
## 80  3839        20        5        1 0.4444993    0.20972547
## 81  3853        19        0        1 0.4211046    0.14517141
## 82  4079        13        5        1 0.3887119    0.05665847
## 83  4191         9        3        1 0.3455217   -0.06081262
## 84    41        31        0        1 0.9677419    3.41763709
## 85    77        30        0        1 0.9354839    2.70767965
## 86   131        29        0        1 0.9032258    2.28491519
## 87   140        28        0        1 0.8709677    1.97941278
## 88   179        27        0        1 0.8387097    1.73789269
## 89   186        26        0        1 0.8064516    1.53659934
## 90   191        25        0        1 0.7741935    1.36283813
## 91   216        24        0        1 0.7419355    1.20900884
## 92   223        23        0        1 0.7096774    1.07018592
## 93   304        22        0        1 0.6774194    0.94298188
## 94   326        21        0        1 0.6451613    0.82495450
## 95   388        20        0        1 0.6129032    0.71427230
## 96   400        19        0        1 0.5806452    0.60951318
## 97   549        18        0        1 0.5483871    0.50953669
## 98   552        17        0        1 0.5161290    0.41339877
## 99   597        16        0        1 0.4838710    0.32029204
## 100  850        15        0        1 0.4516129    0.22950138
## 101 1012        14        0        1 0.4193548    0.14036860
## 102 1170        13        0        1 0.3870968    0.05226160
## 103 1356        11        1        1 0.3519062   -0.04343369
## 104 1576        10        0        1 0.3167155   -0.13954561
## 105 2256         9        0        1 0.2815249   -0.23707351
## 106 3090         7        1        1 0.2413071   -0.35184276
## 107 3170         6        0        1 0.2010892   -0.47250458
## 108 3282         5        0        1 0.1608714   -0.60275742
## 109 3762         3        1        1 0.1072476   -0.80317363
## 
## Hasil transformasi minus log-log untuk variabel: Age_cat 
##     Time N_at_risk Censored Observed  Survival MinusLogLog_S
## 1    198        53        0        1 0.9811321   3.960782934
## 2    733        52        0        1 0.9622642   3.257973244
## 3    790        49        2        1 0.9426261   2.828768580
## 4    974        46        2        1 0.9221342   2.512510456
## 5   1212        44        1        1 0.9011766   2.262845351
## 6   1427        35        8        1 0.8754287   2.017093945
## 7   1434        34        1        1 0.8496808   1.814652570
## 8   1847        24        8        1 0.8142775   1.582532592
## 9   2105        16        7        1 0.7633851   1.309360622
## 10  2689         9        6        1 0.6785646   0.947328292
## 11  3244         7        1        1 0.5816268   0.612625183
## 12  3428         6        0        1 0.4846890   0.322621541
## 13    71       174        0        1 0.9942529   5.156174831
## 14    77       173        0        1 0.9885057   4.460133276
## 15   110       172        0        1 0.9827586   4.051759742
## 16   131       171        0        1 0.9770115   3.761155044
## 17   186       170        0        1 0.9712644   3.535074515
## 18   216       169        0        1 0.9655172   3.349801478
## 19   264       168        0        1 0.9597701   3.192684658
## 20   304       167        0        1 0.9540230   3.056172307
## 21   321       166        0        1 0.9482759   2.935393334
## 22   326       165        0        1 0.9425287   2.827021738
## 23   400       164        0        1 0.9367816   2.728685169
## 24   460       163        0        1 0.9310345   2.638631924
## 25   515       162        0        1 0.9252874   2.555531698
## 26   549       160        1        1 0.9195043   2.477884794
## 27   552       159        0        1 0.9137213   2.405396456
## 28   597       158        0        1 0.9079382   2.337394531
## 29   673       157        0        1 0.9021552   2.273329810
## 30   694       156        0        1 0.8963721   2.212747748
## 31   750       154        1        1 0.8905515   2.154904037
## 32   769       153        0        1 0.8847309   2.099875181
## 33   786       152        0        1 0.8789103   2.047381806
## 34   797       151        0        1 0.8730897   1.997183879
## 35   853       149        1        1 0.8672301   1.948757387
## 36   859       148        0        1 0.8613704   1.902262116
## 37   943       146        1        1 0.8554706   1.857235778
## 38   980       145        0        1 0.8495708   1.813857959
## 39   999       143        1        1 0.8436298   1.771712432
## 40  1077       141        1        1 0.8376466   1.730707517
## 41  1080       140        0        1 0.8316634   1.691041147
## 42  1083       139        0        1 0.8256802   1.652618102
## 43  1165       137        1        1 0.8196533   1.615084826
## 44  1170       136        0        1 0.8136265   1.578647309
## 45  1191       135        0        2 0.8015727   1.508780429
## 46  1297       129        4        1 0.7953590   1.474200547
## 47  1356       125        3        1 0.7889961   1.439721004
## 48  1413       121        3        1 0.7824755   1.405303199
## 49  1444       118        2        1 0.7758443   1.371195476
## 50  1536       115        2        1 0.7690979   1.337363094
## 51  1657       107        7        1 0.7619100   1.302222431
## 52  1690       105        1        2 0.7473975   1.233888707
## 53  1741       102        1        1 0.7400700   1.200610327
## 54  1827        97        4        1 0.7324405   1.166762996
## 55  1925        93        3        1 0.7245648   1.132632021
## 56  2055        88        4        1 0.7163311   1.097774120
## 57  2224        82        6        1 0.7075953   1.061654907
## 58  2256        79        1        1 0.6986384   1.025486486
## 59  2288        78        0        1 0.6896815   0.990138145
## 60  2297        76        1        1 0.6806068   0.955107993
## 61  2386        71        4        1 0.6710207   0.918906087
## 62  2400        70        0        1 0.6614347   0.883475194
## 63  2419        69        0        1 0.6518487   0.848765827
## 64  2466        64        4        1 0.6416636   0.812626637
## 65  2583        56        7        1 0.6302053   0.772819105
## 66  2598        55        0        1 0.6187470   0.733846760
## 67  2769        49        5        1 0.6061195   0.691791999
## 68  2847        45        3        1 0.5926502   0.647885317
## 69  3086        37        7        1 0.5766326   0.596837718
## 70  3170        32        4        1 0.5586129   0.540771941
## 71  3282        30        1        1 0.5399924   0.484183482
## 72  3358        28        1        1 0.5207070   0.426840277
## 73  3395        27        0        1 0.5014216   0.370617256
## 74  3445        25        1        1 0.4813647   0.313163864
## 75  3762        19        5        1 0.4560297   0.241820232
## 76  3839        17        1        1 0.4292044   0.167446414
## 77  3853        16        0        1 0.4023792   0.093914647
## 78  4079        11        4        1 0.3657992  -0.005654623
## 79  4191         9        1        1 0.3251549  -0.116407580
## 80    41        49        0        1 0.9795918   3.881528369
## 81    51        48        0        1 0.9591837   3.177909127
## 82   140        47        0        1 0.9387755   2.761784869
## 83   179        46        0        1 0.9183673   2.463249175
## 84   191        45        0        1 0.8979592   2.229049689
## 85   223        44        0        1 0.8775510   2.035461538
## 86   334        43        0        1 0.8571429   1.869824714
## 87   348        42        0        1 0.8367347   1.724578142
## 88   388        41        0        1 0.8163265   1.594840751
## 89   611        40        0        1 0.7959184   1.477275855
## 90   762        39        0        1 0.7755102   1.369499632
## 91   799        38        0        1 0.7551020   1.269748053
## 92   850        37        0        1 0.7346939   1.176677534
## 93   890        36        0        1 0.7142857   1.089239640
## 94   904        35        0        1 0.6938776   1.006599065
## 95   930        34        0        1 0.6734694   0.928078089
## 96  1012        32        1        1 0.6524235   0.850827400
## 97  1152        30        1        1 0.6306760   0.774437529
## 98  1235        28        1        1 0.6081519   0.698500221
## 99  1360        25        2        1 0.5838258   0.619613069
## 100 1487        23        1        1 0.5584421   0.540246903
## 101 1576        22        0        1 0.5330583   0.463426262
## 102 1682        20        1        1 0.5064054   0.385048408
## 103 1786        17        2        1 0.4766169   0.299697544
## 104 2090        15        1        1 0.4448424   0.210677586
## 105 2540        11        3        1 0.4044022   0.099438783
## 106 2796        10        0        1 0.3639620  -0.010648984
## 107 3090         7        2        1 0.3119674  -0.152597961
## 108 3574         3        3        1 0.2079783  -0.451280487
## 109 3584         2        0        1 0.1039891  -0.816898528
variables = c("Drug", "Sex", "Ascites", "Spiders", 
               "Bilirubin_cat", "Cholesterol_cat", "Alk_Phos_cat", 
               "SGOT_cat", "Platelets_cat", "Prothrombin_cat", "Age_cat")

#simpan hasil transformasi kedalam satu dataframe
logtransf_results = data.frame()
for (var in variables) {
  
  temp_df = results_list[[var]]
  temp_df$Variable_type = var
  logtransf_results = rbind(logtransf_results, temp_df)
}

print(logtransf_results)
##      Time N_at_risk Censored Observed   Survival MinusLogLog_S   Variable_type
## 1      41       136        0        1 0.99264706   4.908967102            Drug
## 2      71       135        0        1 0.98529412   4.212109308            Drug
## 3     131       134        0        1 0.97794118   3.802910449            Drug
## 4     140       133        0        1 0.97058824   3.511471176            Drug
## 5     179       132        0        1 0.96323529   3.284546653            Drug
## 6     198       131        0        1 0.95588235   3.098420025            Drug
## 7     223       130        0        1 0.94852941   2.940439840            Drug
## 8     334       129        0        1 0.94117647   2.803054168            Drug
## 9     348       128        0        1 0.93382353   2.681391728            Drug
## 10    388       127        0        1 0.92647059   2.572126326            Drug
## 11    400       126        0        1 0.91911765   2.472885414            Drug
## 12    515       125        0        1 0.91176471   2.381917085            Drug
## 13    673       123        1        1 0.90435198   2.297233133            Drug
## 14    694       122        0        1 0.89693926   2.218546105            Drug
## 15    750       119        2        1 0.88940196   2.143822221            Drug
## 16    762       118        0        1 0.88186465   2.073724410            Drug
## 17    799       117        0        1 0.87432735   2.007675959            Drug
## 18    904       113        3        1 0.86658994   1.943587194            Drug
## 19    980       111        1        1 0.85878282   1.882302213            Drug
## 20    999       110        0        1 0.85097571   1.824044889            Drug
## 21   1012       109        0        1 0.84316859   1.768501914            Drug
## 22   1077       108        0        1 0.83536147   1.715405578            Drug
## 23   1083       107        0        1 0.82755436   1.664525308            Drug
## 24   1152       106        0        1 0.81974724   1.615661084            Drug
## 25   1170       104        1        1 0.81186505   1.568194528            Drug
## 26   1191       103        0        2 0.79610068   1.478279778            Drug
## 27   1235        99        2        1 0.78805926   1.434720258            Drug
## 28   1297        96        2        1 0.77985031   1.391695786            Drug
## 29   1360        93        2        1 0.77146483   1.349136543            Drug
## 30   1434        88        4        1 0.76269818   1.306031754            Drug
## 31   1576        82        5        1 0.75339698   1.261732616            Drug
## 32   1657        78        3        1 0.74373805   1.217171548            Drug
## 33   1682        77        0        1 0.73407911   1.173965963            Drug
## 34   1690        76        0        2 0.71476124   1.091219516            Drug
## 35   1741        72        2        1 0.70483400   1.050413831            Drug
## 36   1827        67        4        1 0.69431409   1.008321481            Drug
## 37   1925        63        3        1 0.68329323   0.965399092            Drug
## 38   2055        57        5        1 0.67130563   0.919970595            Drug
## 39   2105        56        0        1 0.65931803   0.875750540            Drug
## 40   2224        54        1        1 0.64710844   0.831854463            Drug
## 41   2256        52        1        1 0.63466404   0.788206526            Drug
## 42   2288        50        1        1 0.62197076   0.744730640            Drug
## 43   2297        49        0        1 0.60927748   0.702225305            Drug
## 44   2386        43        5        1 0.59510824   0.655828321            Drug
## 45   2400        42        0        1 0.58093899   0.610444271            Drug
## 46   2540        37        4        1 0.56523794   0.561227207            Drug
## 47   2583        35        1        1 0.54908829   0.511665912            Drug
## 48   2598        34        0        1 0.53293863   0.463069324            Drug
## 49   2689        32        1        1 0.51628430   0.413853643            Drug
## 50   3086        22        9        1 0.49281683   0.345851280            Drug
## 51   3282        18        3        1 0.46543812   0.268172129            Drug
## 52   3574        15        2        1 0.43440891   0.181798892            Drug
## 53   3584        14        0        1 0.40337970   0.096646401            Drug
## 54   4079         6        7        1 0.33614975  -0.086359817            Drug
## 55   4191         5        0        1 0.26891980  -0.272575096            Drug
## 56     51       140        0        1 0.99285714   4.938060319            Drug
## 57     77       139        0        1 0.98571429   4.241309500            Drug
## 58    110       138        0        1 0.97857143   3.832218936            Drug
## 59    186       137        0        1 0.97142857   3.540889304            Drug
## 60    191       136        0        1 0.96428571   3.314075796            Drug
## 61    216       135        0        1 0.95714286   3.128061585            Drug
## 62    264       134        0        1 0.95000000   2.970195249            Drug
## 63    304       133        0        1 0.94285714   2.832924885            Drug
## 64    321       132        0        1 0.93571429   2.711379245            Drug
## 65    326       131        0        1 0.92857143   2.602232166            Drug
## 66    460       130        0        1 0.92142857   2.503111131            Drug
## 67    549       129        0        1 0.91428571   2.412264269            Drug
## 68    552       128        0        1 0.90714286   2.328361097            Drug
## 69    597       127        0        1 0.90000000   2.250367327            Drug
## 70    611       126        0        1 0.89285714   2.177462963            Drug
## 71    733       125        0        1 0.88571429   2.108986882            Drug
## 72    769       124        0        1 0.87857143   2.044398255            Drug
## 73    786       123        0        1 0.87142857   1.983249003            Drug
## 74    790       121        1        1 0.86422668   1.924695514            Drug
## 75    797       120        0        1 0.85702479   1.868931504            Drug
## 76    850       118        1        1 0.84976187   1.815238231            Drug
## 77    853       117        0        1 0.84249895   1.763855256            Drug
## 78    859       116        0        1 0.83523603   1.714571085            Drug
## 79    890       115        0        1 0.82797311   1.667201534            Drug
## 80    930       114        0        1 0.82071018   1.621585212            Drug
## 81    943       113        0        1 0.81344726   1.577579894            Drug
## 82    974       112        0        1 0.80618434   1.535059586            Drug
## 83   1080       108        3        1 0.79871967   1.492787757            Drug
## 84   1165       105        2        1 0.79111282   1.451090207            Drug
## 85   1212       104        0        1 0.78350596   1.410682927            Drug
## 86   1356        94        9        1 0.77517079   1.367779240            Drug
## 87   1413        92        1        1 0.76674502   1.325760218            Drug
## 88   1427        89        2        1 0.75812991   1.284096960            Drug
## 89   1444        86        2        1 0.74931445   1.242725543            Drug
## 90   1487        84        1        1 0.74039404   1.202065445            Drug
## 91   1536        82        1        1 0.73136484   1.162054303            Drug
## 92   1786        71       10        1 0.72106393   1.117711071            Drug
## 93   1847        68        2        1 0.71046005   1.073404978            Drug
## 94   2090        62        5        1 0.69900101   1.026934379            Drug
## 95   2419        50       11        1 0.68502099   0.972052428            Drug
## 96   2466        47        2        1 0.67044608   0.916760841            Drug
## 97   2769        37        9        1 0.65232591   0.850477302            Drug
## 98   2796        35        1        1 0.63368803   0.784827232            Drug
## 99   2847        32        2        1 0.61388528   0.717548055            Drug
## 100  3090        30        1        1 0.59342244   0.650377462            Drug
## 101  3170        27        2        1 0.57144383   0.580552533            Drug
## 102  3244        26        0        1 0.54946522   0.512811256            Drug
## 103  3358        24        1        1 0.52657083   0.444149674            Drug
## 104  3395        22        1        1 0.50263580   0.374127162            Drug
## 105  3428        20        1        1 0.47750401   0.302210126            Drug
## 106  3445        19        1        1 0.45237222   0.231616913            Drug
## 107  3762        13        4        1 0.41757435   0.135484549            Drug
## 108  3839        11        1        1 0.37961305   0.031900621            Drug
## 109  3853        10        0        1 0.34165174  -0.071355872            Drug
## 110    41       242        0        1 0.99586777   5.486868044             Sex
## 111    51       241        0        1 0.99173554   4.791644014             Sex
## 112    71       240        0        1 0.98760331   4.384094834             Sex
## 113    77       239        0        1 0.98347107   4.094321413             Sex
## 114   110       238        0        1 0.97933884   3.869079183             Sex
## 115   131       237        0        1 0.97520661   3.684651559             Sex
## 116   179       236        0        1 0.97107438   3.528387369             Sex
## 117   186       235        0        1 0.96694215   3.392734965             Sex
## 118   198       234        0        1 0.96280992   3.272823360             Sex
## 119   216       233        0        1 0.95867769   3.165326658             Sex
## 120   223       232        0        1 0.95454545   3.067872615             Sex
## 121   264       231        0        1 0.95041322   2.978709640             Sex
## 122   304       230        0        1 0.94628099   2.896507537             Sex
## 123   321       229        0        1 0.94214876   2.820232311             Sex
## 124   326       228        0        1 0.93801653   2.749064266             Sex
## 125   334       227        0        1 0.93388430   2.682342588             Sex
## 126   348       226        0        1 0.92975207   2.619526764             Sex
## 127   388       225        0        1 0.92561983   2.560169036             Sex
## 128   400       224        0        1 0.92148760   2.503894324             Sex
## 129   460       223        0        1 0.91735537   2.450385297             Sex
## 130   515       222        0        1 0.91322314   2.399371090             Sex
## 131   549       221        0        1 0.90909091   2.350618656             Sex
## 132   597       220        0        1 0.90495868   2.303926028             Sex
## 133   673       219        0        1 0.90082645   2.259117034             Sex
## 134   694       218        0        1 0.89669421   2.216037074             Sex
## 135   733       216        1        1 0.89254285   2.174361179             Sex
## 136   750       214        1        1 0.88837209   2.133985575             Sex
## 137   769       213        0        1 0.88420133   2.094997978             Sex
## 138   786       212        0        1 0.88003057   2.057299428             Sex
## 139   790       210        1        1 0.87583995   2.020630045             Sex
## 140   797       209        0        1 0.87164933   1.985091206             Sex
## 141   850       206        2        1 0.86741802   1.950279761             Sex
## 142   853       205        0        1 0.86318671   1.916477745             Sex
## 143   859       204        0        1 0.85895540   1.883622984             Sex
## 144   904       202        1        1 0.85470315   1.851502698             Sex
## 145   930       201        0        1 0.85045090   1.820229284             Sex
## 146   943       199        1        1 0.84617727   1.789603399             Sex
## 147   974       198        0        1 0.84190365   1.759739419             Sex
## 148   980       197        0        1 0.83763003   1.730596051             Sex
## 149  1080       193        3        1 0.83328998   1.701698016             Sex
## 150  1083       192        0        1 0.82894992   1.673467061             Sex
## 151  1165       188        3        1 0.82454062   1.645433668             Sex
## 152  1170       187        0        1 0.82013131   1.618020534             Sex
## 153  1191       186        0        2 0.81131269   1.564934366             Sex
## 154  1212       184        0        1 0.80690338   1.539206214             Sex
## 155  1235       179        4        1 0.80239554   1.513429807             Sex
## 156  1356       169        9        1 0.79764764   1.486829503             Sex
## 157  1413       163        5        1 0.79275410   1.459974494             Sex
## 158  1427       160        2        1 0.78779938   1.433336446             Sex
## 159  1434       158        2        1 0.78281331   1.407064417             Sex
## 160  1444       155        1        1 0.77776290   1.380974324             Sex
## 161  1487       151        3        1 0.77261216   1.354880596             Sex
## 162  1576       144        6        1 0.76724679   1.328226358             Sex
## 163  1657       139        4        1 0.76172703   1.301339381             Sex
## 164  1690       137        1        2 0.75060693   1.248715109             Sex
## 165  1741       132        3        1 0.74492051   1.222551796             Sex
## 166  1786       126        5        1 0.73900845   1.195852761             Sex
## 167  1827       123        2        1 0.73300025   1.169219618             Sex
## 168  1847       120        2        1 0.72689191   1.142634742             Sex
## 169  1925       116        3        1 0.72062560   1.115853407             Sex
## 170  2055       107        8        1 0.71389078   1.087597297             Sex
## 171  2090       106        0        1 0.70715596   1.059860809             Sex
## 172  2105       105        0        1 0.70042115   1.032618142             Sex
## 173  2224        98        6        1 0.69327399   1.004220744             Sex
## 174  2256        95        2        1 0.68597637   0.975743281             Sex
## 175  2288        93        1        1 0.67860028   0.947464076             Sex
## 176  2297        91        1        1 0.67114313   0.919363322             Sex
## 177  2400        82        8        1 0.66295846   0.889057586             Sex
## 178  2419        81        0        1 0.65477379   0.859283320             Sex
## 179  2466        76        4        1 0.64615834   0.828484341             Sex
## 180  2540        71        4        1 0.63705752   0.796520063             Sex
## 181  2583        66        4        1 0.62740514   0.763220357             Sex
## 182  2598        65        0        1 0.61775275   0.730502310             Sex
## 183  2769        58        6        1 0.60710184   0.695031503             Sex
## 184  2847        54        3        1 0.59585921   0.658261120             Sex
## 185  3086        45        8        1 0.58261790   0.615771939             Sex
## 186  3090        44        0        1 0.56937658   0.574096978             Sex
## 187  3170        38        5        1 0.55439299   0.527833644             Sex
## 188  3244        37        0        1 0.53940939   0.482431813             Sex
## 189  3282        35        1        1 0.52399770   0.436541014             Sex
## 190  3358        32        2        1 0.50762277   0.388583376             Sex
## 191  3428        29        2        1 0.49011853   0.338122385             Sex
## 192  3445        28        0        1 0.47261430   0.288381446             Sex
## 193  3574        27        0        1 0.45511007   0.239252632             Sex
## 194  3584        24        2        1 0.43614715   0.186599981             Sex
## 195  3762        20        3        1 0.41433979   0.126619461             Sex
## 196  3839        18        1        1 0.39132091   0.063763031             Sex
## 197  3853        17        0        1 0.36830204   0.001148734             Sex
## 198   140        34        0        1 0.97058824   3.511471176             Sex
## 199   191        33        0        1 0.94117647   2.803054168             Sex
## 200   552        31        1        1 0.91081594   2.370709292             Sex
## 201   611        30        0        1 0.88045541   2.061083123             Sex
## 202   762        29        0        1 0.85009488   1.817647802             Sex
## 203   799        28        0        1 0.81973435   1.615581947             Sex
## 204   890        26        1        1 0.78820610   1.435502784             Sex
## 205   999        25        0        1 0.75667786   1.277197231             Sex
## 206  1012        24        0        1 0.72514961   1.135139511             Sex
## 207  1077        23        0        1 0.69362137   1.005589145             Sex
## 208  1152        22        0        1 0.66209313   0.885885054             Sex
## 209  1297        21        0        1 0.63056488   0.774055276             Sex
## 210  1360        18        2        1 0.59553350   0.657205610             Sex
## 211  1536        17        0        1 0.56050212   0.546587076             Sex
## 212  1682        15        1        1 0.52313531   0.433995560             Sex
## 213  2386        11        3        1 0.47557755   0.296756034             Sex
## 214  2689        10        0        1 0.42801980   0.164184048             Sex
## 215  2796         9        0        1 0.38046204   0.034209672             Sex
## 216  3395         7        1        1 0.32611032  -0.113792455             Sex
## 217  4079         4        2        1 0.24458274  -0.342313440             Sex
## 218  4191         3        0        1 0.16305516  -0.595350610             Sex
## 219    71       257        0        1 0.99610895   5.547127398         Ascites
## 220   131       256        0        1 0.99221790   4.852025178         Ascites
## 221   140       255        0        1 0.98832685   4.444598632         Ascites
## 222   186       254        0        1 0.98443580   4.154948679         Ascites
## 223   198       253        0        1 0.98054475   3.929830757         Ascites
## 224   304       252        0        1 0.97665370   3.745528295         Ascites
## 225   321       251        0        1 0.97276265   3.589390127         Ascites
## 226   326       250        0        1 0.96887160   3.453864616         Ascites
## 227   460       249        0        1 0.96498054   3.334080785         Ascites
## 228   515       248        0        1 0.96108949   3.226712747         Ascites
## 229   552       246        1        1 0.95718263   3.129010586         Ascites
## 230   597       245        0        1 0.95327576   3.039662032         Ascites
## 231   611       244        0        1 0.94936889   2.957322642         Ascites
## 232   673       243        0        1 0.94546202   2.880948254         Ascites
## 233   694       242        0        1 0.94155515   2.809711721         Ascites
## 234   733       240        1        1 0.93763201   2.742677017         Ascites
## 235   750       238        1        1 0.93369238   2.679342421         Ascites
## 236   762       237        0        1 0.92975275   2.619536830         Ascites
## 237   769       236        0        1 0.92581312   2.562874051         Ascites
## 238   786       235        0        1 0.92187349   2.509027876         Ascites
## 239   790       233        1        1 0.91791695   2.457505175         Ascites
## 240   797       232        0        1 0.91396041   2.408300966         Ascites
## 241   799       231        0        1 0.91000387   2.361205957         Ascites
## 242   850       228        2        1 0.90601263   2.315649699         Ascites
## 243   853       227        0        1 0.90202138   2.271890482         Ascites
## 244   859       226        0        1 0.89803014   2.229784065         Ascites
## 245   890       224        1        1 0.89402107   2.189024897         Ascites
## 246   904       222        1        1 0.88999395   2.149515461         Ascites
## 247   930       221        0        1 0.88596683   2.111338750         Ascites
## 248   943       219        1        1 0.88192132   2.074235638         Ascites
## 249   974       218        0        1 0.87787581   2.038298493         Ascites
## 250   980       217        0        1 0.87383030   2.003450676         Ascites
## 251   999       215        1        1 0.86976597   1.969467742         Ascites
## 252  1012       214        0        1 0.86570164   1.936450368         Ascites
## 253  1077       211        2        1 0.86159879   1.904040174         Ascites
## 254  1080       210        0        1 0.85749594   1.872500001         Ascites
## 255  1083       209        0        1 0.85339309   1.841779852         Ascites
## 256  1152       206        2        1 0.84925040   1.811546779         Ascites
## 257  1165       204        1        1 0.84508741   1.781916804         Ascites
## 258  1170       203        0        1 0.84092442   1.752999484         Ascites
## 259  1212       202        0        1 0.83676143   1.724757402         Ascites
## 260  1235       197        4        1 0.83251391   1.696601932         Ascites
## 261  1297       192        4        1 0.82817790   1.668512482         Ascites
## 262  1356       184        7        1 0.82367693   1.640016200         Ascites
## 263  1360       183        0        1 0.81917596   1.612159786         Ascites
## 264  1413       177        5        1 0.81454785   1.584149852         Ascites
## 265  1427       174        2        1 0.80986654   1.556438487         Ascites
## 266  1444       170        3        1 0.80510262   1.528846756         Ascites
## 267  1487       166        3        1 0.80025261   1.501355804         Ascites
## 268  1536       163        2        1 0.79534308   1.474113148         Ascites
## 269  1576       158        4        1 0.79030926   1.446762510         Ascites
## 270  1657       152        5        1 0.78510986   1.419100148         Ascites
## 271  1682       150        1        1 0.77987579   1.391827200         Ascites
## 272  1690       149        0        2 0.76940766   1.338898201         Ascites
## 273  1741       144        3        1 0.76406455   1.312661079         Ascites
## 274  1786       138        5        1 0.75852785   1.285993899         Ascites
## 275  1827       135        2        1 0.75290913   1.259447685         Ascites
## 276  1847       132        2        1 0.74720527   1.233005760         Ascites
## 277  1925       128        3        1 0.74136773   1.206447487         Ascites
## 278  2055       118        9        1 0.73508495   1.178405119         Ascites
## 279  2090       117        0        1 0.72880218   1.150896770         Ascites
## 280  2105       116        0        1 0.72251940   1.123896223         Ascites
## 281  2224       109        7        1 0.71589078   1.095932889         Ascites
## 282  2256       105        2        1 0.70907277   1.067703577         Ascites
## 283  2288       103        1        1 0.70218857   1.039721055         Ascites
## 284  2297       101        1        1 0.69523621   1.011966021         Ascites
## 285  2386        92        8        1 0.68767929   0.982343221         Ascites
## 286  2400        91        0        1 0.68012238   0.953259411         Ascites
## 287  2419        90        0        1 0.67256546   0.924686306         Ascites
## 288  2466        85        4        1 0.66465293   0.895287145         Ascites
## 289  2540        80        4        1 0.65634477   0.864958401         Ascites
## 290  2583        75        4        1 0.64759350   0.833577543         Ascites
## 291  2598        74        0        1 0.63884224   0.802743900         Ascites
## 292  2689        69        4        1 0.62958366   0.770683861         Ascites
## 293  2769        66        2        1 0.62004451   0.738219838         Ascites
## 294  2796        64        1        1 0.61035632   0.705802180         Ascites
## 295  2847        61        2        1 0.60035047   0.672870801         Ascites
## 296  3086        51        9        1 0.58857890   0.634794694         Ascites
## 297  3170        45        5        1 0.57549937   0.593270798         Ascites
## 298  3244        44        0        1 0.56241983   0.552504457         Ascites
## 299  3282        42        1        1 0.54902889   0.511485468         Ascites
## 300  3358        39        2        1 0.53495122   0.469076523         Ascites
## 301  3395        37        1        1 0.52049308   0.426210793         Ascites
## 302  3428        35        1        1 0.50562185   0.382775151         Ascites
## 303  3445        34        1        1 0.49075062   0.339931354         Ascites
## 304  3574        32        0        1 0.47541466   0.296295215         Ascites
## 305  3584        29        2        1 0.45902105   0.250181809         Ascites
## 306  3762        25        3        1 0.44066021   0.199083825         Ascites
## 307  3839        22        2        1 0.42063020   0.143868970         Ascites
## 308  3853        21        0        1 0.40060019   0.089059243         Ascites
## 309  4079        14        6        1 0.37198589   0.011162723         Ascites
## 310  4191        10        3        1 0.33478730  -0.090078212         Ascites
## 311    41        19        0        1 0.94736842   2.917527168         Ascites
## 312    51        18        0        1 0.89473684   2.196194392         Ascites
## 313    77        17        0        1 0.84210526   1.761131781         Ascites
## 314   110        16        0        1 0.78947368   1.442277465         Ascites
## 315   179        15        0        1 0.73684211   1.186192975         Ascites
## 316   191        14        0        1 0.68421053   0.968928030         Ascites
## 317   216        13        0        1 0.63157895   0.777545982         Ascites
## 318   223        12        0        1 0.57894737   0.604141000         Ascites
## 319   264        11        0        1 0.52631579   0.443394593         Ascites
## 320   334        10        0        1 0.47368421   0.291403118         Ascites
## 321   348         9        0        1 0.42105263   0.145028734         Ascites
## 322   388         8        0        1 0.36842105   0.001472253         Ascites
## 323   400         7        0        1 0.31578947  -0.142089241         Ascites
## 324   549         6        0        1 0.26315789  -0.288932091         Ascites
## 325  1191         5        0        2 0.15789474  -0.612927248         Ascites
## 326  1434         3        0        1 0.10526316  -0.811504184         Ascites
## 327  3090         1        1        1 0.00000000          -Inf         Ascites
## 328    41       196        0        1 0.99489796   5.275558199         Spiders
## 329   191       195        0        1 0.98979592   4.579843612         Spiders
## 330   198       194        0        1 0.98469388   4.171800048         Spiders
## 331   223       193        0        1 0.97959184   3.881528369         Spiders
## 332   334       192        0        1 0.97448980   3.655783955         Spiders
## 333   348       191        0        1 0.96938776   3.470850172         Spiders
## 334   388       190        0        1 0.96428571   3.314075796         Spiders
## 335   552       188        1        1 0.95915653   3.177230406         Spiders
## 336   597       187        0        1 0.95402736   3.056269567         Spiders
## 337   611       186        0        1 0.94889818   2.947822841         Spiders
## 338   733       184        1        1 0.94374112   2.848979404         Spiders
## 339   769       183        0        1 0.93858407   2.758561920         Spiders
## 340   786       182        0        1 0.93342701   2.675207840         Spiders
## 341   790       181        0        1 0.92826996   2.597860070         Spiders
## 342   797       180        0        1 0.92311290   2.525681974         Spiders
## 343   799       179        0        1 0.91795584   2.458000031         Spiders
## 344   853       177        1        1 0.91276965   2.393914213         Spiders
## 345   890       175        1        1 0.90755383   2.333019543         Spiders
## 346   904       173        1        1 0.90230785   2.274974603         Spiders
## 347   930       172        0        1 0.89706187   2.219803621         Spiders
## 348   943       170        1        1 0.89178504   2.166917071         Spiders
## 349   974       169        0        1 0.88650821   2.116396879         Spiders
## 350   999       167        1        1 0.88119977   2.067742869         Spiders
## 351  1012       166        0        1 0.87589134   2.021072747         Spiders
## 352  1077       163        2        1 0.87051777   1.975679174         Spiders
## 353  1080       162        0        1 0.86514421   1.931993930         Spiders
## 354  1152       159        2        1 0.85970305   1.889361886         Spiders
## 355  1191       157        1        1 0.85422723   1.847961389         Spiders
## 356  1212       156        0        1 0.84875142   1.807956359         Spiders
## 357  1297       150        5        1 0.84309308   1.767977023         Spiders
## 358  1356       144        5        1 0.83723826   1.727959171         Spiders
## 359  1360       143        0        1 0.83138345   1.689216459         Spiders
## 360  1427       136        6        1 0.82527034   1.650029379         Spiders
## 361  1487       129        6        1 0.81887289   1.610306255         Spiders
## 362  1536       127        1        1 0.81242507   1.571508482         Spiders
## 363  1682       119        7        1 0.80559797   1.531688039         Spiders
## 364  1690       118        0        1 0.79877087   1.493073016         Spiders
## 365  1741       115        2        1 0.79182504   1.454938045         Spiders
## 366  1786       111        3        1 0.78469148   1.416899310         Spiders
## 367  2055        97       13        1 0.77660188   1.375048049         Spiders
## 368  2090        96        0        1 0.76851227   1.334465971         Spiders
## 369  2256        88        7        1 0.75977918   1.291975789         Spiders
## 370  2288        86        1        1 0.75094454   1.250283854         Spiders
## 371  2297        84        1        1 0.74200472   1.209321504         Spiders
## 372  2386        79        4        1 0.73261226   1.167516487         Spiders
## 373  2419        78        0        1 0.72321979   1.126881820         Spiders
## 374  2466        73        4        1 0.71331267   1.085196406         Spiders
## 375  2583        65        7        1 0.70233863   1.040325608         Spiders
## 376  2598        64        0        1 0.69136459   0.996720262         Spiders
## 377  2689        61        2        1 0.68003074   0.952909925         Spiders
## 378  2769        58        2        1 0.66830607   0.908796348         Spiders
## 379  2796        56        1        1 0.65637204   0.865057079         Spiders
## 380  2847        53        2        1 0.64398766   0.820808487         Spiders
## 381  3086        44        8        1 0.62935158   0.769887342         Spiders
## 382  3090        43        0        1 0.61471549   0.720321622         Spiders
## 383  3170        37        5        1 0.59810156   0.665542315         Spiders
## 384  3282        35        1        1 0.58101294   0.610678663         Spiders
## 385  3358        33        1        1 0.56340649   0.555554719         Spiders
## 386  3395        31        1        1 0.54523209   0.499978462         Spiders
## 387  3574        30        0        1 0.52705769   0.445591602         Spiders
## 388  3584        27        2        1 0.50753703   0.388334278         Spiders
## 389  3839        21        5        1 0.48336860   0.318862135         Spiders
## 390  3853        20        0        1 0.45920017   0.250682977         Spiders
## 391  4079        13        6        1 0.42387708   0.152787878         Spiders
## 392  4191         9        3        1 0.37677963   0.024195561         Spiders
## 393    51        80        0        1 0.98750000   4.375743836         Spiders
## 394    71        79        0        1 0.97500000   3.676247258         Spiders
## 395    77        78        0        1 0.96250000   3.264364608         Spiders
## 396   110        77        0        1 0.95000000   2.970195249         Spiders
## 397   131        76        0        1 0.93750000   2.740493007         Spiders
## 398   140        75        0        1 0.92500000   2.551539632         Spiders
## 399   179        74        0        1 0.91250000   2.390682221         Spiders
## 400   186        73        0        1 0.90000000   2.250367327         Spiders
## 401   216        72        0        1 0.88750000   2.125722093         Spiders
## 402   264        71        0        1 0.87500000   2.013418678         Spiders
## 403   304        70        0        1 0.86250000   1.911082813         Spiders
## 404   321        69        0        1 0.85000000   1.816960795         Spiders
## 405   326        68        0        1 0.83750000   1.729720233         Spiders
## 406   400        67        0        1 0.82500000   1.648324840         Spiders
## 407   460        66        0        1 0.81250000   1.571952527         Spiders
## 408   515        65        0        1 0.80000000   1.499939987         Spiders
## 409   549        64        0        1 0.78750000   1.431744096         Spiders
## 410   673        63        0        1 0.77500000   1.366914374         Spiders
## 411   694        62        0        1 0.76250000   1.305072888         Spiders
## 412   750        60        1        1 0.74979167   1.244934083         Spiders
## 413   762        59        0        1 0.73708333   1.187265413         Spiders
## 414   850        56        2        1 0.72392113   1.129877508         Spiders
## 415   859        55        0        1 0.71075893   1.074636129         Spiders
## 416   980        54        0        1 0.69759673   1.021334355         Spiders
## 417  1083        53        0        1 0.68443452   0.969790948         Spiders
## 418  1165        52        0        1 0.67127232   0.919846094         Spiders
## 419  1170        51        0        1 0.65811012   0.871357980         Spiders
## 420  1191        50        0        1 0.64494792   0.824200014         Spiders
## 421  1235        47        2        1 0.63122562   0.776328983         Spiders
## 422  1413        42        4        1 0.61619644   0.725278979         Spiders
## 423  1434        41        0        1 0.60116726   0.675538951         Spiders
## 424  1444        40        0        1 0.58613808   0.626985180         Spiders
## 425  1576        35        4        1 0.56939127   0.574142795         Spiders
## 426  1657        34        0        1 0.55264447   0.522492767         Spiders
## 427  1690        33        0        1 0.53589767   0.471906157         Spiders
## 428  1827        28        4        1 0.51675847   0.415243216         Spiders
## 429  1847        27        0        1 0.49761926   0.359650763         Spiders
## 430  1925        25        1        1 0.47771449   0.302806516         Spiders
## 431  2105        22        2        1 0.45600020   0.241737817         Spiders
## 432  2224        19        2        1 0.43200019   0.175152213         Spiders
## 433  2400        14        4        1 0.40114303   0.090540623         Spiders
## 434  2540        13        0        1 0.37028588   0.006541414         Spiders
## 435  3244         8        4        1 0.32400014  -0.119569285         Spiders
## 436  3428         5        2        1 0.25920011  -0.300219310         Spiders
## 437  3445         4        1        1 0.19440008  -0.493376439         Spiders
## 438  3762         2        0        1 0.09720004  -0.846290552         Spiders
## 439   198       115        0        1 0.99130435   4.740568467   Bilirubin_cat
## 440   515       114        0        1 0.98260870   4.043025618   Bilirubin_cat
## 441   694       113        0        1 0.97391304   3.633132324   Bilirubin_cat
## 442  1682        90       22        1 0.96309179   3.280576838   Bilirubin_cat
## 443  1786        82        7        1 0.95134677   2.998202316   Bilirubin_cat
## 444  1847        78        3        1 0.93915001   2.768117850   Bilirubin_cat
## 445  2055        70        7        1 0.92573358   2.561760145   Bilirubin_cat
## 446  2090        69        0        1 0.91231715   2.388496072   Bilirubin_cat
## 447  2224        64        5        1 0.89806220   2.230116080   Bilirubin_cat
## 448  2297        58        4        1 0.88257837   2.080180281   Bilirubin_cat
## 449  2419        54        3        1 0.86623432   1.940724843   Bilirubin_cat
## 450  2466        51        2        1 0.84924934   1.811539091   Bilirubin_cat
## 451  2583        47        3        1 0.83118020   1.687893321   Bilirubin_cat
## 452  2598        46        0        1 0.81311107   1.575579803   Bilirubin_cat
## 453  2769        42        3        1 0.79375128   1.465402006   Bilirubin_cat
## 454  3086        32        9        1 0.76894655   1.336613874   Bilirubin_cat
## 455  3170        26        5        1 0.73937169   1.197478846   Bilirubin_cat
## 456  3584        18        7        1 0.69829548   1.024118342   Bilirubin_cat
## 457  3853        13        4        1 0.64458044   0.822901376   Bilirubin_cat
## 458    41       161        0        1 0.99378882   5.078290708   Bilirubin_cat
## 459    51       160        0        1 0.98757764   4.382013614   Bilirubin_cat
## 460    71       159        0        1 0.98136646   3.973402152   Bilirubin_cat
## 461    77       158        0        1 0.97515528   3.682557097   Bilirubin_cat
## 462   110       157        0        1 0.96894410   3.456233744   Bilirubin_cat
## 463   131       156        0        1 0.96273292   3.270715372   Bilirubin_cat
## 464   140       155        0        1 0.95652174   3.113350665   Bilirubin_cat
## 465   179       154        0        1 0.95031056   2.976587832   Bilirubin_cat
## 466   186       153        0        1 0.94409938   2.855555736   Bilirubin_cat
## 467   191       152        0        1 0.93788820   2.746928333   Bilirubin_cat
## 468   216       151        0        1 0.93167702   2.648333226   Bilirubin_cat
## 469   223       150        0        1 0.92546584   2.558018663   Bilirubin_cat
## 470   264       149        0        1 0.91925466   2.474654291   Bilirubin_cat
## 471   304       148        0        1 0.91304348   2.397205950   Bilirubin_cat
## 472   321       147        0        1 0.90683230   2.324853777   Bilirubin_cat
## 473   326       146        0        1 0.90062112   2.256936787   Bilirubin_cat
## 474   334       145        0        1 0.89440994   2.192914291   Bilirubin_cat
## 475   348       144        0        1 0.88819876   2.132338355   Bilirubin_cat
## 476   388       143        0        1 0.88198758   2.074833715   Bilirubin_cat
## 477   400       142        0        1 0.87577640   2.020082853   Bilirubin_cat
## 478   460       141        0        1 0.86956522   1.967814715   Bilirubin_cat
## 479   549       139        1        1 0.86330935   1.917443854   Bilirubin_cat
## 480   552       138        0        1 0.85705349   1.869148528   Bilirubin_cat
## 481   597       137        0        1 0.85079762   1.822748777   Bilirubin_cat
## 482   611       136        0        1 0.84454176   1.778086785   Bilirubin_cat
## 483   673       135        0        1 0.83828589   1.735023383   Bilirubin_cat
## 484   733       133        1        1 0.83198299   1.693127823   Bilirubin_cat
## 485   750       131        1        1 0.82563198   1.652313295   Bilirubin_cat
## 486   762       130        0        1 0.81928096   1.612802566   Bilirubin_cat
## 487   769       129        0        1 0.81292995   1.574503582   Bilirubin_cat
## 488   786       128        0        1 0.80657893   1.537333470   Bilirubin_cat
## 489   790       126        1        1 0.80017751   1.500934746   Bilirubin_cat
## 490   797       125        0        1 0.79377609   1.465537332   Bilirubin_cat
## 491   799       124        0        1 0.78737467   1.431078070   Bilirubin_cat
## 492   850       121        2        1 0.78086744   1.396951457   Bilirubin_cat
## 493   853       120        0        1 0.77436021   1.363679527   Bilirubin_cat
## 494   859       119        0        1 0.76785298   1.331211691   Bilirubin_cat
## 495   890       117        1        1 0.76129014   1.299233626   Bilirubin_cat
## 496   904       115        1        1 0.75467022   1.267713726   Bilirubin_cat
## 497   930       114        0        1 0.74805031   1.236891928   Bilirubin_cat
## 498   943       112        1        1 0.74137129   1.206463524   Bilirubin_cat
## 499   974       111        0        1 0.73469227   1.176670431   Bilirubin_cat
## 500   980       110        0        1 0.72801325   1.147478952   Bilirubin_cat
## 501   999       109        0        1 0.72133423   1.118857788   Bilirubin_cat
## 502  1012       108        0        1 0.71465521   1.090777816   Bilirubin_cat
## 503  1077       106        1        1 0.70791318   1.062954189   Bilirubin_cat
## 504  1080       105        0        1 0.70117115   1.035628262   Bilirubin_cat
## 505  1083       104        0        1 0.69442912   1.008775643   Bilirubin_cat
## 506  1152       102        1        1 0.68762099   0.982116793   Bilirubin_cat
## 507  1165       101        0        1 0.68081286   0.955895202   Bilirubin_cat
## 508  1170       100        0        1 0.67400473   0.930090133   Bilirubin_cat
## 509  1191        99        0        2 0.66038847   0.879652626   Bilirubin_cat
## 510  1212        97        0        1 0.65358034   0.854984440   Bilirubin_cat
## 511  1235        94        2        1 0.64662736   0.830147216   Bilirubin_cat
## 512  1297        92        1        1 0.63959880   0.805388720   Bilirubin_cat
## 513  1356        87        4        1 0.63224709   0.779849535   Bilirubin_cat
## 514  1360        86        0        1 0.62489538   0.754658756   Bilirubin_cat
## 515  1413        81        4        1 0.61718063   0.728580490   Bilirubin_cat
## 516  1427        78        2        1 0.60926805   0.702194070   Bilirubin_cat
## 517  1434        77        0        1 0.60135548   0.676154307   Bilirubin_cat
## 518  1444        75        1        1 0.59333741   0.650102908   Bilirubin_cat
## 519  1487        73        1        1 0.58520950   0.624021610   Bilirubin_cat
## 520  1536        71        1        1 0.57696711   0.597891522   Bilirubin_cat
## 521  1576        68        2        1 0.56848230   0.571309974   Bilirubin_cat
## 522  1657        64        3        1 0.55959976   0.543807845   Bilirubin_cat
## 523  1690        62        1        2 0.54154816   0.488863109   Bilirubin_cat
## 524  1741        60        0        1 0.53252236   0.461828500   Bilirubin_cat
## 525  1827        56        3        1 0.52301303   0.433634820   Bilirubin_cat
## 526  1925        52        3        1 0.51295509   0.404115535   Bilirubin_cat
## 527  2105        49        2        1 0.50248661   0.373695727   Bilirubin_cat
## 528  2256        46        2        1 0.49156299   0.342257683   Bilirubin_cat
## 529  2288        45        0        1 0.48063937   0.311103506   Bilirubin_cat
## 530  2386        39        5        1 0.46831528   0.276262820   Bilirubin_cat
## 531  2400        38        0        1 0.45599120   0.241712679   Bilirubin_cat
## 532  2540        33        4        1 0.44217328   0.203275447   Bilirubin_cat
## 533  2689        28        4        1 0.42638138   0.159674654   Bilirubin_cat
## 534  2796        25        2        1 0.40932612   0.112896540   Bilirubin_cat
## 535  2847        23        1        1 0.39152934   0.064330721   Bilirubin_cat
## 536  3090        20        2        1 0.37195287   0.011072952   Bilirubin_cat
## 537  3244        19        0        1 0.35237640  -0.042154241   Bilirubin_cat
## 538  3282        18        0        1 0.33279994  -0.095504490   Bilirubin_cat
## 539  3358        16        1        1 0.31199994  -0.152508432   Bilirubin_cat
## 540  3395        15        0        1 0.29119994  -0.210054385   Bilirubin_cat
## 541  3428        14        0        1 0.27039995  -0.268386958   Bilirubin_cat
## 542  3445        13        0        1 0.24959995  -0.327788812   Bilirubin_cat
## 543  3574        12        0        1 0.22879996  -0.388595080   Bilirubin_cat
## 544  3762        11        0        1 0.20799996  -0.451214076   Bilirubin_cat
## 545  3839         9        1        1 0.18488885  -0.523544649   Bilirubin_cat
## 546  4079         5        3        1 0.14791108  -0.647702004   Bilirubin_cat
## 547  4191         4        0        1 0.11093331  -0.787923605   Bilirubin_cat
## 548    41        20        0        1 0.95000000   2.970195249 Cholesterol_cat
## 549    77        19        0        1 0.90000000   2.250367327 Cholesterol_cat
## 550   110        18        0        1 0.85000000   1.816960795 Cholesterol_cat
## 551   131        17        0        1 0.80000000   1.499939987 Cholesterol_cat
## 552   140        16        0        1 0.75000000   1.245899324 Cholesterol_cat
## 553   191        15        0        1 0.70000000   1.030930433 Cholesterol_cat
## 554   348        14        0        1 0.65000000   0.842150991 Cholesterol_cat
## 555   552        13        0        1 0.60000000   0.671726992 Cholesterol_cat
## 556  1012        12        0        1 0.55000000   0.514437136 Cholesterol_cat
## 557  1077        11        0        1 0.50000000   0.366512921 Cholesterol_cat
## 558  2583         4        6        1 0.37500000   0.019356889 Cholesterol_cat
## 559    51        36        0        1 0.97222222   3.569466566 Cholesterol_cat
## 560   179        35        0        1 0.94444444   2.861928676 Cholesterol_cat
## 561   304        34        0        1 0.91666667   2.441716399 Cholesterol_cat
## 562   388        33        0        1 0.88888889   2.138911028 Cholesterol_cat
## 563   549        32        0        1 0.86111111   1.900246641 Cholesterol_cat
## 564   750        30        1        1 0.83240741   1.695904244 Cholesterol_cat
## 565  1576        25        4        1 0.79911111   1.494970232 Cholesterol_cat
## 566  2055        20        4        1 0.75915556   1.288991352 Cholesterol_cat
## 567  3170         6       13        1 0.63262963   0.781169691 Cholesterol_cat
## 568  3584         4        1        1 0.47447222   0.293630122 Cholesterol_cat
## 569    71       220        0        1 0.99545455   5.391350503 Cholesterol_cat
## 570   186       219        0        1 0.99090909   4.695917599 Cholesterol_cat
## 571   198       218        0        1 0.98636364   4.288158016 Cholesterol_cat
## 572   216       217        0        1 0.98181818   3.998172645 Cholesterol_cat
## 573   223       216        0        1 0.97727273   3.772716896 Cholesterol_cat
## 574   264       215        0        1 0.97272727   3.588074170 Cholesterol_cat
## 575   321       214        0        1 0.96818182   3.431593272 Cholesterol_cat
## 576   326       213        0        1 0.96363636   3.295722537 Cholesterol_cat
## 577   334       212        0        1 0.95909091   3.175590957 Cholesterol_cat
## 578   400       211        0        1 0.95454545   3.067872615 Cholesterol_cat
## 579   460       210        0        1 0.95000000   2.970195249 Cholesterol_cat
## 580   515       209        0        1 0.94545455   2.880807244 Cholesterol_cat
## 581   597       207        1        1 0.94088713   2.797995295 Cholesterol_cat
## 582   611       206        0        1 0.93631972   2.721161569 Cholesterol_cat
## 583   673       205        0        1 0.93175231   2.649475688 Cholesterol_cat
## 584   694       204        0        1 0.92718489   2.582268826 Cholesterol_cat
## 585   733       202        1        1 0.92259487   2.518690095 Cholesterol_cat
## 586   762       201        0        1 0.91800484   2.458623750 Cholesterol_cat
## 587   769       200        0        1 0.91341482   2.401685759 Cholesterol_cat
## 588   786       199        0        1 0.90882480   2.347551627 Cholesterol_cat
## 589   790       197        1        1 0.90421147   2.295688757 Cholesterol_cat
## 590   797       196        0        1 0.89959815   2.246137486 Cholesterol_cat
## 591   799       195        0        1 0.89498482   2.198688994 Cholesterol_cat
## 592   850       192        2        1 0.89032344   2.152696673 Cholesterol_cat
## 593   853       191        0        1 0.88566207   2.108501175 Cholesterol_cat
## 594   859       190        0        1 0.88100069   2.065957863 Cholesterol_cat
## 595   890       188        1        1 0.87631451   2.024724442 Cholesterol_cat
## 596   904       186        1        1 0.87160314   1.984705572 Cholesterol_cat
## 597   930       185        0        1 0.86689178   1.946022201 Cholesterol_cat
## 598   943       183        1        1 0.86215466   1.908379118 Cholesterol_cat
## 599   974       182        0        1 0.85741755   1.871905506 Cholesterol_cat
## 600   980       181        0        1 0.85268044   1.836523986 Cholesterol_cat
## 601   999       179        1        1 0.84791686   1.801975311 Cholesterol_cat
## 602  1080       176        2        1 0.84309915   1.768019223 Cholesterol_cat
## 603  1083       175        0        1 0.83828144   1.734993258 Cholesterol_cat
## 604  1152       172        2        1 0.83340771   1.702472978 Cholesterol_cat
## 605  1165       170        1        1 0.82850531   1.670611264 Cholesterol_cat
## 606  1170       169        0        1 0.82360291   1.639553016 Cholesterol_cat
## 607  1191       168        0        2 0.81379812   1.579670595 Cholesterol_cat
## 608  1212       166        0        1 0.80889572   1.550766854 Cholesterol_cat
## 609  1235       162        3        1 0.80390253   1.521989266 Cholesterol_cat
## 610  1297       157        4        1 0.79878214   1.493135789 Cholesterol_cat
## 611  1356       150        6        1 0.79345692   1.463797501 Cholesterol_cat
## 612  1360       149        0        1 0.78813171   1.435106266 Cholesterol_cat
## 613  1413       143        5        1 0.78262030   1.406057841 Cholesterol_cat
## 614  1427       140        2        1 0.77703015   1.377231062 Cholesterol_cat
## 615  1434       139        1        1 0.77144001   1.349012558 Cholesterol_cat
## 616  1444       136        1        1 0.76576765   1.320969352 Cholesterol_cat
## 617  1487       134        1        1 0.76005297   1.293288103 Cholesterol_cat
## 618  1536       132        1        1 0.75429499   1.265948389 Cholesterol_cat
## 619  1657       123        8        1 0.74816251   1.237408737 Cholesterol_cat
## 620  1682       121        1        1 0.74197935   1.209206933 Cholesterol_cat
## 621  1690       120        0        2 0.72961303   1.154417910 Cholesterol_cat
## 622  1741       116        2        1 0.72332326   1.127323402 Cholesterol_cat
## 623  1786       109        6        1 0.71668727   1.099265402 Cholesterol_cat
## 624  1827       106        2        1 0.70992607   1.071207911 Cholesterol_cat
## 625  1847       104        1        1 0.70309986   1.043396088 Cholesterol_cat
## 626  1925       100        3        1 0.69606886   1.015264214 Cholesterol_cat
## 627  2090        92        7        1 0.68850289   0.985544992 Cholesterol_cat
## 628  2105        91        0        1 0.68093693   0.956369260 Cholesterol_cat
## 629  2224        87        4        1 0.67311006   0.926728972 Cholesterol_cat
## 630  2256        85        0        1 0.66519112   0.897270574 Cholesterol_cat
## 631  2288        84        0        1 0.65727218   0.868317405 Cholesterol_cat
## 632  2297        83        0        1 0.64935324   0.839842718 Cholesterol_cat
## 633  2386        78        4        1 0.64102820   0.810396233 Cholesterol_cat
## 634  2400        77        0        1 0.63270316   0.781423542 Cholesterol_cat
## 635  2419        76        0        1 0.62437811   0.752899006 Cholesterol_cat
## 636  2466        71        4        1 0.61558406   0.723227538 Cholesterol_cat
## 637  2540        67        3        1 0.60639623   0.692703970 Cholesterol_cat
## 638  2598        62        4        1 0.59661565   0.660714501 Cholesterol_cat
## 639  2689        59        2        1 0.58650352   0.628152622 Cholesterol_cat
## 640  2769        56        2        1 0.57603024   0.594940991 Cholesterol_cat
## 641  2796        55        0        1 0.56555697   0.562216725 Cholesterol_cat
## 642  2847        52        2        1 0.55468087   0.528714108 Cholesterol_cat
## 643  3086        43        8        1 0.54178132   0.489565177 Cholesterol_cat
## 644  3090        42        0        1 0.52888176   0.451000713 Cholesterol_cat
## 645  3244        36        5        1 0.51419060   0.407725764 Cholesterol_cat
## 646  3282        34        1        1 0.49906735   0.363822962 Cholesterol_cat
## 647  3358        31        2        1 0.48296840   0.317723428 Cholesterol_cat
## 648  3395        30        0        1 0.46686945   0.272195147 Cholesterol_cat
## 649  3428        28        1        1 0.45019554   0.225554898 Cholesterol_cat
## 650  3445        27        1        1 0.43352164   0.179349688 Cholesterol_cat
## 651  3574        25        0        1 0.41618077   0.131663916 Cholesterol_cat
## 652  3762        21        3        1 0.39636264   0.077501395 Cholesterol_cat
## 653  3839        18        2        1 0.37434249   0.017569293 Cholesterol_cat
## 654  3853        17        0        1 0.35232235  -0.042301318 Cholesterol_cat
## 655  4079        11        5        1 0.32029304  -0.129728250 Cholesterol_cat
## 656  4191         8        2        1 0.28025641  -0.240630041 Cholesterol_cat
## 657    41       140        0        1 0.99285714   4.938060319    Alk_Phos_cat
## 658    51       139        0        1 0.98571429   4.241309500    Alk_Phos_cat
## 659   110       138        0        1 0.97857143   3.832218936    Alk_Phos_cat
## 660   131       137        0        1 0.97142857   3.540889304    Alk_Phos_cat
## 661   140       136        0        1 0.96428571   3.314075796    Alk_Phos_cat
## 662   179       135        0        1 0.95714286   3.128061585    Alk_Phos_cat
## 663   186       134        0        1 0.95000000   2.970195249    Alk_Phos_cat
## 664   191       133        0        1 0.94285714   2.832924885    Alk_Phos_cat
## 665   304       132        0        1 0.93571429   2.711379245    Alk_Phos_cat
## 666   348       131        0        1 0.92857143   2.602232166    Alk_Phos_cat
## 667   515       130        0        1 0.92142857   2.503111131    Alk_Phos_cat
## 668   552       128        1        1 0.91422991   2.411583376    Alk_Phos_cat
## 669   750       126        1        1 0.90697412   2.326454050    Alk_Phos_cat
## 670   799       125        0        1 0.89971832   2.247400776    Alk_Phos_cat
## 671   850       122        2        1 0.89234358   2.172398973    Alk_Phos_cat
## 672   980       120        1        1 0.88490739   2.101504870    Alk_Phos_cat
## 673  1012       118        1        1 0.87740817   2.034216005    Alk_Phos_cat
## 674  1080       115        2        1 0.86977854   1.969571291    Alk_Phos_cat
## 675  1191       111        3        1 0.86194269   1.906722670    Alk_Phos_cat
## 676  1487        95       15        1 0.85286961   1.837916920    Alk_Phos_cat
## 677  1536        92        2        1 0.84359929   1.771500059    Alk_Phos_cat
## 678  1576        89        2        1 0.83412065   1.707176294    Alk_Phos_cat
## 679  1682        84        4        1 0.82419064   1.643235588    Alk_Phos_cat
## 680  1690        83        0        1 0.81426063   1.582431989    Alk_Phos_cat
## 681  1741        79        3        1 0.80395354   1.522279947    Alk_Phos_cat
## 682  1827        73        5        1 0.79294047   1.460987194    Alk_Phos_cat
## 683  2055        61       11        1 0.77994145   1.392165854    Alk_Phos_cat
## 684  2090        60        0        1 0.76694242   1.326729893    Alk_Phos_cat
## 685  2105        59        0        1 0.75394340   1.264296295    Alk_Phos_cat
## 686  2288        50        8        1 0.73886453   1.195209030    Alk_Phos_cat
## 687  2419        45        4        1 0.72244532   1.123580796    Alk_Phos_cat
## 688  2540        38        6        1 0.70343360   1.044744212    Alk_Phos_cat
## 689  2583        36        1        1 0.68389378   0.967708596    Alk_Phos_cat
## 690  2598        35        0        1 0.66435396   0.894186336    Alk_Phos_cat
## 691  2796        31        3        1 0.64292318   0.817056384    Alk_Phos_cat
## 692  3244        20       10        1 0.61077703   0.707198803    Alk_Phos_cat
## 693  3395        16        3        1 0.57260346   0.584181855    Alk_Phos_cat
## 694  3428        15        0        1 0.53442990   0.467519177    Alk_Phos_cat
## 695  3445        14        1        1 0.49625633   0.355728698    Alk_Phos_cat
## 696  3762         9        3        1 0.44111674   0.200348200    Alk_Phos_cat
## 697    71       136        0        1 0.99264706   4.908967102    Alk_Phos_cat
## 698    77       135        0        1 0.98529412   4.212109308    Alk_Phos_cat
## 699   198       134        0        1 0.97794118   3.802910449    Alk_Phos_cat
## 700   216       133        0        1 0.97058824   3.511471176    Alk_Phos_cat
## 701   223       132        0        1 0.96323529   3.284546653    Alk_Phos_cat
## 702   264       131        0        1 0.95588235   3.098420025    Alk_Phos_cat
## 703   321       130        0        1 0.94852941   2.940439840    Alk_Phos_cat
## 704   326       129        0        1 0.94117647   2.803054168    Alk_Phos_cat
## 705   334       128        0        1 0.93382353   2.681391728    Alk_Phos_cat
## 706   388       127        0        1 0.92647059   2.572126326    Alk_Phos_cat
## 707   400       126        0        1 0.91911765   2.472885414    Alk_Phos_cat
## 708   460       125        0        1 0.91176471   2.381917085    Alk_Phos_cat
## 709   549       124        0        1 0.90441176   2.297890825    Alk_Phos_cat
## 710   597       123        0        1 0.89705882   2.219772309    Alk_Phos_cat
## 711   611       122        0        1 0.88970588   2.146741503    Alk_Phos_cat
## 712   673       121        0        1 0.88235294   2.078137249    Alk_Phos_cat
## 713   694       120        0        1 0.87500000   2.013418678    Alk_Phos_cat
## 714   733       118        1        1 0.86758475   1.951631911    Alk_Phos_cat
## 715   762       117        0        1 0.86016949   1.892956491    Alk_Phos_cat
## 716   769       116        0        1 0.85275424   1.837067205    Alk_Phos_cat
## 717   786       115        0        1 0.84533898   1.783686729    Alk_Phos_cat
## 718   790       113        1        1 0.83785811   1.732133843    Alk_Phos_cat
## 719   797       112        0        1 0.83037723   1.682679873    Alk_Phos_cat
## 720   853       111        0        1 0.82289636   1.635140299    Alk_Phos_cat
## 721   859       110        0        1 0.81541548   1.589353437    Alk_Phos_cat
## 722   890       109        0        1 0.80793460   1.545176803    Alk_Phos_cat
## 723   904       107        1        1 0.80038381   1.502091816    Alk_Phos_cat
## 724   930       106        0        1 0.79283302   1.460403249    Alk_Phos_cat
## 725   943       104        1        1 0.78520963   1.419625501    Alk_Phos_cat
## 726   974       103        0        1 0.77758623   1.380070846    Alk_Phos_cat
## 727   999       102        0        1 0.76996284   1.341653644    Alk_Phos_cat
## 728  1077       101        0        1 0.76233944   1.304296553    Alk_Phos_cat
## 729  1083       100        0        1 0.75471605   1.267929473    Alk_Phos_cat
## 730  1152        99        0        1 0.74709266   1.232488661    Alk_Phos_cat
## 731  1165        98        0        1 0.73946926   1.197915967    Alk_Phos_cat
## 732  1170        97        0        1 0.73184587   1.164158190    Alk_Phos_cat
## 733  1191        96        0        1 0.72422247   1.131166518    Alk_Phos_cat
## 734  1212        95        0        1 0.71659908   1.098896045    Alk_Phos_cat
## 735  1235        92        2        1 0.70880996   1.066625857    Alk_Phos_cat
## 736  1297        89        2        1 0.70084580   1.034321772    Alk_Phos_cat
## 737  1356        85        3        1 0.69260056   1.001571303    Alk_Phos_cat
## 738  1360        84        0        1 0.68435531   0.969485739    Alk_Phos_cat
## 739  1413        81        2        1 0.67590648   0.937257619    Alk_Phos_cat
## 740  1427        79        1        1 0.66735070   0.905252919    Alk_Phos_cat
## 741  1434        78        1        1 0.65879492   0.873846886    Alk_Phos_cat
## 742  1444        75        1        1 0.65001099   0.842190244    Alk_Phos_cat
## 743  1657        70        4        1 0.64072512   0.809333317    Alk_Phos_cat
## 744  1690        68        1        1 0.63130269   0.776594378    Alk_Phos_cat
## 745  1786        65        2        1 0.62159034   0.743443043    Alk_Phos_cat
## 746  1847        63        1        1 0.61172383   0.710345512    Alk_Phos_cat
## 747  1925        61        1        1 0.60169557   0.677266627    Alk_Phos_cat
## 748  2224        58        2        1 0.59132151   0.643604152    Alk_Phos_cat
## 749  2256        55        2        1 0.58057021   0.609275736    Alk_Phos_cat
## 750  2297        53        1        1 0.56961605   0.574843860    Alk_Phos_cat
## 751  2386        48        4        1 0.55774905   0.538117780    Alk_Phos_cat
## 752  2400        47        0        1 0.54588205   0.501944593    Alk_Phos_cat
## 753  2466        45        1        1 0.53375134   0.465493485    Alk_Phos_cat
## 754  2689        38        6        1 0.51970525   0.423893696    Alk_Phos_cat
## 755  2769        35        2        1 0.50485653   0.380556435    Alk_Phos_cat
## 756  2847        33        1        1 0.48955785   0.336518529    Alk_Phos_cat
## 757  3086        30        2        1 0.47323925   0.290146171    Alk_Phos_cat
## 758  3090        29        0        1 0.45692066   0.244309068    Alk_Phos_cat
## 759  3170        25        3        1 0.43864383   0.193502817    Alk_Phos_cat
## 760  3282        24        0        1 0.42036700   0.143146464    Alk_Phos_cat
## 761  3358        22        1        1 0.40125941   0.090858245    Alk_Phos_cat
## 762  3574        20        1        1 0.38119644   0.036207201    Alk_Phos_cat
## 763  3584        18        1        1 0.36001886  -0.021368903    Alk_Phos_cat
## 764  3839        14        3        1 0.33430323  -0.091399658    Alk_Phos_cat
## 765  3853        13        0        1 0.30858760  -0.161905845    Alk_Phos_cat
## 766  4079         9        3        1 0.27430009  -0.257376901    Alk_Phos_cat
## 767  4191         8        0        1 0.24001257  -0.355619160    Alk_Phos_cat
## 768   191         6        0        1 0.83333333   1.701983355        SGOT_cat
## 769  2466         4        1        1 0.62500000   0.755014863        SGOT_cat
## 770  3090         1        2        1 0.00000000          -Inf        SGOT_cat
## 771    41       270        0        1 0.99629630   5.596567243        SGOT_cat
## 772    51       269        0        1 0.99259259   4.901559592        SGOT_cat
## 773    71       268        0        1 0.98888889   4.494228222        SGOT_cat
## 774    77       267        0        1 0.98518519   4.204674055        SGOT_cat
## 775   110       266        0        1 0.98148148   3.979652538        SGOT_cat
## 776   131       265        0        1 0.97777778   3.795447105        SGOT_cat
## 777   140       264        0        1 0.97407407   3.639406597        SGOT_cat
## 778   179       263        0        1 0.97037037   3.503979383        SGOT_cat
## 779   186       262        0        1 0.96666667   3.384294493        SGOT_cat
## 780   198       261        0        1 0.96296296   3.277026048        SGOT_cat
## 781   216       260        0        1 0.95925926   3.179801822        SGOT_cat
## 782   223       259        0        1 0.95555556   3.090870238        SGOT_cat
## 783   264       258        0        1 0.95185185   3.008901121        SGOT_cat
## 784   304       257        0        1 0.94814815   2.932860493        SGOT_cat
## 785   321       256        0        1 0.94444444   2.861928676        SGOT_cat
## 786   326       255        0        1 0.94074074   2.795444874        SGOT_cat
## 787   334       254        0        1 0.93703704   2.732868591        SGOT_cat
## 788   348       253        0        1 0.93333333   2.673752092        SGOT_cat
## 789   388       252        0        1 0.92962963   2.617720313        SGOT_cat
## 790   400       251        0        1 0.92592593   2.564455944        SGOT_cat
## 791   460       250        0        1 0.92222222   2.513688141        SGOT_cat
## 792   515       249        0        1 0.91851852   2.465183875        SGOT_cat
## 793   549       247        1        1 0.91479982   2.418557117        SGOT_cat
## 794   552       246        0        1 0.91108112   2.373830440        SGOT_cat
## 795   597       245        0        1 0.90736242   2.330847497        SGOT_cat
## 796   611       244        0        1 0.90364372   2.289470406        SGOT_cat
## 797   673       243        0        1 0.89992503   2.249576948        SGOT_cat
## 798   694       242        0        1 0.89620633   2.211058280        SGOT_cat
## 799   733       240        1        1 0.89247213   2.173664424        SGOT_cat
## 800   750       238        1        1 0.88872225   2.137320517        SGOT_cat
## 801   762       237        0        1 0.88497237   2.102105594        SGOT_cat
## 802   769       236        0        1 0.88122249   2.067946686        SGOT_cat
## 803   786       235        0        1 0.87747260   2.034777626        SGOT_cat
## 804   790       233        1        1 0.87370663   2.002401781        SGOT_cat
## 805   797       232        0        1 0.86994065   1.970907987        SGOT_cat
## 806   799       231        0        1 0.86617467   1.940245392        SGOT_cat
## 807   850       228        2        1 0.86237566   1.910108628        SGOT_cat
## 808   853       227        0        1 0.85857665   1.880726299        SGOT_cat
## 809   859       226        0        1 0.85477764   1.852057923        SGOT_cat
## 810   890       224        1        1 0.85096167   1.823942652        SGOT_cat
## 811   904       222        1        1 0.84712851   1.796352735        SGOT_cat
## 812   930       221        0        1 0.84329534   1.769383491        SGOT_cat
## 813   943       219        1        1 0.83944468   1.742885308        SGOT_cat
## 814   974       218        0        1 0.83559402   1.716954032        SGOT_cat
## 815   980       217        0        1 0.83174335   1.691562946        SGOT_cat
## 816   999       215        1        1 0.82787478   1.666572612        SGOT_cat
## 817  1012       214        0        1 0.82400621   1.642078789        SGOT_cat
## 818  1077       211        2        1 0.82010096   1.617833959        SGOT_cat
## 819  1080       210        0        1 0.81619572   1.594051399        SGOT_cat
## 820  1083       209        0        1 0.81229048   1.570711209        SGOT_cat
## 821  1152       206        2        1 0.80834732   1.547574242        SGOT_cat
## 822  1165       204        1        1 0.80438483   1.524740781        SGOT_cat
## 823  1170       203        0        1 0.80042235   1.502308055        SGOT_cat
## 824  1191       202        0        2 0.79249737   1.458580844        SGOT_cat
## 825  1212       200        0        1 0.78853489   1.437256636        SGOT_cat
## 826  1235       196        3        1 0.78451175   1.415954998        SGOT_cat
## 827  1297       191        4        1 0.78040436   1.394556048        SGOT_cat
## 828  1356       183        7        1 0.77613985   1.372697016        SGOT_cat
## 829  1360       182        0        1 0.77187535   1.351188996        SGOT_cat
## 830  1413       176        5        1 0.76748969   1.329421788        SGOT_cat
## 831  1427       173        2        1 0.76305334   1.307751804        SGOT_cat
## 832  1434       171        2        1 0.75859104   1.286295313        SGOT_cat
## 833  1444       168        1        1 0.75407561   1.264917317        SGOT_cat
## 834  1487       164        3        1 0.74947759   1.243480176        SGOT_cat
## 835  1536       161        2        1 0.74482245   1.222104833        SGOT_cat
## 836  1576       156        4        1 0.74004795   1.200511134        SGOT_cat
## 837  1657       150        5        1 0.73511429   1.178534815        SGOT_cat
## 838  1682       148        1        1 0.73014731   1.156742664        SGOT_cat
## 839  1690       147        0        2 0.72021333   1.114108273        SGOT_cat
## 840  1741       142        3        1 0.71514140   1.092804226        SGOT_cat
## 841  1786       135        6        1 0.70984406   1.070870770        SGOT_cat
## 842  1827       132        2        1 0.70446645   1.048923771        SGOT_cat
## 843  1847       129        2        1 0.69900547   1.026952202        SGOT_cat
## 844  1925       125        3        1 0.69341343   1.004769884        SGOT_cat
## 845  2055       115        9        1 0.68738375   0.981195834        SGOT_cat
## 846  2090       114        0        1 0.68135407   0.957964164        SGOT_cat
## 847  2105       113        0        1 0.67532438   0.935060450        SGOT_cat
## 848  2224       106        7        1 0.66895340   0.911201508        SGOT_cat
## 849  2256       102        2        1 0.66239503   0.886991248        SGOT_cat
## 850  2288       100        1        1 0.65577108   0.862883835        SGOT_cat
## 851  2297        98        1        1 0.64907954   0.838866810        SGOT_cat
## 852  2386        89        8        1 0.64178651   0.813058456        SGOT_cat
## 853  2400        88        0        1 0.63449348   0.787615539        SGOT_cat
## 854  2419        87        0        1 0.62720046   0.762520658        SGOT_cat
## 855  2540        78        8        1 0.61915942   0.735235624        SGOT_cat
## 856  2583        73        4        1 0.61067779   0.706869277        SGOT_cat
## 857  2598        72        0        1 0.60219615   0.678904978        SGOT_cat
## 858  2689        68        3        1 0.59334033   0.650112329        SGOT_cat
## 859  2769        65        2        1 0.58421201   0.620842658        SGOT_cat
## 860  2796        63        1        1 0.57493881   0.591508582        SGOT_cat
## 861  2847        60        2        1 0.56535649   0.561594871        SGOT_cat
## 862  3086        51        8        1 0.55427107   0.527460871        SGOT_cat
## 863  3170        45        5        1 0.54195394   0.490085089        SGOT_cat
## 864  3244        44        0        1 0.52963680   0.453242821        SGOT_cat
## 865  3282        42        1        1 0.51702640   0.416028700        SGOT_cat
## 866  3358        39        2        1 0.50376931   0.377407202        SGOT_cat
## 867  3395        37        1        1 0.49015393   0.338223651        SGOT_cat
## 868  3428        35        1        1 0.47614953   0.298374587        SGOT_cat
## 869  3445        34        1        1 0.46214513   0.258930977        SGOT_cat
## 870  3574        32        0        1 0.44770310   0.218622540        SGOT_cat
## 871  3584        29        2        1 0.43226506   0.175882750        SGOT_cat
## 872  3762        25        3        1 0.41497446   0.128358155        SGOT_cat
## 873  3839        22        2        1 0.39611198   0.076818058        SGOT_cat
## 874  3853        21        0        1 0.37724951   0.025473214        SGOT_cat
## 875  4079        14        6        1 0.35030311  -0.047795826        SGOT_cat
## 876  4191        10        3        1 0.31527280  -0.143508809        SGOT_cat
## 877    41        32        0        1 0.96875000   3.449903552   Platelets_cat
## 878    77        31        0        1 0.93750000   2.740493007   Platelets_cat
## 879   110        30        0        1 0.90625000   2.318307314   Platelets_cat
## 880   140        29        0        1 0.87500000   2.013418678   Platelets_cat
## 881   223        28        0        1 0.84375000   1.772550920   Platelets_cat
## 882   304        27        0        1 0.81250000   1.571952527   Platelets_cat
## 883   321        26        0        1 0.78125000   1.398933589   Platelets_cat
## 884   326        25        0        1 0.75000000   1.245899324   Platelets_cat
## 885   348        24        0        1 0.71875000   1.107930508   Platelets_cat
## 886   388        23        0        1 0.68750000   0.981647055   Platelets_cat
## 887   549        22        0        1 0.65625000   0.864615531   Platelets_cat
## 888   552        21        0        1 0.62500000   0.755014863   Platelets_cat
## 889   762        20        0        1 0.59375000   0.651435489   Platelets_cat
## 890   850        19        0        1 0.56250000   0.552752143   Platelets_cat
## 891  1191        18        0        1 0.53125000   0.458039393   Platelets_cat
## 892  2105        11        6        1 0.48295455   0.317684012   Platelets_cat
## 893  2598         6        4        1 0.40246212   0.094141139   Platelets_cat
## 894  3445         4        1        1 0.30184659  -0.180516903   Platelets_cat
## 895  4079         2        1        1 0.15092330  -0.637097090   Platelets_cat
## 896  4191         1        0        1 0.00000000          -Inf   Platelets_cat
## 897    51       236        0        1 0.99576271   5.461709411   Platelets_cat
## 898    71       235        0        1 0.99152542   4.766432298   Platelets_cat
## 899   131       234        0        1 0.98728814   4.358829660   Platelets_cat
## 900   179       233        0        1 0.98305085   4.069002403   Platelets_cat
## 901   186       232        0        1 0.97881356   3.843705952   Platelets_cat
## 902   191       231        0        1 0.97457627   3.659223721   Platelets_cat
## 903   198       230        0        1 0.97033898   3.502904530   Platelets_cat
## 904   216       229        0        1 0.96610169   3.367196729   Platelets_cat
## 905   264       228        0        1 0.96186441   3.247229325   Platelets_cat
## 906   334       227        0        1 0.95762712   3.139676417   Platelets_cat
## 907   400       226        0        1 0.95338983   3.042165758   Platelets_cat
## 908   460       225        0        1 0.94915254   2.952945749   Platelets_cat
## 909   515       224        0        1 0.94491525   2.870686192   Platelets_cat
## 910   597       222        1        1 0.94065888   2.794021346   Platelets_cat
## 911   611       221        0        1 0.93640250   2.722506150   Platelets_cat
## 912   673       220        0        1 0.93214613   2.655471713   Platelets_cat
## 913   694       219        0        1 0.92788975   2.592371342   Platelets_cat
## 914   733       217        1        1 0.92361376   2.532485187   Platelets_cat
## 915   750       215        1        1 0.91931789   2.475471561   Platelets_cat
## 916   769       214        0        1 0.91502201   2.421287991   Platelets_cat
## 917   786       213        0        1 0.91072613   2.369654259   Platelets_cat
## 918   790       211        1        1 0.90640989   2.320101059   Platelets_cat
## 919   797       210        0        1 0.90209366   2.272667778   Platelets_cat
## 920   799       209        0        1 0.89777742   2.227170564   Platelets_cat
## 921   853       206        2        1 0.89341928   2.183032110   Platelets_cat
## 922   859       205        0        1 0.88906113   2.140557398   Platelets_cat
## 923   890       203        1        1 0.88468152   2.099419276   Platelets_cat
## 924   904       201        1        1 0.88028012   2.059520460   Platelets_cat
## 925   930       200        0        1 0.87587872   2.020964009   Platelets_cat
## 926   943       198        1        1 0.87145509   1.983470143   Platelets_cat
## 927   980       197        0        1 0.86703146   1.947150799   Platelets_cat
## 928   999       195        1        1 0.86258514   1.911750378   Platelets_cat
## 929  1012       194        0        1 0.85813883   1.877386727   Platelets_cat
## 930  1077       191        2        1 0.85364596   1.843650357   Platelets_cat
## 931  1080       190        0        1 0.84915308   1.810845659   Platelets_cat
## 932  1083       189        0        1 0.84466021   1.778917174   Platelets_cat
## 933  1152       186        2        1 0.84011903   1.747484049   Platelets_cat
## 934  1165       184        1        1 0.83555316   1.716681837   Platelets_cat
## 935  1170       183        0        1 0.83098730   1.686638818   Platelets_cat
## 936  1191       182        0        1 0.82642143   1.657313753   Platelets_cat
## 937  1212       181        0        1 0.82185557   1.628668606   Platelets_cat
## 938  1235       176        4        1 0.81718593   1.600039078   Platelets_cat
## 939  1297       171        4        1 0.81240707   1.571401805   Platelets_cat
## 940  1356       164        6        1 0.80745337   1.542387042   Platelets_cat
## 941  1360       163        0        1 0.80249967   1.514019373   Platelets_cat
## 942  1413       158        4        1 0.79742055   1.485570897   Platelets_cat
## 943  1427       155        2        1 0.79227591   1.457379780   Platelets_cat
## 944  1434       153        2        1 0.78709763   1.429607025   Platelets_cat
## 945  1444       150        1        1 0.78185031   1.402049945   Platelets_cat
## 946  1487       147        2        1 0.77653160   1.374690205   Platelets_cat
## 947  1536       145        1        1 0.77117621   1.347695459   Platelets_cat
## 948  1576       140        4        1 0.76566781   1.320480895   Platelets_cat
## 949  1657       134        5        1 0.75995387   1.292812978   Platelets_cat
## 950  1682       132        1        1 0.75419665   1.265486075   Platelets_cat
## 951  1690       131        0        2 0.74268219   1.212384555   Platelets_cat
## 952  1741       126        3        1 0.73678789   1.185952063   Platelets_cat
## 953  1786       120        5        1 0.73064799   1.158924623   Platelets_cat
## 954  1827       117        2        1 0.72440314   1.131939869   Platelets_cat
## 955  1847       114        2        1 0.71804872   1.104978959   Platelets_cat
## 956  1925       110        3        1 0.71152101   1.077779795   Platelets_cat
## 957  2055       101        8        1 0.70447625   1.048963448   Platelets_cat
## 958  2090       100        0        1 0.69743148   1.020676718   Platelets_cat
## 959  2224        94        6        1 0.69001200   0.991428451   Platelets_cat
## 960  2288        90        2        1 0.68234520   0.961759989   Platelets_cat
## 961  2386        83        6        1 0.67412417   0.930539384   Platelets_cat
## 962  2400        82        0        1 0.66590315   0.899898215   Platelets_cat
## 963  2419        81        0        1 0.65768212   0.869804256   Platelets_cat
## 964  2466        76        4        1 0.64902841   0.838684549   Platelets_cat
## 965  2540        71        4        1 0.63988716   0.806397794   Platelets_cat
## 966  2583        67        3        1 0.63033661   0.773270400   Platelets_cat
## 967  2689        63        3        1 0.62033127   0.739187674   Platelets_cat
## 968  2769        60        2        1 0.60999241   0.704594930   Platelets_cat
## 969  2796        58        1        1 0.59947530   0.670015774   Platelets_cat
## 970  2847        56        1        1 0.58877038   0.635408580   Platelets_cat
## 971  3086        46        9        1 0.57597103   0.594754632   Platelets_cat
## 972  3090        45        0        1 0.56317167   0.554828411   Platelets_cat
## 973  3170        40        4        1 0.54909238   0.511678350   Platelets_cat
## 974  3244        39        0        1 0.53501309   0.469261395   Platelets_cat
## 975  3282        38        0        1 0.52093380   0.427507800   Platelets_cat
## 976  3358        35        2        1 0.50604997   0.384016994   Platelets_cat
## 977  3395        33        1        1 0.49071513   0.339829751   Platelets_cat
## 978  3428        31        1        1 0.47488561   0.294798892   Platelets_cat
## 979  3574        29        1        1 0.45851024   0.248752871   Platelets_cat
## 980  3584        26        2        1 0.44087523   0.199679294   Platelets_cat
## 981  3762        22        3        1 0.42083545   0.144432442   Platelets_cat
## 982  3839        19        2        1 0.39868621   0.083837578   Platelets_cat
## 983  3853        18        0        1 0.37653698   0.023535789   Platelets_cat
## 984   974         8        0        1 0.87500000   2.013418678   Platelets_cat
## 985  2256         7        0        1 0.75000000   1.245899324   Platelets_cat
## 986  2297         5        1        1 0.60000000   0.671726992   Platelets_cat
## 987    51       245        0        1 0.99591837   5.499213915 Prothrombin_cat
## 988    71       244        0        1 0.99183673   4.804015446 Prothrombin_cat
## 989   110       243        0        1 0.98775510   4.396492004 Prothrombin_cat
## 990   198       242        0        1 0.98367347   4.106744501 Prothrombin_cat
## 991   264       241        0        1 0.97959184   3.881528369 Prothrombin_cat
## 992   321       240        0        1 0.97551020   3.697127028 Prothrombin_cat
## 993   334       239        0        1 0.97142857   3.540889304 Prothrombin_cat
## 994   348       238        0        1 0.96734694   3.405263555 Prothrombin_cat
## 995   460       237        0        1 0.96326531   3.285378794 Prothrombin_cat
## 996   515       236        0        1 0.95918367   3.177909127 Prothrombin_cat
## 997   611       234        1        1 0.95508460   3.080084828 Prothrombin_cat
## 998   673       233        0        1 0.95098552   2.990616579 Prothrombin_cat
## 999   694       232        0        1 0.94688645   2.908159198 Prothrombin_cat
## 1000  733       230        1        1 0.94276955   2.831347174 Prothrombin_cat
## 1001  750       228        1        1 0.93863460   2.759411633 Prothrombin_cat
## 1002  762       227        0        1 0.93449964   2.692018848 Prothrombin_cat
## 1003  769       226        0        1 0.93036469   2.628611214 Prothrombin_cat
## 1004  786       225        0        1 0.92622973   2.568727698 Prothrombin_cat
## 1005  790       223        1        1 0.92207624   2.511734850 Prothrombin_cat
## 1006  797       222        0        1 0.91792274   2.457578836 Prothrombin_cat
## 1007  799       221        0        1 0.91376924   2.405978558 Prothrombin_cat
## 1008  853       218        2        1 0.90957764   2.356250482 Prothrombin_cat
## 1009  859       217        0        1 0.90538604   2.308664898 Prothrombin_cat
## 1010  890       215        1        1 0.90117494   2.262827245 Prothrombin_cat
## 1011  904       213        1        1 0.89694407   2.218595403 Prothrombin_cat
## 1012  930       212        0        1 0.89271320   2.176041351 Prothrombin_cat
## 1013  943       210        1        1 0.88846219   2.134842731 Prothrombin_cat
## 1014  974       209        0        1 0.88421117   2.095088436 Prothrombin_cat
## 1015  980       208        0        1 0.87996016   2.056673537 Prothrombin_cat
## 1016  999       206        1        1 0.87568851   2.019326517 Prothrombin_cat
## 1017 1077       203        2        1 0.87137477   1.982800481 Prothrombin_cat
## 1018 1080       202        0        1 0.86706103   1.947389892 Prothrombin_cat
## 1019 1083       201        0        1 0.86274730   1.913022774 Prothrombin_cat
## 1020 1152       198        2        1 0.85838999   1.879301345 Prothrombin_cat
## 1021 1165       196        1        1 0.85401045   1.846351769 Prothrombin_cat
## 1022 1191       195        0        2 0.84525137   1.783070005 Prothrombin_cat
## 1023 1212       193        0        1 0.84087183   1.752638542 Prothrombin_cat
## 1024 1235       188        4        1 0.83639910   1.722330143 Prothrombin_cat
## 1025 1297       183        4        1 0.83182862   1.692119496 Prothrombin_cat
## 1026 1360       176        6        1 0.82710232   1.661642828 Prothrombin_cat
## 1027 1413       170        5        1 0.82223701   1.631036527 Prothrombin_cat
## 1028 1427       167        2        1 0.81731343   1.600812136 Prothrombin_cat
## 1029 1434       165        2        1 0.81236002   1.571123075 Prothrombin_cat
## 1030 1444       162        1        1 0.80734545   1.541762286 Prothrombin_cat
## 1031 1487       158        3        1 0.80223567   1.512525104 Prothrombin_cat
## 1032 1536       155        2        1 0.79705996   1.483574828 Prothrombin_cat
## 1033 1657       145        9        1 0.79156299   1.453521000 Prothrombin_cat
## 1034 1682       143        1        1 0.78602759   1.423940608 Prothrombin_cat
## 1035 1690       142        0        2 0.77495677   1.366695574 Prothrombin_cat
## 1036 1741       137        3        1 0.76930016   1.338365268 Prothrombin_cat
## 1037 1786       130        6        1 0.76338246   1.309347719 Prothrombin_cat
## 1038 1827       127        2        1 0.75737158   1.280489294 Prothrombin_cat
## 1039 1847       124        2        1 0.75126374   1.251768706 Prothrombin_cat
## 1040 1925       120        3        1 0.74500321   1.222928834 Prothrombin_cat
## 1041 2055       110        9        1 0.73823045   1.192376188 Prothrombin_cat
## 1042 2090       109        0        1 0.73145770   1.162460199 Prothrombin_cat
## 1043 2105       108        0        1 0.72468494   1.133146956 Prothrombin_cat
## 1044 2224       101        7        1 0.71750984   1.102714851 Prothrombin_cat
## 1045 2288        96        3        1 0.71003578   1.071659071 Prothrombin_cat
## 1046 2297        94        1        1 0.70248221   1.040904285 Prothrombin_cat
## 1047 2386        85        8        1 0.69421771   1.007941051 Prothrombin_cat
## 1048 2400        84        0        1 0.68595322   0.975653732 Prothrombin_cat
## 1049 2419        83        0        1 0.67768872   0.944003169 Prothrombin_cat
## 1050 2466        79        3        1 0.66911038   0.911785302 Prothrombin_cat
## 1051 2540        74        4        1 0.66006835   0.878484745 Prothrombin_cat
## 1052 2583        69        4        1 0.65050214   0.843945212 Prothrombin_cat
## 1053 2598        68        0        1 0.64093593   0.810072590 Prothrombin_cat
## 1054 2689        63        4        1 0.63076235   0.774734495 Prothrombin_cat
## 1055 2769        60        2        1 0.62024964   0.738912132 Prothrombin_cat
## 1056 2796        58        1        1 0.60955568   0.703147058 Prothrombin_cat
## 1057 2847        55        2        1 0.59847285   0.666750428 Prothrombin_cat
## 1058 3086        45        9        1 0.58517345   0.623906659 Prothrombin_cat
## 1059 3244        39        5        1 0.57016901   0.576569389 Prothrombin_cat
## 1060 3358        35        3        1 0.55387846   0.526260810 Prothrombin_cat
## 1061 3395        34        0        1 0.53758792   0.476967084 Prothrombin_cat
## 1062 3428        32        1        1 0.52078830   0.427079541 Prothrombin_cat
## 1063 3445        31        1        1 0.50398868   0.378042353 Prothrombin_cat
## 1064 3574        29        0        1 0.48660976   0.328097484 Prothrombin_cat
## 1065 3584        26        2        1 0.46789400   0.275077166 Prothrombin_cat
## 1066 3839        20        5        1 0.44449930   0.209725469 Prothrombin_cat
## 1067 3853        19        0        1 0.42110460   0.145171415 Prothrombin_cat
## 1068 4079        13        5        1 0.38871194   0.056658466 Prothrombin_cat
## 1069 4191         9        3        1 0.34552172  -0.060812624 Prothrombin_cat
## 1070   41        31        0        1 0.96774194   3.417637092 Prothrombin_cat
## 1071   77        30        0        1 0.93548387   2.707679652 Prothrombin_cat
## 1072  131        29        0        1 0.90322581   2.284915186 Prothrombin_cat
## 1073  140        28        0        1 0.87096774   1.979412778 Prothrombin_cat
## 1074  179        27        0        1 0.83870968   1.737892690 Prothrombin_cat
## 1075  186        26        0        1 0.80645161   1.536599340 Prothrombin_cat
## 1076  191        25        0        1 0.77419355   1.362838126 Prothrombin_cat
## 1077  216        24        0        1 0.74193548   1.209008835 Prothrombin_cat
## 1078  223        23        0        1 0.70967742   1.070185920 Prothrombin_cat
## 1079  304        22        0        1 0.67741935   0.942981875 Prothrombin_cat
## 1080  326        21        0        1 0.64516129   0.824954504 Prothrombin_cat
## 1081  388        20        0        1 0.61290323   0.714272302 Prothrombin_cat
## 1082  400        19        0        1 0.58064516   0.609513182 Prothrombin_cat
## 1083  549        18        0        1 0.54838710   0.509536687 Prothrombin_cat
## 1084  552        17        0        1 0.51612903   0.413398773 Prothrombin_cat
## 1085  597        16        0        1 0.48387097   0.320292040 Prothrombin_cat
## 1086  850        15        0        1 0.45161290   0.229501376 Prothrombin_cat
## 1087 1012        14        0        1 0.41935484   0.140368602 Prothrombin_cat
## 1088 1170        13        0        1 0.38709677   0.052261600 Prothrombin_cat
## 1089 1356        11        1        1 0.35190616  -0.043433686 Prothrombin_cat
## 1090 1576        10        0        1 0.31671554  -0.139545615 Prothrombin_cat
## 1091 2256         9        0        1 0.28152493  -0.237073506 Prothrombin_cat
## 1092 3090         7        1        1 0.24130708  -0.351842764 Prothrombin_cat
## 1093 3170         6        0        1 0.20108923  -0.472504576 Prothrombin_cat
## 1094 3282         5        0        1 0.16087139  -0.602757416 Prothrombin_cat
## 1095 3762         3        1        1 0.10724759  -0.803173626 Prothrombin_cat
## 1096  198        53        0        1 0.98113208   3.960782934         Age_cat
## 1097  733        52        0        1 0.96226415   3.257973244         Age_cat
## 1098  790        49        2        1 0.94262611   2.828768580         Age_cat
## 1099  974        46        2        1 0.92213424   2.512510456         Age_cat
## 1100 1212        44        1        1 0.90117664   2.262845351         Age_cat
## 1101 1427        35        8        1 0.87542873   2.017093945         Age_cat
## 1102 1434        34        1        1 0.84968083   1.814652570         Age_cat
## 1103 1847        24        8        1 0.81427746   1.582532592         Age_cat
## 1104 2105        16        7        1 0.76338512   1.309360622         Age_cat
## 1105 2689         9        6        1 0.67856455   0.947328292         Age_cat
## 1106 3244         7        1        1 0.58162676   0.612625183         Age_cat
## 1107 3428         6        0        1 0.48468897   0.322621541         Age_cat
## 1108   71       174        0        1 0.99425287   5.156174831         Age_cat
## 1109   77       173        0        1 0.98850575   4.460133276         Age_cat
## 1110  110       172        0        1 0.98275862   4.051759742         Age_cat
## 1111  131       171        0        1 0.97701149   3.761155044         Age_cat
## 1112  186       170        0        1 0.97126437   3.535074515         Age_cat
## 1113  216       169        0        1 0.96551724   3.349801478         Age_cat
## 1114  264       168        0        1 0.95977011   3.192684658         Age_cat
## 1115  304       167        0        1 0.95402299   3.056172307         Age_cat
## 1116  321       166        0        1 0.94827586   2.935393334         Age_cat
## 1117  326       165        0        1 0.94252874   2.827021738         Age_cat
## 1118  400       164        0        1 0.93678161   2.728685169         Age_cat
## 1119  460       163        0        1 0.93103448   2.638631924         Age_cat
## 1120  515       162        0        1 0.92528736   2.555531698         Age_cat
## 1121  549       160        1        1 0.91950431   2.477884794         Age_cat
## 1122  552       159        0        1 0.91372126   2.405396456         Age_cat
## 1123  597       158        0        1 0.90793822   2.337394531         Age_cat
## 1124  673       157        0        1 0.90215517   2.273329810         Age_cat
## 1125  694       156        0        1 0.89637213   2.212747748         Age_cat
## 1126  750       154        1        1 0.89055153   2.154904037         Age_cat
## 1127  769       153        0        1 0.88473093   2.099875181         Age_cat
## 1128  786       152        0        1 0.87891033   2.047381806         Age_cat
## 1129  797       151        0        1 0.87308973   1.997183879         Age_cat
## 1130  853       149        1        1 0.86723007   1.948757387         Age_cat
## 1131  859       148        0        1 0.86137041   1.902262116         Age_cat
## 1132  943       146        1        1 0.85547061   1.857235778         Age_cat
## 1133  980       145        0        1 0.84957081   1.813857959         Age_cat
## 1134  999       143        1        1 0.84362976   1.771712432         Age_cat
## 1135 1077       141        1        1 0.83764657   1.730707517         Age_cat
## 1136 1080       140        0        1 0.83166338   1.691041147         Age_cat
## 1137 1083       139        0        1 0.82568019   1.652618102         Age_cat
## 1138 1165       137        1        1 0.81965333   1.615084826         Age_cat
## 1139 1170       136        0        1 0.81362646   1.578647309         Age_cat
## 1140 1191       135        0        2 0.80157274   1.508780429         Age_cat
## 1141 1297       129        4        1 0.79535900   1.474200547         Age_cat
## 1142 1356       125        3        1 0.78899612   1.439721004         Age_cat
## 1143 1413       121        3        1 0.78247550   1.405303199         Age_cat
## 1144 1444       118        2        1 0.77584435   1.371195476         Age_cat
## 1145 1536       115        2        1 0.76909787   1.337363094         Age_cat
## 1146 1657       107        7        1 0.76191004   1.302222431         Age_cat
## 1147 1690       105        1        2 0.74739747   1.233888707         Age_cat
## 1148 1741       102        1        1 0.74007005   1.200610327         Age_cat
## 1149 1827        97        4        1 0.73244046   1.166762996         Age_cat
## 1150 1925        93        3        1 0.72456475   1.132632021         Age_cat
## 1151 2055        88        4        1 0.71633106   1.097774120         Age_cat
## 1152 2224        82        6        1 0.70759532   1.061654907         Age_cat
## 1153 2256        79        1        1 0.69863842   1.025486486         Age_cat
## 1154 2288        78        0        1 0.68968151   0.990138145         Age_cat
## 1155 2297        76        1        1 0.68060676   0.955107993         Age_cat
## 1156 2386        71        4        1 0.67102075   0.918906087         Age_cat
## 1157 2400        70        0        1 0.66143474   0.883475194         Age_cat
## 1158 2419        69        0        1 0.65184872   0.848765827         Age_cat
## 1159 2466        64        4        1 0.64166359   0.812626637         Age_cat
## 1160 2583        56        7        1 0.63020531   0.772819105         Age_cat
## 1161 2598        55        0        1 0.61874703   0.733846760         Age_cat
## 1162 2769        49        5        1 0.60611954   0.691791999         Age_cat
## 1163 2847        45        3        1 0.59265022   0.647885317         Age_cat
## 1164 3086        37        7        1 0.57663264   0.596837718         Age_cat
## 1165 3170        32        4        1 0.55861287   0.540771941         Age_cat
## 1166 3282        30        1        1 0.53999245   0.484183482         Age_cat
## 1167 3358        28        1        1 0.52070700   0.426840277         Age_cat
## 1168 3395        27        0        1 0.50142156   0.370617256         Age_cat
## 1169 3445        25        1        1 0.48136469   0.313163864         Age_cat
## 1170 3762        19        5        1 0.45602971   0.241820232         Age_cat
## 1171 3839        17        1        1 0.42920443   0.167446414         Age_cat
## 1172 3853        16        0        1 0.40237916   0.093914647         Age_cat
## 1173 4079        11        4        1 0.36579923  -0.005654623         Age_cat
## 1174 4191         9        1        1 0.32515487  -0.116407580         Age_cat
## 1175   41        49        0        1 0.97959184   3.881528369         Age_cat
## 1176   51        48        0        1 0.95918367   3.177909127         Age_cat
## 1177  140        47        0        1 0.93877551   2.761784869         Age_cat
## 1178  179        46        0        1 0.91836735   2.463249175         Age_cat
## 1179  191        45        0        1 0.89795918   2.229049689         Age_cat
## 1180  223        44        0        1 0.87755102   2.035461538         Age_cat
## 1181  334        43        0        1 0.85714286   1.869824714         Age_cat
## 1182  348        42        0        1 0.83673469   1.724578142         Age_cat
## 1183  388        41        0        1 0.81632653   1.594840751         Age_cat
## 1184  611        40        0        1 0.79591837   1.477275855         Age_cat
## 1185  762        39        0        1 0.77551020   1.369499632         Age_cat
## 1186  799        38        0        1 0.75510204   1.269748053         Age_cat
## 1187  850        37        0        1 0.73469388   1.176677534         Age_cat
## 1188  890        36        0        1 0.71428571   1.089239640         Age_cat
## 1189  904        35        0        1 0.69387755   1.006599065         Age_cat
## 1190  930        34        0        1 0.67346939   0.928078089         Age_cat
## 1191 1012        32        1        1 0.65242347   0.850827400         Age_cat
## 1192 1152        30        1        1 0.63067602   0.774437529         Age_cat
## 1193 1235        28        1        1 0.60815188   0.698500221         Age_cat
## 1194 1360        25        2        1 0.58382580   0.619613069         Age_cat
## 1195 1487        23        1        1 0.55844207   0.540246903         Age_cat
## 1196 1576        22        0        1 0.53305834   0.463426262         Age_cat
## 1197 1682        20        1        1 0.50640542   0.385048408         Age_cat
## 1198 1786        17        2        1 0.47661687   0.299697544         Age_cat
## 1199 2090        15        1        1 0.44484241   0.210677586         Age_cat
## 1200 2540        11        3        1 0.40440219   0.099438783         Age_cat
## 1201 2796        10        0        1 0.36396197  -0.010648984         Age_cat
## 1202 3090         7        2        1 0.31196741  -0.152597961         Age_cat
## 1203 3574         3        3        1 0.20797827  -0.451280487         Age_cat
## 1204 3584         2        0        1 0.10398914  -0.816898528         Age_cat
write.csv(logtransf_results, "Loglogtransf.csv", row.names = FALSE)

Observed vs Expected

Drug

#Plot Observed vs Expected (Drug)
drug_obs = data.frame(Drug = factor(c(1, 2), levels = c(1, 2), labels = c("D-penicillamine", "Placebo")))
kmfit_drug = survfit(y ~ Drug, data = df) #observed
cox_drug = coxph(y ~ Drug, data = df) #expected

plot(kmfit_drug,
     main = "Observed vs Expected Survival Probability for Drug",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("red", "blue"))
lines(survfit(cox_drug, newdata = drug_obs), col = c("red", "blue"), lty = 2)
legend("topright",cex=0.6, legend = c("D-penicillamine (Obs)", "D-penicillamine (Exp)", 
                              "Placebo (Obs)", "Placebo (Exp)"), 
       col = c("red", "red", "blue", "blue"), lty = c(1, 2, 1, 2), 
       title = "Drug")

### Sex

# Plot Observed vs Expected (Sex)
sex_obs = data.frame(Sex = factor(c(1, 2), levels = c(1, 2), labels = c("F", "M")))
kmfit_sex = survfit(y ~ Sex, data = df) # observed
cox_sex = coxph(y ~ Sex, data = df) # expected

plot(kmfit_sex,
     main = "Observed vs Expected Survival Probability for Sex",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("red", "blue"))
lines(survfit(cox_sex, newdata = sex_obs), col = c("red", "blue"), lty = 2)
legend("topright", cex=0.6, legend = c("Female (Obs)", "Female (Exp)", 
                                       "Male (Obs)", "Male (Exp)"), 
       col = c("red", "red", "blue", "blue"), lty = c(1, 2, 1, 2), 
       title = "Sex")

### Ascites

# Plot Observed vs Expected (Ascites)
ascites_obs = data.frame(Ascites = factor(c(1, 2), levels = c(1, 2), labels = c("N", "Y")))
kmfit_ascites = survfit(y ~ Ascites, data = df) # observed
cox_ascites = coxph(y ~ Ascites, data = df) # expected

plot(kmfit_ascites,
     main = "Observed vs Expected Survival Probability for Ascites",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("blue", "red"))
lines(survfit(cox_ascites, newdata = ascites_obs), col = c("blue", "red"), lty = 2)
legend("topright", cex=0.6, legend = c("No Ascites (Obs)", "No Ascites (Exp)", 
                                       "Ascites (Obs)", "Ascites (Exp)"), 
       col = c("blue", "blue", "red", "red"), lty = c(1, 2, 1, 2), 
       title = "Ascites")

### Spiders

# Plot Observed vs Expected (Spiders)
spiders_obs = data.frame(Spiders = factor(c(1, 2), levels = c(1, 2), labels = c("N", "Y")))
kmfit_spiders = survfit(y ~ Spiders, data = df) # observed
cox_spiders = coxph(y ~ Spiders, data = df) # expected

plot(kmfit_spiders,
     main = "Observed vs Expected Survival Probability for Spiders",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("blue", "red"))
lines(survfit(cox_spiders, newdata = spiders_obs), col = c("blue", "red"), lty = 2)
legend("topright", cex=0.6, legend = c("No Spiders (Obs)", "No Spiders (Exp)", 
                                       "Spiders (Obs)", "Spiders (Exp)"), 
       col = c("blue", "blue", "red", "red"), lty = c(1, 2, 1, 2), 
       title = "Spiders")

### Bilirubin_cat

# Plot Observed vs Expected (Bilirubin_cat)
bilirubin_obs = data.frame(Bilirubin_cat = factor(c(1, 2), levels = c(1, 2), labels = c("Normal", "Increased")))
kmfit_bilirubin = survfit(y ~ Bilirubin_cat, data = df) # observed
cox_bilirubin = coxph(y ~ Bilirubin_cat, data = df) # expected

plot(kmfit_bilirubin,
     main = "Observed vs Expected Survival Probability for Bilirubin Category",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("blue", "red"))
lines(survfit(cox_bilirubin, newdata = bilirubin_obs), col = c("blue", "red"), lty = 2)
legend("topright", cex=0.5, legend = c("Normal (Obs)", "Normal (Exp)", 
                                       "Increased (Obs)", "Increased (Exp)"), 
       col = c("blue", "blue", "red", "red"), lty = c(1, 2, 1, 2), 
       title = "Bilirubin Category")

Cholesterol_cat

# Plot Observed vs Expected (Cholesterol_cat)
cholesterol_obs = data.frame(Cholesterol_cat = factor(c(1, 2, 3), levels = c(1, 2, 3), labels = c("Normal", "Borderline", "High")))
kmfit_cholesterol = survfit(y ~ Cholesterol_cat, data = df) # observed
cox_cholesterol = coxph(y ~ Cholesterol_cat, data = df) # expected

plot(kmfit_cholesterol,
     main = "Observed vs Expected Survival Probability for Cholesterol Category",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("blue", "orange", "red"))
lines(survfit(cox_cholesterol, newdata = cholesterol_obs), col = c("blue", "orange", "red"), lty = 2)
legend("topright", cex=0.6, legend = c("Normal (Obs)", "Normal (Exp)", 
                                       "Borderline (Obs)", "Borderline (Exp)", 
                                       "High (Obs)", "High (Exp)"), 
       col = c("blue", "blue", "orange", "orange", "red", "red"), 
       lty = c(1, 2, 1, 2, 1, 2), title = "Cholesterol Category")

Platelets_cat

# Plot Observed vs Expected (Platelets_cat)
platelets_obs = data.frame(Platelets_cat = factor(c(1, 2, 3), levels = c(1, 2, 3), labels = c("Low", "Normal", "High")))
kmfit_platelets = survfit(y ~ Platelets_cat, data = df) # observed
cox_platelets = coxph(y ~ Platelets_cat, data = df) # expected

plot(kmfit_platelets,
     main = "Observed vs Expected Survival Probability for Platelets Category",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("blue", "orange", "red"))
lines(survfit(cox_platelets, newdata = platelets_obs), col = c("blue", "orange", "red"), lty = 2)
legend("topright", cex=0.6, legend = c("Low (Obs)", "Low (Exp)", 
                                       "Normal (Obs)", "Normal (Exp)", 
                                       "High (Obs)", "High (Exp)"), 
       col = c("blue", "blue", "orange", "orange", "red", "red"), 
       lty = c(1, 2, 1, 2, 1, 2), title = "Platelets Category")

Prothrombin_cat

# Plot Observed vs Expected (Prothrombin_cat)
prothrombin_obs = data.frame(Prothrombin_cat = factor(c(1, 2), levels = c(1, 2), labels = c("Normal", "Prolonged")))
kmfit_prothrombin = survfit(y ~ Prothrombin_cat, data = df) # observed
cox_prothrombin = coxph(y ~ Prothrombin_cat, data = df) # expected

plot(kmfit_prothrombin,
     main = "Observed vs Expected Survival Probability for Prothrombin Category",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("blue", "red"))
lines(survfit(cox_prothrombin, newdata = prothrombin_obs), col = c("blue", "red"), lty = 2)
legend("topright", cex=0.6, legend = c("Normal (Obs)", "Normal (Exp)", 
                                       "Prolonged (Obs)", "Prolonged (Exp)"), 
       col = c("blue", "blue", "red", "red"), lty = c(1, 2, 1, 2), 
       title = "Prothrombin Category")

Alk_phos_cat

# Plot Observed vs Expected (Alk_Phos_cat)
alkphos_obs = data.frame(Alk_Phos_cat = factor(c(1, 2), levels = c(1, 2), labels = c("Normal", "High")))
kmfit_alkphos = survfit(y ~ Alk_Phos_cat, data = df) # observed
cox_alkphos = coxph(y ~ Alk_Phos_cat, data = df) # expected

plot(kmfit_alkphos,
     main = "Observed vs Expected Survival Probability for Alk Phos Category",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("blue", "red"))
lines(survfit(cox_alkphos, newdata = alkphos_obs), col = c("blue", "red"), lty = 2)
legend("topright", cex=0.6, legend = c("Normal (Obs)", "Normal (Exp)", 
                                       "High (Obs)", "High (Exp)"), 
       col = c("blue", "blue", "red", "red"), lty = c(1, 2, 1, 2), 
       title = "Alk Phos Category")

SGOT_cat

# Plot Observed vs Expected (SGOT_cat)
sgot_obs = data.frame(SGOT_cat = factor(c(1, 2), levels = c(1, 2), labels = c("Normal", "High")))
kmfit_sgot = survfit(y ~ SGOT_cat, data = df) # observed
cox_sgot = coxph(y ~ SGOT_cat, data = df) # expected

plot(kmfit_sgot,
     main = "Observed vs Expected Survival Probability for SGOT Category",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("red", "blue"))
lines(survfit(cox_sgot, newdata = sgot_obs), col = c("blue", "red"), lty = 2)
legend("topright", cex=0.6, legend = c("Normal (Obs)", "Normal (Exp)", 
                                       "High (Obs)", "High (Exp)"), 
       col = c("blue", "blue", "red", "red"), lty = c(1, 2, 1, 2), 
       title = "SGOT Category")

Age_cat

# Plot Observed vs Expected (Age_cat)
age_obs = data.frame(Age_cat = factor(c(1, 2, 3), levels = c(1, 2, 3), labels = c("Young", "Middle-aged", "Old")))
kmfit_age = survfit(y ~ Age_cat, data = df) # observed
cox_age = coxph(y ~ Age_cat, data = df) # expected

plot(kmfit_age,
     main = "Observed vs Expected Survival Probability for Age Category",
     xlab = "Time (day)", ylab = "Survival Probability",
     lty = 1, col = c("green", "blue", "red"))
lines(survfit(cox_age, newdata = age_obs), col = c("green", "blue", "red"), lty = 2)
legend("topright", cex=0.6, legend = c("Young (Obs)", "Young (Exp)", 
                                       "Middle-aged (Obs)", "Middle-aged (Exp)", 
                                       "Old (Obs)", "Old (Exp)"), 
       col = c("green", "green", "blue", "blue", "red", "red"), 
       lty = c(1, 2, 1, 2, 1, 2), title = "Age Category")

Goodnes Of Fit Test

ph_test = cox.zph(cox_model)
print(ph_test)
##                chisq df       p
## Drug         0.17894  1 0.67229
## Age          3.82416  1 0.05052
## Sex          0.01123  1 0.91562
## Ascites      1.67162  1 0.19604
## Spiders      0.00262  1 0.95915
## Bilirubin    6.12010  1 0.01337
## Cholesterol 14.82483  1 0.00012
## Alk_Phos     0.73064  1 0.39268
## SGOT         0.10948  1 0.74074
## Platelets    3.11580  1 0.07754
## Prothrombin  2.02232  1 0.15500
## Stage        4.97879  3 0.17336
## GLOBAL      26.20689 14 0.02436

Stratified COX Model

Kombinasi (Age, Bilirubin, Cholesterol) -> Z_star

df$Z_star = with(df,
                 ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "Normal" & Age_cat == "Young", 1,
                        ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "Normal" & Age_cat == "Middle-aged", 2,
                               ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "Normal" & Age_cat == "Old", 3,
                                      ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "Borderline" & Age_cat == "Young", 4,
                                             ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "Borderline" & Age_cat == "Middle-aged", 5,
                                                    ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "Borderline" & Age_cat == "Old", 6,
                                                           ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "High" & Age_cat == "Young", 7,
                                                                  ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "High" & Age_cat == "Middle-aged", 8,
                                                                         ifelse(Bilirubin_cat == "Normal" & Cholesterol_cat == "High" & Age_cat == "Old", 9,
                                                                                ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "Normal" & Age_cat == "Young", 10,
                                                                                       ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "Normal" & Age_cat == "Middle-aged", 11,
                                                                                              ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "Normal" & Age_cat == "Old", 12,
                                                                                                     ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "Borderline" & Age_cat == "Young", 13,
                                                                                                            ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "Borderline" & Age_cat == "Middle-aged", 14,
                                                                                                                   ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "Borderline" & Age_cat == "Old", 15,
                                                                                                                          ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "High" & Age_cat == "Young", 16,
                                                                                                                                 ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "High" & Age_cat == "Middle-aged", 17,
                                                                                                                                        ifelse(Bilirubin_cat == "Increased" & Cholesterol_cat == "High" & Age_cat == "Old", 18, NA)))))))))))))))))))

head(df)
## # A tibble: 6 × 23
##   N_Days Status Drug    Age Sex   Ascites Spiders Bilirubin Cholesterol Alk_Phos
##    <dbl> <fct>  <fct> <dbl> <fct> <fct>   <fct>       <dbl>       <dbl>    <dbl>
## 1    400 D      D-pe… 21464 F     Y       Y            14.5         261    1718 
## 2   4500 C      D-pe… 20617 F     N       Y             1.1         302    7395.
## 3   1012 D      D-pe… 25594 M     N       N             1.4         176     516 
## 4   1925 D      D-pe… 19994 F     N       Y             1.8         244    6122.
## 5   1504 C      Plac… 13918 F     N       Y             3.4         279     671 
## 6   1832 C      Plac… 20284 F     N       N             1           322     824 
## # ℹ 13 more variables: SGOT <dbl>, Platelets <dbl>, Prothrombin <dbl>,
## #   Stage <fct>, Age_years <dbl>, Bilirubin_cat <fct>, Cholesterol_cat <fct>,
## #   Platelets_cat <fct>, Prothrombin_cat <fct>, Alk_Phos_cat <fct>,
## #   SGOT_cat <fct>, Age_cat <fct>, Z_star <dbl>

Model COX Stratified Tanpa Interaksi

strata_full = coxph(y ~ strata(Z_star) + Drug + Sex + Ascites + Spiders + Alk_Phos + SGOT + Platelets + Prothrombin + Stage, 
                       data = df)
summary(strata_full)
## Call:
## coxph(formula = y ~ strata(Z_star) + Drug + Sex + Ascites + Spiders + 
##     Alk_Phos + SGOT + Platelets + Prothrombin + Stage, data = df)
## 
##   n= 276, number of events= 111 
## 
##                   coef  exp(coef)   se(coef)      z Pr(>|z|)   
## DrugPlacebo -5.539e-02  9.461e-01  2.086e-01 -0.265  0.79066   
## SexM         6.465e-02  1.067e+00  2.943e-01  0.220  0.82614   
## AscitesY     9.092e-01  2.482e+00  3.607e-01  2.520  0.01172 * 
## SpidersY     6.033e-01  1.828e+00  2.323e-01  2.597  0.00942 **
## Alk_Phos     6.524e-05  1.000e+00  3.950e-05  1.652  0.09856 . 
## SGOT         5.242e-03  1.005e+00  1.690e-03  3.102  0.00192 **
## Platelets    8.224e-04  1.001e+00  1.170e-03  0.703  0.48192   
## Prothrombin  2.798e-01  1.323e+00  1.249e-01  2.241  0.02505 * 
## Stage2       5.506e-01  1.734e+00  1.075e+00  0.512  0.60854   
## Stage3       9.797e-01  2.664e+00  1.045e+00  0.937  0.34863   
## Stage4       1.244e+00  3.471e+00  1.059e+00  1.176  0.23974   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## DrugPlacebo    0.9461     1.0569    0.6286     1.424
## SexM           1.0668     0.9374    0.5992     1.899
## AscitesY       2.4822     0.4029    1.2241     5.034
## SpidersY       1.8281     0.5470    1.1594     2.882
## Alk_Phos       1.0001     0.9999    1.0000     1.000
## SGOT           1.0053     0.9948    1.0019     1.009
## Platelets      1.0008     0.9992    0.9985     1.003
## Prothrombin    1.3228     0.7560    1.0357     1.690
## Stage2         1.7343     0.5766    0.2109    14.262
## Stage3         2.6635     0.3754    0.3434    20.662
## Stage4         3.4711     0.2881    0.4359    27.638
## 
## Concordance= 0.718  (se = 0.032 )
## Likelihood ratio test= 45.15  on 11 df,   p=5e-06
## Wald test            = 45.11  on 11 df,   p=5e-06
## Score (logrank) test = 49.04  on 11 df,   p=9e-07

Model Strata 1 : Eliminasi variabel sex

strata1 = coxph(y ~ strata(Z_star) + Drug + Ascites + Spiders + Alk_Phos + SGOT + Platelets + Prothrombin + Stage, 
                       data = df) 
summary(strata1) 
## Call:
## coxph(formula = y ~ strata(Z_star) + Drug + Ascites + Spiders + 
##     Alk_Phos + SGOT + Platelets + Prothrombin + Stage, data = df)
## 
##   n= 276, number of events= 111 
## 
##                   coef  exp(coef)   se(coef)      z Pr(>|z|)   
## DrugPlacebo -5.600e-02  9.455e-01  2.087e-01 -0.268  0.78840   
## AscitesY     9.074e-01  2.478e+00  3.611e-01  2.513  0.01197 * 
## SpidersY     5.948e-01  1.813e+00  2.289e-01  2.599  0.00935 **
## Alk_Phos     6.628e-05  1.000e+00  3.924e-05  1.689  0.09122 . 
## SGOT         5.243e-03  1.005e+00  1.687e-03  3.108  0.00188 **
## Platelets    7.536e-04  1.001e+00  1.126e-03  0.669  0.50335   
## Prothrombin  2.784e-01  1.321e+00  1.244e-01  2.238  0.02523 * 
## Stage2       5.179e-01  1.679e+00  1.064e+00  0.487  0.62656   
## Stage3       9.528e-01  2.593e+00  1.038e+00  0.918  0.35865   
## Stage4       1.214e+00  3.366e+00  1.049e+00  1.157  0.24719   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## DrugPlacebo    0.9455     1.0576    0.6282     1.423
## AscitesY       2.4778     0.4036    1.2210     5.028
## SpidersY       1.8126     0.5517    1.1575     2.839
## Alk_Phos       1.0001     0.9999    1.0000     1.000
## SGOT           1.0053     0.9948    1.0019     1.009
## Platelets      1.0008     0.9992    0.9985     1.003
## Prothrombin    1.3211     0.7570    1.0352     1.686
## Stage2         1.6785     0.5958    0.2084    13.520
## Stage3         2.5929     0.3857    0.3391    19.829
## Stage4         3.3658     0.2971    0.4309    26.292
## 
## Concordance= 0.718  (se = 0.032 )
## Likelihood ratio test= 45.1  on 10 df,   p=2e-06
## Wald test            = 44.95  on 10 df,   p=2e-06
## Score (logrank) test = 48.78  on 10 df,   p=4e-07

Model Strata 2 : Eliminasi variabel sex dan drug

strata2 = coxph(y ~ strata(Z_star) + Ascites + Spiders + Alk_Phos + SGOT + Platelets + Prothrombin + Stage, 
                 data = df)
summary(strata2) 
## Call:
## coxph(formula = y ~ strata(Z_star) + Ascites + Spiders + Alk_Phos + 
##     SGOT + Platelets + Prothrombin + Stage, data = df)
## 
##   n= 276, number of events= 111 
## 
##                  coef exp(coef)  se(coef)     z Pr(>|z|)   
## AscitesY    9.115e-01 2.488e+00 3.617e-01 2.520  0.01173 * 
## SpidersY    6.007e-01 1.823e+00 2.280e-01 2.634  0.00843 **
## Alk_Phos    6.677e-05 1.000e+00 3.919e-05 1.704  0.08842 . 
## SGOT        5.215e-03 1.005e+00 1.677e-03 3.109  0.00188 **
## Platelets   7.432e-04 1.001e+00 1.129e-03 0.658  0.51032   
## Prothrombin 2.749e-01 1.316e+00 1.237e-01 2.221  0.02632 * 
## Stage2      4.963e-01 1.643e+00 1.062e+00 0.467  0.64022   
## Stage3      9.252e-01 2.522e+00 1.033e+00 0.895  0.37054   
## Stage4      1.181e+00 3.258e+00 1.042e+00 1.133  0.25701   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## AscitesY        2.488     0.4019    1.2246     5.055
## SpidersY        1.823     0.5484    1.1662     2.851
## Alk_Phos        1.000     0.9999    1.0000     1.000
## SGOT            1.005     0.9948    1.0019     1.009
## Platelets       1.001     0.9993    0.9985     1.003
## Prothrombin     1.316     0.7597    1.0329     1.678
## Stage2          1.643     0.6088    0.2050    13.163
## Stage3          2.522     0.3965    0.3329    19.109
## Stage4          3.258     0.3070    0.4227    25.111
## 
## Concordance= 0.718  (se = 0.032 )
## Likelihood ratio test= 45.03  on 9 df,   p=9e-07
## Wald test            = 44.81  on 9 df,   p=1e-06
## Score (logrank) test = 48.69  on 9 df,   p=2e-07

Model Strata 3 : Eliminasi variabel sex, drug, dan stage

strata3 = coxph(y ~ strata(Z_star) + Ascites + Spiders + Alk_Phos + SGOT + Platelets + Prothrombin, 
                 data = df) 
summary(strata3) 
## Call:
## coxph(formula = y ~ strata(Z_star) + Ascites + Spiders + Alk_Phos + 
##     SGOT + Platelets + Prothrombin, data = df)
## 
##   n= 276, number of events= 111 
## 
##                  coef exp(coef)  se(coef)     z Pr(>|z|)   
## AscitesY    1.027e+00 2.792e+00 3.410e-01 3.011  0.00261 **
## SpidersY    7.036e-01 2.021e+00 2.238e-01 3.144  0.00167 **
## Alk_Phos    5.646e-05 1.000e+00 3.725e-05 1.516  0.12964   
## SGOT        4.466e-03 1.004e+00 1.616e-03 2.763  0.00573 **
## Platelets   5.405e-04 1.001e+00 1.113e-03 0.486  0.62721   
## Prothrombin 3.277e-01 1.388e+00 1.207e-01 2.716  0.00660 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## AscitesY        2.792     0.3582    1.4310     5.448
## SpidersY        2.021     0.4948    1.3033     3.134
## Alk_Phos        1.000     0.9999    1.0000     1.000
## SGOT            1.004     0.9955    1.0013     1.008
## Platelets       1.001     0.9995    0.9984     1.003
## Prothrombin     1.388     0.7205    1.0955     1.758
## 
## Concordance= 0.705  (se = 0.034 )
## Likelihood ratio test= 40.72  on 6 df,   p=3e-07
## Wald test            = 41.74  on 6 df,   p=2e-07
## Score (logrank) test = 45.21  on 6 df,   p=4e-08

Model Strata 4 : Eliminasi variabel sex, drug, stage dan platelets

strata4 = coxph(y ~ strata(Z_star) + Ascites + Spiders + Alk_Phos + SGOT + Prothrombin, 
                 data = df)
summary(strata4) 
## Call:
## coxph(formula = y ~ strata(Z_star) + Ascites + Spiders + Alk_Phos + 
##     SGOT + Prothrombin, data = df)
## 
##   n= 276, number of events= 111 
## 
##                  coef exp(coef)  se(coef)     z Pr(>|z|)   
## AscitesY    1.003e+00 2.727e+00 3.370e-01 2.976  0.00292 **
## SpidersY    6.871e-01 1.988e+00 2.213e-01 3.105  0.00190 **
## Alk_Phos    5.921e-05 1.000e+00 3.675e-05 1.611  0.10717   
## SGOT        4.399e-03 1.004e+00 1.611e-03 2.732  0.00630 **
## Prothrombin 3.321e-01 1.394e+00 1.205e-01 2.755  0.00587 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## AscitesY        2.727     0.3667     1.409     5.279
## SpidersY        1.988     0.5030     1.288     3.067
## Alk_Phos        1.000     0.9999     1.000     1.000
## SGOT            1.004     0.9956     1.001     1.008
## Prothrombin     1.394     0.7174     1.101     1.765
## 
## Concordance= 0.705  (se = 0.034 )
## Likelihood ratio test= 40.48  on 5 df,   p=1e-07
## Wald test            = 41.44  on 5 df,   p=8e-08
## Score (logrank) test = 44.95  on 5 df,   p=1e-08

Model Strata 5 : Eliminasi variabel sex, drug, stage, platelets dan alk_phos

strata5 = coxph(y ~ strata(Z_star) + Ascites + Spiders + SGOT + Prothrombin, 
                 data = df)
summary(strata5) 
## Call:
## coxph(formula = y ~ strata(Z_star) + Ascites + Spiders + SGOT + 
##     Prothrombin, data = df)
## 
##   n= 276, number of events= 111 
## 
##                 coef exp(coef) se(coef)     z Pr(>|z|)   
## AscitesY    0.999340  2.716488 0.337850 2.958  0.00310 **
## SpidersY    0.630170  1.877929 0.217977 2.891  0.00384 **
## SGOT        0.004500  1.004510 0.001589 2.831  0.00464 **
## Prothrombin 0.349094  1.417782 0.120066 2.908  0.00364 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## AscitesY        2.716     0.3681     1.401     5.267
## SpidersY        1.878     0.5325     1.225     2.879
## SGOT            1.005     0.9955     1.001     1.008
## Prothrombin     1.418     0.7053     1.120     1.794
## 
## Concordance= 0.704  (se = 0.034 )
## Likelihood ratio test= 38.08  on 4 df,   p=1e-07
## Wald test            = 39.55  on 4 df,   p=5e-08
## Score (logrank) test = 42.87  on 4 df,   p=1e-08

Perbandingan : Mana model strata tanpa interaksi yang terbaik?

model_list = list(
  strata_full = strata_full,
  strata1 = strata1,
  strata2 = strata2,
  strata3 = strata3,
  strata4 = strata4,
  strata5 = strata5
)

stra_summary = data.frame()

for (model_name in names(model_list)) {
  model = model_list[[model_name]]
  model_summary_data = summary(model)
  variables = rownames(model_summary_data$coefficients)
  HR = model_summary_data$coefficients[, "exp(coef)"]
  
  
  CI_lower = model_summary_data$conf.int[, "lower .95"]
  CI_upper = model_summary_data$conf.int[, "upper .95"]
  

  model_AIC = AIC(model)
  
  temp_df = data.frame(
    Model = model_name,
    Variable = variables,
    HR = HR,
    CI_Lower = CI_lower,
    CI_Upper = CI_upper,
    AIC = model_AIC
  )
  
  
  stra_summary = rbind(stra_summary, temp_df)
}

print(stra_summary)
##                    Model    Variable        HR  CI_Lower  CI_Upper      AIC
## DrugPlacebo  strata_full DrugPlacebo 0.9461190 0.6285562  1.424123 596.1547
## SexM         strata_full        SexM 1.0667837 0.5991643  1.899358 596.1547
## AscitesY     strata_full    AscitesY 2.4822367 1.2240740  5.033600 596.1547
## SpidersY     strata_full    SpidersY 1.8280860 1.1594092  2.882415 596.1547
## Alk_Phos     strata_full    Alk_Phos 1.0000652 0.9999878  1.000143 596.1547
## SGOT         strata_full        SGOT 1.0052554 1.0019313  1.008591 596.1547
## Platelets    strata_full   Platelets 1.0008228 0.9985312  1.003120 596.1547
## Prothrombin  strata_full Prothrombin 1.3228301 1.0356674  1.689615 596.1547
## Stage2       strata_full      Stage2 1.7342739 0.2108856 14.262264 596.1547
## Stage3       strata_full      Stage3 2.6635463 0.3433570 20.662108 596.1547
## Stage4       strata_full      Stage4 3.4711017 0.4359488 27.637530 596.1547
## DrugPlacebo1     strata1 DrugPlacebo 0.9455376 0.6281621  1.423265 594.2026
## AscitesY1        strata1    AscitesY 2.4777718 1.2209939  5.028161 594.2026
## SpidersY1        strata1    SpidersY 1.8126408 1.1574517  2.838707 594.2026
## Alk_Phos1        strata1    Alk_Phos 1.0000663 0.9999894  1.000143 594.2026
## SGOT1            strata1        SGOT 1.0052563 1.0019383  1.008585 594.2026
## Platelets1       strata1   Platelets 1.0007539 0.9985476  1.002965 594.2026
## Prothrombin1     strata1 Prothrombin 1.3210621 1.0351874  1.685883 594.2026
## Stage21          strata1      Stage2 1.6785487 0.2083933 13.520229 594.2026
## Stage31          strata1      Stage3 2.5929322 0.3390609 19.829175 594.2026
## Stage41          strata1      Stage4 3.3657947 0.4308816 26.291616 594.2026
## AscitesY2        strata2    AscitesY 2.4880955 1.2246105  5.055174 592.2746
## SpidersY2        strata2    SpidersY 1.8233423 1.1662176  2.850735 592.2746
## Alk_Phos2        strata2    Alk_Phos 1.0000668 0.9999900  1.000144 592.2746
## SGOT2            strata2        SGOT 1.0052288 1.0019292  1.008539 592.2746
## Platelets2       strata2   Platelets 1.0007435 0.9985317  1.002960 592.2746
## Prothrombin2     strata2 Prothrombin 1.3163781 1.0328854  1.677680 592.2746
## Stage22          strata2      Stage2 1.6426113 0.2049821 13.162964 592.2746
## Stage32          strata2      Stage3 2.5223103 0.3329273 19.109424 592.2746
## Stage42          strata2      Stage4 3.2578429 0.4226670 25.110882 592.2746
## AscitesY3        strata3    AscitesY 2.7920549 1.4310009  5.447635 590.5857
## SpidersY3        strata3    SpidersY 2.0210522 1.3033307  3.134010 590.5857
## Alk_Phos3        strata3    Alk_Phos 1.0000565 0.9999834  1.000129 590.5857
## SGOT3            strata3        SGOT 1.0044757 1.0012983  1.007663 590.5857
## Platelets3       strata3   Platelets 1.0005406 0.9983606  1.002725 590.5857
## Prothrombin3     strata3 Prothrombin 1.3878362 1.0955488  1.758104 590.5857
## AscitesY4        strata4    AscitesY 2.7268455 1.4085463  5.278979 588.8202
## SpidersY4        strata4    SpidersY 1.9879294 1.2884591  3.067124 588.8202
## Alk_Phos4        strata4    Alk_Phos 1.0000592 0.9999872  1.000131 588.8202
## SGOT4            strata4        SGOT 1.0044089 1.0012434  1.007584 588.8202
## Prothrombin4     strata4 Prothrombin 1.3939201 1.1005909  1.765427 588.8202
## AscitesY5        strata5    AscitesY 2.7164885 1.4009722  5.267278 589.2272
## SpidersY5        strata5    SpidersY 1.8779292 1.2250024  2.878866 589.2272
## SGOT5            strata5        SGOT 1.0045100 1.0013858  1.007644 589.2272
## Prothrombin5     strata5 Prothrombin 1.4177822 1.1204934  1.793948 589.2272
write.csv(stra_summary, "stratifiedmodel.csv", row.names = FALSE)

Model Strata Final : Model Strata 5

strata_model_final = strata5

summary(strata_model_final)
## Call:
## coxph(formula = y ~ strata(Z_star) + Ascites + Spiders + SGOT + 
##     Prothrombin, data = df)
## 
##   n= 276, number of events= 111 
## 
##                 coef exp(coef) se(coef)     z Pr(>|z|)   
## AscitesY    0.999340  2.716488 0.337850 2.958  0.00310 **
## SpidersY    0.630170  1.877929 0.217977 2.891  0.00384 **
## SGOT        0.004500  1.004510 0.001589 2.831  0.00464 **
## Prothrombin 0.349094  1.417782 0.120066 2.908  0.00364 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##             exp(coef) exp(-coef) lower .95 upper .95
## AscitesY        2.716     0.3681     1.401     5.267
## SpidersY        1.878     0.5325     1.225     2.879
## SGOT            1.005     0.9955     1.001     1.008
## Prothrombin     1.418     0.7053     1.120     1.794
## 
## Concordance= 0.704  (se = 0.034 )
## Likelihood ratio test= 38.08  on 4 df,   p=1e-07
## Wald test            = 39.55  on 4 df,   p=5e-08
## Score (logrank) test = 42.87  on 4 df,   p=1e-08
stra_base_haz = basehaz(strata_model_final, centered = FALSE)
print(stra_base_haz)
##           hazard time    strata
## 1   0.000000e+00 1735  Z_star=1
## 2   0.000000e+00 2221  Z_star=1
## 3   0.000000e+00 4039  Z_star=1
## 4   0.000000e+00 4190  Z_star=1
## 5   0.000000e+00 1433  Z_star=2
## 6   0.000000e+00 2504  Z_star=2
## 7   9.869487e-03 2583  Z_star=2
## 8   9.869487e-03 3611  Z_star=2
## 9   0.000000e+00 2332  Z_star=3
## 10  0.000000e+00 1230  Z_star=4
## 11  0.000000e+00 1525  Z_star=4
## 12  0.000000e+00 1967  Z_star=4
## 13  0.000000e+00 1457  Z_star=5
## 14  0.000000e+00 1481  Z_star=5
## 15  0.000000e+00 1831  Z_star=5
## 16  0.000000e+00 1978  Z_star=5
## 17  1.123837e-03 2055  Z_star=5
## 18  1.123837e-03 2241  Z_star=5
## 19  1.123837e-03 2294  Z_star=5
## 20  1.123837e-03 2666  Z_star=5
## 21  1.123837e-03 2772  Z_star=5
## 22  1.123837e-03 2863  Z_star=5
## 23  3.449110e-03 3170  Z_star=5
## 24  3.449110e-03 3672  Z_star=5
## 25  3.449110e-03 4232  Z_star=5
## 26  3.449110e-03 4256  Z_star=5
## 27  0.000000e+00 2255  Z_star=6
## 28  0.000000e+00 2272  Z_star=6
## 29  0.000000e+00 3388  Z_star=6
## 30  1.209801e-02 3584  Z_star=6
## 31  7.529782e-04  198  Z_star=7
## 32  7.529782e-04 1149  Z_star=7
## 33  7.529782e-04 1271  Z_star=7
## 34  7.529782e-04 1301  Z_star=7
## 35  7.529782e-04 1321  Z_star=7
## 36  7.529782e-04 1434  Z_star=7
## 37  7.529782e-04 1568  Z_star=7
## 38  7.529782e-04 1701  Z_star=7
## 39  7.529782e-04 1776  Z_star=7
## 40  2.704706e-03 1847  Z_star=7
## 41  2.704706e-03 1945  Z_star=7
## 42  2.704706e-03 2022  Z_star=7
## 43  2.704706e-03 2357  Z_star=7
## 44  2.704706e-03 3092  Z_star=7
## 45  2.704706e-03 3823  Z_star=7
## 46  2.704706e-03 4184  Z_star=7
## 47  2.414031e-04  515  Z_star=8
## 48  4.875793e-04  694  Z_star=8
## 49  4.875793e-04  994  Z_star=8
## 50  4.875793e-04 1216  Z_star=8
## 51  4.875793e-04 1295  Z_star=8
## 52  4.875793e-04 1300  Z_star=8
## 53  4.875793e-04 1401  Z_star=8
## 54  4.875793e-04 1569  Z_star=8
## 55  4.875793e-04 1614  Z_star=8
## 56  4.875793e-04 1702  Z_star=8
## 57  4.875793e-04 1769  Z_star=8
## 58  4.875793e-04 1785  Z_star=8
## 59  4.875793e-04 1790  Z_star=8
## 60  4.875793e-04 1832  Z_star=8
## 61  4.875793e-04 1932  Z_star=8
## 62  4.875793e-04 1951  Z_star=8
## 63  4.875793e-04 2050  Z_star=8
## 64  4.875793e-04 2106  Z_star=8
## 65  4.875793e-04 2178  Z_star=8
## 66  4.875793e-04 2216  Z_star=8
## 67  8.548509e-04 2224  Z_star=8
## 68  1.249854e-03 2297  Z_star=8
## 69  1.249854e-03 2365  Z_star=8
## 70  1.662774e-03 2419  Z_star=8
## 71  1.662774e-03 2443  Z_star=8
## 72  1.662774e-03 2452  Z_star=8
## 73  2.111144e-03 2466  Z_star=8
## 74  2.111144e-03 2527  Z_star=8
## 75  2.111144e-03 2576  Z_star=8
## 76  2.598555e-03 2598  Z_star=8
## 77  2.598555e-03 2609  Z_star=8
## 78  2.598555e-03 2624  Z_star=8
## 79  3.129077e-03 2769  Z_star=8
## 80  3.129077e-03 2835  Z_star=8
## 81  3.129077e-03 2870  Z_star=8
## 82  3.129077e-03 2976  Z_star=8
## 83  3.129077e-03 3050  Z_star=8
## 84  3.129077e-03 3059  Z_star=8
## 85  3.129077e-03 3069  Z_star=8
## 86  3.880410e-03 3086  Z_star=8
## 87  3.880410e-03 3098  Z_star=8
## 88  3.880410e-03 3099  Z_star=8
## 89  3.880410e-03 3149  Z_star=8
## 90  3.880410e-03 3150  Z_star=8
## 91  3.880410e-03 3255  Z_star=8
## 92  3.880410e-03 3297  Z_star=8
## 93  3.880410e-03 3422  Z_star=8
## 94  3.880410e-03 3577  Z_star=8
## 95  3.880410e-03 3581  Z_star=8
## 96  3.880410e-03 3707  Z_star=8
## 97  5.680809e-03 3853  Z_star=8
## 98  5.680809e-03 3933  Z_star=8
## 99  5.680809e-03 4032  Z_star=8
## 100 5.680809e-03 4127  Z_star=8
## 101 5.680809e-03 4365  Z_star=8
## 102 5.680809e-03 4500  Z_star=8
## 103 5.680809e-03 4556  Z_star=8
## 104 0.000000e+00 1030  Z_star=9
## 105 0.000000e+00 1153  Z_star=9
## 106 0.000000e+00 1250  Z_star=9
## 107 1.960749e-03 1682  Z_star=9
## 108 1.960749e-03 1770  Z_star=9
## 109 4.782734e-03 1786  Z_star=9
## 110 8.017608e-03 2090  Z_star=9
## 111 8.017608e-03 2990  Z_star=9
## 112 8.017608e-03 3445  Z_star=9
## 113 8.017608e-03 4509  Z_star=9
## 114 5.040556e-04   77 Z_star=11
## 115 1.192950e-03  110 Z_star=11
## 116 2.162815e-03  131 Z_star=11
## 117 4.057924e-03  552 Z_star=11
## 118 6.685656e-03 1077 Z_star=11
## 119 6.685656e-03 1320 Z_star=11
## 120 4.302500e-04   41 Z_star=12
## 121 1.262619e-03  140 Z_star=12
## 122 2.583413e-03  191 Z_star=12
## 123 4.957108e-03  348 Z_star=12
## 124 1.479448e-02 1012 Z_star=12
## 125 0.000000e+00  737 Z_star=13
## 126 0.000000e+00 2318 Z_star=13
## 127 0.000000e+00 2657 Z_star=13
## 128 4.984691e-04  304 Z_star=14
## 129 1.089230e-03  549 Z_star=14
## 130 2.827021e-03  750 Z_star=14
## 131 2.827021e-03 2157 Z_star=14
## 132 2.827021e-03 2176 Z_star=14
## 133 2.827021e-03 2301 Z_star=14
## 134 2.827021e-03 2363 Z_star=14
## 135 5.952448e-04   51 Z_star=15
## 136 1.478833e-03  179 Z_star=15
## 137 3.232320e-03  388 Z_star=15
## 138 6.724913e-03 1576 Z_star=15
## 139 6.724913e-03 1656 Z_star=15
## 140 3.330188e-04  733 Z_star=16
## 141 3.330188e-04  788 Z_star=16
## 142 6.977074e-04  790 Z_star=16
## 143 6.977074e-04  839 Z_star=16
## 144 6.977074e-04  877 Z_star=16
## 145 1.093679e-03  974 Z_star=16
## 146 1.500112e-03 1212 Z_star=16
## 147 1.500112e-03 1293 Z_star=16
## 148 1.500112e-03 1349 Z_star=16
## 149 1.500112e-03 1408 Z_star=16
## 150 1.500112e-03 1420 Z_star=16
## 151 1.977076e-03 1427 Z_star=16
## 152 2.471670e-03 1434 Z_star=16
## 153 2.471670e-03 1435 Z_star=16
## 154 2.471670e-03 1455 Z_star=16
## 155 2.471670e-03 1504 Z_star=16
## 156 2.471670e-03 1882 Z_star=16
## 157 2.471670e-03 1908 Z_star=16
## 158 2.471670e-03 1979 Z_star=16
## 159 2.471670e-03 2033 Z_star=16
## 160 3.519207e-03 2105 Z_star=16
## 161 3.519207e-03 2330 Z_star=16
## 162 3.519207e-03 2475 Z_star=16
## 163 5.235208e-03 2689 Z_star=16
## 164 7.273585e-03 3244 Z_star=16
## 165 1.032199e-02 3428 Z_star=16
## 166 1.032199e-02 3913 Z_star=16
## 167 7.272501e-05   71 Z_star=17
## 168 1.466129e-04  186 Z_star=17
## 169 2.217187e-04  216 Z_star=17
## 170 3.100606e-04  264 Z_star=17
## 171 4.055001e-04  321 Z_star=17
## 172 5.023332e-04  326 Z_star=17
## 173 6.018281e-04  400 Z_star=17
## 174 7.084440e-04  460 Z_star=17
## 175 7.084440e-04  533 Z_star=17
## 176 8.202454e-04  597 Z_star=17
## 177 9.340975e-04  673 Z_star=17
## 178 9.340975e-04  732 Z_star=17
## 179 1.051319e-03  769 Z_star=17
## 180 1.169460e-03  786 Z_star=17
## 181 1.288804e-03  797 Z_star=17
## 182 1.288804e-03  837 Z_star=17
## 183 1.410683e-03  853 Z_star=17
## 184 1.534634e-03  859 Z_star=17
## 185 1.534634e-03  901 Z_star=17
## 186 1.665120e-03  943 Z_star=17
## 187 1.796984e-03  980 Z_star=17
## 188 1.931717e-03  999 Z_star=17
## 189 1.931717e-03 1067 Z_star=17
## 190 2.068564e-03 1080 Z_star=17
## 191 2.207396e-03 1083 Z_star=17
## 192 2.207396e-03 1084 Z_star=17
## 193 2.351107e-03 1165 Z_star=17
## 194 2.498987e-03 1170 Z_star=17
## 195 2.822970e-03 1191 Z_star=17
## 196 2.822970e-03 1216 Z_star=17
## 197 2.822970e-03 1234 Z_star=17
## 198 3.016280e-03 1297 Z_star=17
## 199 3.016280e-03 1329 Z_star=17
## 200 3.215905e-03 1356 Z_star=17
## 201 3.215905e-03 1363 Z_star=17
## 202 3.215905e-03 1412 Z_star=17
## 203 3.428044e-03 1413 Z_star=17
## 204 3.428044e-03 1418 Z_star=17
## 205 3.652559e-03 1444 Z_star=17
## 206 3.883584e-03 1536 Z_star=17
## 207 3.883584e-03 1542 Z_star=17
## 208 3.883584e-03 1558 Z_star=17
## 209 3.883584e-03 1592 Z_star=17
## 210 3.883584e-03 1615 Z_star=17
## 211 4.139206e-03 1657 Z_star=17
## 212 4.139206e-03 1666 Z_star=17
## 213 4.682734e-03 1690 Z_star=17
## 214 4.970227e-03 1741 Z_star=17
## 215 4.970227e-03 1783 Z_star=17
## 216 5.280454e-03 1827 Z_star=17
## 217 5.280454e-03 1882 Z_star=17
## 218 5.609118e-03 1925 Z_star=17
## 219 5.947787e-03 2256 Z_star=17
## 220 6.305326e-03 2288 Z_star=17
## 221 6.305326e-03 2350 Z_star=17
## 222 6.684035e-03 2386 Z_star=17
## 223 7.078027e-03 2400 Z_star=17
## 224 7.078027e-03 2449 Z_star=17
## 225 7.078027e-03 2456 Z_star=17
## 226 7.078027e-03 2468 Z_star=17
## 227 7.078027e-03 2556 Z_star=17
## 228 7.078027e-03 2563 Z_star=17
## 229 7.078027e-03 2573 Z_star=17
## 230 7.078027e-03 2692 Z_star=17
## 231 7.078027e-03 2721 Z_star=17
## 232 7.078027e-03 2797 Z_star=17
## 233 7.680290e-03 2847 Z_star=17
## 234 7.680290e-03 2944 Z_star=17
## 235 8.325377e-03 3282 Z_star=17
## 236 9.025615e-03 3358 Z_star=17
## 237 9.769074e-03 3395 Z_star=17
## 238 1.057062e-02 3445 Z_star=17
## 239 1.160427e-02 3762 Z_star=17
## 240 1.160427e-02 3820 Z_star=17
## 241 1.296795e-02 3839 Z_star=17
## 242 1.296795e-02 3992 Z_star=17
## 243 1.296795e-02 4050 Z_star=17
## 244 1.516731e-02 4079 Z_star=17
## 245 1.787979e-02 4191 Z_star=17
## 246 1.787979e-02 4196 Z_star=17
## 247 1.787979e-02 4427 Z_star=17
## 248 1.787979e-02 4523 Z_star=17
## 249 2.874178e-04  223 Z_star=18
## 250 6.125826e-04  334 Z_star=18
## 251 9.641534e-04  611 Z_star=18
## 252 1.325353e-03  762 Z_star=18
## 253 1.699290e-03  799 Z_star=18
## 254 2.079636e-03  850 Z_star=18
## 255 2.517991e-03  890 Z_star=18
## 256 2.978660e-03  904 Z_star=18
## 257 3.453652e-03  930 Z_star=18
## 258 3.453652e-03  939 Z_star=18
## 259 3.966683e-03 1152 Z_star=18
## 260 4.500324e-03 1235 Z_star=18
## 261 4.500324e-03 1302 Z_star=18
## 262 5.137011e-03 1360 Z_star=18
## 263 5.137011e-03 1363 Z_star=18
## 264 5.823144e-03 1487 Z_star=18
## 265 5.823144e-03 1765 Z_star=18
## 266 5.823144e-03 1810 Z_star=18
## 267 7.120756e-03 2540 Z_star=18
## 268 8.722778e-03 2796 Z_star=18
## 269 8.722778e-03 2995 Z_star=18
## 270 1.068608e-02 3090 Z_star=18
## 271 1.068608e-02 3336 Z_star=18
## 272 2.290183e-02 3574 Z_star=18

Asumsi PH Model Strata Final

ph.test_stra = cox.zph(strata_model_final)
print(ph.test_stra)
##               chisq df     p
## Ascites     2.88512  1 0.089
## Spiders     0.00101  1 0.975
## SGOT        0.17190  1 0.678
## Prothrombin 2.47512  1 0.116
## GLOBAL      4.99145  4 0.288

Model COX Stratified dengan Interaksi

strata.int_full = coxph(y ~  Drug + Age + Sex + Ascites + Spiders + Alk_Phos + SGOT + Platelets + Prothrombin + Stage + 
                  Drug*Z_star + Age*Z_star + Sex*Z_star + Ascites*Z_star + Spiders*Z_star + Alk_Phos*Z_star + SGOT*Z_star + Platelets*Z_star + Prothrombin*Z_star + Stage*Z_star + 
                  strata(Z_star), 
                data = df)
## Warning in coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 10,11,12,23,24,25 ; coefficient may be
## infinite.
summary(strata.int_full)
## Call:
## coxph(formula = y ~ Drug + Age + Sex + Ascites + Spiders + Alk_Phos + 
##     SGOT + Platelets + Prothrombin + Stage + Drug * Z_star + 
##     Age * Z_star + Sex * Z_star + Ascites * Z_star + Spiders * 
##     Z_star + Alk_Phos * Z_star + SGOT * Z_star + Platelets * 
##     Z_star + Prothrombin * Z_star + Stage * Z_star + strata(Z_star), 
##     data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)   
## DrugPlacebo        -1.213e+00  2.972e-01  9.340e-01 -1.299  0.19393   
## Age                 1.675e-04  1.000e+00  3.061e-04  0.547  0.58424   
## SexM                7.490e-01  2.115e+00  1.954e+00  0.383  0.70146   
## AscitesY            9.355e+00  1.155e+04  3.629e+00  2.578  0.00994 **
## SpidersY           -5.537e-02  9.461e-01  1.272e+00 -0.044  0.96527   
## Alk_Phos            2.690e-04  1.000e+00  1.842e-04  1.460  0.14421   
## SGOT                8.564e-03  1.009e+00  7.963e-03  1.075  0.28217   
## Platelets           8.024e-03  1.008e+00  6.047e-03  1.327  0.18456   
## Prothrombin         2.136e-01  1.238e+00  8.839e-01  0.242  0.80905   
## Stage2              2.629e+01  2.628e+11  6.759e+03  0.004  0.99690   
## Stage3              2.762e+01  9.879e+11  6.759e+03  0.004  0.99674   
## Stage4              2.762e+01  9.841e+11  6.759e+03  0.004  0.99674   
## Z_star                     NA         NA  0.000e+00     NA       NA   
## DrugPlacebo:Z_star  7.999e-02  1.083e+00  6.053e-02  1.322  0.18632   
## Age:Z_star         -3.852e-06  1.000e+00  1.892e-05 -0.204  0.83866   
## SexM:Z_star        -3.585e-02  9.648e-01  1.209e-01 -0.297  0.76676   
## AscitesY:Z_star    -5.133e-01  5.985e-01  2.176e-01 -2.359  0.01834 * 
## SpidersY:Z_star     4.076e-02  1.042e+00  7.929e-02  0.514  0.60724   
## Alk_Phos:Z_star    -1.381e-05  1.000e+00  1.163e-05 -1.187  0.23539   
## SGOT:Z_star        -1.876e-04  9.998e-01  5.125e-04 -0.366  0.71429   
## Platelets:Z_star   -4.354e-04  9.996e-01  3.780e-04 -1.152  0.24940   
## Prothrombin:Z_star  8.839e-03  1.009e+00  5.359e-02  0.165  0.86898   
## Stage2:Z_star      -1.541e+00  2.142e-01  3.976e+02 -0.004  0.99691   
## Stage3:Z_star      -1.604e+00  2.011e-01  3.976e+02 -0.004  0.99678   
## Stage4:Z_star      -1.598e+00  2.024e-01  3.976e+02 -0.004  0.99679   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef) lower .95 upper .95
## DrugPlacebo        2.972e-01  3.365e+00   0.04764 1.854e+00
## Age                1.000e+00  9.998e-01   0.99957 1.001e+00
## SexM               2.115e+00  4.728e-01   0.04593 9.739e+01
## AscitesY           1.155e+04  8.655e-05   9.41989 1.417e+07
## SpidersY           9.461e-01  1.057e+00   0.07824 1.144e+01
## Alk_Phos           1.000e+00  9.997e-01   0.99991 1.001e+00
## SGOT               1.009e+00  9.915e-01   0.99298 1.024e+00
## Platelets          1.008e+00  9.920e-01   0.99618 1.020e+00
## Prothrombin        1.238e+00  8.077e-01   0.21899 7.000e+00
## Stage2             2.628e+11  3.805e-12   0.00000       Inf
## Stage3             9.879e+11  1.012e-12   0.00000       Inf
## Stage4             9.841e+11  1.016e-12   0.00000       Inf
## Z_star                    NA         NA        NA        NA
## DrugPlacebo:Z_star 1.083e+00  9.231e-01   0.96209 1.220e+00
## Age:Z_star         1.000e+00  1.000e+00   0.99996 1.000e+00
## SexM:Z_star        9.648e-01  1.037e+00   0.76128 1.223e+00
## AscitesY:Z_star    5.985e-01  1.671e+00   0.39068 9.169e-01
## SpidersY:Z_star    1.042e+00  9.601e-01   0.89168 1.217e+00
## Alk_Phos:Z_star    1.000e+00  1.000e+00   0.99996 1.000e+00
## SGOT:Z_star        9.998e-01  1.000e+00   0.99881 1.001e+00
## Platelets:Z_star   9.996e-01  1.000e+00   0.99882 1.000e+00
## Prothrombin:Z_star 1.009e+00  9.912e-01   0.90829 1.121e+00
## Stage2:Z_star      2.142e-01  4.669e+00   0.00000       Inf
## Stage3:Z_star      2.011e-01  4.972e+00   0.00000       Inf
## Stage4:Z_star      2.024e-01  4.941e+00   0.00000       Inf
## 
## Concordance= 0.741  (se = 0.03 )
## Likelihood ratio test= 60.74  on 24 df,   p=5e-05
## Wald test            = 23.58  on 24 df,   p=0.5
## Score (logrank) test = 66.24  on 24 df,   p=8e-06

Model Strata Int 1 : Tanpa drug dan interaksinya

strata.int1 = coxph(y ~ Age + Sex + Ascites + Spiders + Alk_Phos + SGOT + Platelets + Prothrombin + Stage 
                     + Age*Z_star + Sex*Z_star + Ascites*Z_star + Spiders*Z_star + Alk_Phos*Z_star + SGOT*Z_star + Platelets*Z_star + Prothrombin*Z_star + Stage*Z_star + 
                       strata(Z_star), 
                     data = df) 
## Warning in coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 9,10,11,21,22,23 ; coefficient may be infinite.
summary(strata.int1)
## Call:
## coxph(formula = y ~ Age + Sex + Ascites + Spiders + Alk_Phos + 
##     SGOT + Platelets + Prothrombin + Stage + Age * Z_star + Sex * 
##     Z_star + Ascites * Z_star + Spiders * Z_star + Alk_Phos * 
##     Z_star + SGOT * Z_star + Platelets * Z_star + Prothrombin * 
##     Z_star + Stage * Z_star + strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)  
## Age                 2.064e-04  1.000e+00  2.973e-04  0.694   0.4876  
## SexM                6.946e-01  2.003e+00  1.931e+00  0.360   0.7191  
## AscitesY            8.844e+00  6.934e+03  3.601e+00  2.456   0.0141 *
## SpidersY           -4.885e-02  9.523e-01  1.242e+00 -0.039   0.9686  
## Alk_Phos            2.870e-04  1.000e+00  1.802e-04  1.593   0.1112  
## SGOT                7.346e-03  1.007e+00  7.491e-03  0.981   0.3268  
## Platelets           8.906e-03  1.009e+00  6.147e-03  1.449   0.1474  
## Prothrombin        -1.312e-01  8.770e-01  8.286e-01 -0.158   0.8742  
## Stage2              2.556e+01  1.264e+11  6.556e+03  0.004   0.9969  
## Stage3              2.705e+01  5.603e+11  6.556e+03  0.004   0.9967  
## Stage4              2.706e+01  5.652e+11  6.556e+03  0.004   0.9967  
## Z_star                     NA         NA  0.000e+00     NA       NA  
## Age:Z_star         -6.336e-06  1.000e+00  1.841e-05 -0.344   0.7307  
## SexM:Z_star        -3.343e-02  9.671e-01  1.199e-01 -0.279   0.7804  
## AscitesY:Z_star    -4.856e-01  6.153e-01  2.162e-01 -2.247   0.0247 *
## SpidersY:Z_star     3.885e-02  1.040e+00  7.754e-02  0.501   0.6164  
## Alk_Phos:Z_star    -1.489e-05  1.000e+00  1.141e-05 -1.305   0.1920  
## SGOT:Z_star        -9.775e-05  9.999e-01  4.856e-04 -0.201   0.8405  
## Platelets:Z_star   -4.856e-04  9.995e-01  3.835e-04 -1.266   0.2055  
## Prothrombin:Z_star  2.991e-02  1.030e+00  5.039e-02  0.593   0.5529  
## Stage2:Z_star      -1.494e+00  2.244e-01  3.857e+02 -0.004   0.9969  
## Stage3:Z_star      -1.565e+00  2.090e-01  3.857e+02 -0.004   0.9968  
## Stage4:Z_star      -1.558e+00  2.106e-01  3.857e+02 -0.004   0.9968  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef) lower .95 upper .95
## Age                1.000e+00  9.998e-01   0.99962 1.001e+00
## SexM               2.003e+00  4.993e-01   0.04546 8.824e+01
## AscitesY           6.934e+03  1.442e-04   5.96469 8.061e+06
## SpidersY           9.523e-01  1.050e+00   0.08348 1.086e+01
## Alk_Phos           1.000e+00  9.997e-01   0.99993 1.001e+00
## SGOT               1.007e+00  9.927e-01   0.99269 1.022e+00
## Platelets          1.009e+00  9.911e-01   0.99686 1.021e+00
## Prothrombin        8.770e-01  1.140e+00   0.17286 4.450e+00
## Stage2             1.264e+11  7.912e-12   0.00000       Inf
## Stage3             5.603e+11  1.785e-12   0.00000       Inf
## Stage4             5.652e+11  1.769e-12   0.00000       Inf
## Z_star                    NA         NA        NA        NA
## Age:Z_star         1.000e+00  1.000e+00   0.99996 1.000e+00
## SexM:Z_star        9.671e-01  1.034e+00   0.76460 1.223e+00
## AscitesY:Z_star    6.153e-01  1.625e+00   0.40280 9.399e-01
## SpidersY:Z_star    1.040e+00  9.619e-01   0.89304 1.210e+00
## Alk_Phos:Z_star    1.000e+00  1.000e+00   0.99996 1.000e+00
## SGOT:Z_star        9.999e-01  1.000e+00   0.99895 1.001e+00
## Platelets:Z_star   9.995e-01  1.000e+00   0.99876 1.000e+00
## Prothrombin:Z_star 1.030e+00  9.705e-01   0.93346 1.137e+00
## Stage2:Z_star      2.244e-01  4.457e+00   0.00000       Inf
## Stage3:Z_star      2.090e-01  4.785e+00   0.00000       Inf
## Stage4:Z_star      2.106e-01  4.749e+00   0.00000       Inf
## 
## Concordance= 0.737  (se = 0.03 )
## Likelihood ratio test= 58.96  on 22 df,   p=3e-05
## Wald test            = 22.01  on 22 df,   p=0.5
## Score (logrank) test = 64.28  on 22 df,   p=5e-06

Model Strata Int 2 : Tanpa drug,sex dan interaksinya

strata.int2 = coxph(y ~ Age  + Ascites + Spiders + Alk_Phos + SGOT + Platelets + Prothrombin + Stage 
                     + Age*Z_star + Ascites*Z_star + Spiders*Z_star + Alk_Phos*Z_star + SGOT*Z_star + Platelets*Z_star + Prothrombin*Z_star + Stage*Z_star + 
                       strata(Z_star), 
                     data = df)
## Warning in coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 8,9,10,19,20,21 ; coefficient may be infinite.
summary(strata.int2)
## Call:
## coxph(formula = y ~ Age + Ascites + Spiders + Alk_Phos + SGOT + 
##     Platelets + Prothrombin + Stage + Age * Z_star + Ascites * 
##     Z_star + Spiders * Z_star + Alk_Phos * Z_star + SGOT * Z_star + 
##     Platelets * Z_star + Prothrombin * Z_star + Stage * Z_star + 
##     strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)  
## Age                 1.949e-04  1.000e+00  2.949e-04  0.661   0.5087  
## AscitesY            8.407e+00  4.477e+03  3.525e+00  2.385   0.0171 *
## SpidersY           -9.784e-02  9.068e-01  1.239e+00 -0.079   0.9371  
## Alk_Phos            2.789e-04  1.000e+00  1.809e-04  1.541   0.1232  
## SGOT                6.336e-03  1.006e+00  7.323e-03  0.865   0.3870  
## Platelets           8.765e-03  1.009e+00  6.072e-03  1.443   0.1489  
## Prothrombin        -4.729e-02  9.538e-01  8.126e-01 -0.058   0.9536  
## Stage2              2.571e+01  1.458e+11  6.702e+03  0.004   0.9969  
## Stage3              2.724e+01  6.777e+11  6.702e+03  0.004   0.9968  
## Stage4              2.744e+01  8.268e+11  6.702e+03  0.004   0.9967  
## Z_star                     NA         NA  0.000e+00     NA       NA  
## Age:Z_star         -5.547e-06  1.000e+00  1.824e-05 -0.304   0.7610  
## AscitesY:Z_star    -4.589e-01  6.320e-01  2.114e-01 -2.171   0.0300 *
## SpidersY:Z_star     4.011e-02  1.041e+00  7.725e-02  0.519   0.6036  
## Alk_Phos:Z_star    -1.432e-05  1.000e+00  1.144e-05 -1.251   0.2108  
## SGOT:Z_star        -3.781e-05  1.000e+00  4.774e-04 -0.079   0.9369  
## Platelets:Z_star   -4.827e-04  9.995e-01  3.772e-04 -1.280   0.2006  
## Prothrombin:Z_star  2.465e-02  1.025e+00  4.943e-02  0.499   0.6181  
## Stage2:Z_star      -1.507e+00  2.216e-01  3.942e+02 -0.004   0.9970  
## Stage3:Z_star      -1.580e+00  2.060e-01  3.942e+02 -0.004   0.9968  
## Stage4:Z_star      -1.584e+00  2.051e-01  3.942e+02 -0.004   0.9968  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef) lower .95 upper .95
## Age                1.000e+00  9.998e-01    0.9996 1.001e+00
## AscitesY           4.477e+03  2.234e-04    4.4745 4.479e+06
## SpidersY           9.068e-01  1.103e+00    0.0799 1.029e+01
## Alk_Phos           1.000e+00  9.997e-01    0.9999 1.001e+00
## SGOT               1.006e+00  9.937e-01    0.9920 1.021e+00
## Platelets          1.009e+00  9.913e-01    0.9969 1.021e+00
## Prothrombin        9.538e-01  1.048e+00    0.1940 4.689e+00
## Stage2             1.458e+11  6.858e-12    0.0000       Inf
## Stage3             6.777e+11  1.476e-12    0.0000       Inf
## Stage4             8.268e+11  1.209e-12    0.0000       Inf
## Z_star                    NA         NA        NA        NA
## Age:Z_star         1.000e+00  1.000e+00    1.0000 1.000e+00
## AscitesY:Z_star    6.320e-01  1.582e+00    0.4176 9.565e-01
## SpidersY:Z_star    1.041e+00  9.607e-01    0.8947 1.211e+00
## Alk_Phos:Z_star    1.000e+00  1.000e+00    1.0000 1.000e+00
## SGOT:Z_star        1.000e+00  1.000e+00    0.9990 1.001e+00
## Platelets:Z_star   9.995e-01  1.000e+00    0.9988 1.000e+00
## Prothrombin:Z_star 1.025e+00  9.757e-01    0.9303 1.129e+00
## Stage2:Z_star      2.216e-01  4.512e+00    0.0000       Inf
## Stage3:Z_star      2.060e-01  4.853e+00    0.0000       Inf
## Stage4:Z_star      2.051e-01  4.876e+00    0.0000       Inf
## 
## Concordance= 0.739  (se = 0.03 )
## Likelihood ratio test= 58.62  on 20 df,   p=1e-05
## Wald test            = 21.6  on 20 df,   p=0.4
## Score (logrank) test = 63.88  on 20 df,   p=2e-06

Model Strata Int 3 : Tanpa drug,sex,age, dan interaksinya

strata.int3 = coxph(y ~ Ascites + Spiders + Alk_Phos + SGOT + Platelets + Prothrombin + Stage 
                       + Ascites*Z_star + Spiders*Z_star + Alk_Phos*Z_star + SGOT*Z_star + Platelets*Z_star + Prothrombin*Z_star + Stage*Z_star + 
                       strata(Z_star), 
                     data = df) 
## Warning in coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 7,8,9,17,18,19 ; coefficient may be infinite.
summary(strata.int3)
## Call:
## coxph(formula = y ~ Ascites + Spiders + Alk_Phos + SGOT + Platelets + 
##     Prothrombin + Stage + Ascites * Z_star + Spiders * Z_star + 
##     Alk_Phos * Z_star + SGOT * Z_star + Platelets * Z_star + 
##     Prothrombin * Z_star + Stage * Z_star + strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)  
## AscitesY            7.497e+00  1.802e+03  3.462e+00  2.165   0.0304 *
## SpidersY           -3.735e-01  6.883e-01  1.198e+00 -0.312   0.7552  
## Alk_Phos            3.312e-04  1.000e+00  1.751e-04  1.892   0.0585 .
## SGOT                6.344e-03  1.006e+00  7.374e-03  0.860   0.3896  
## Platelets           7.918e-03  1.008e+00  5.835e-03  1.357   0.1748  
## Prothrombin         2.780e-03  1.003e+00  8.057e-01  0.003   0.9972  
## Stage2              2.525e+01  9.290e+10  6.525e+03  0.004   0.9969  
## Stage3              2.712e+01  5.996e+11  6.525e+03  0.004   0.9967  
## Stage4              2.735e+01  7.527e+11  6.525e+03  0.004   0.9967  
## Z_star                     NA         NA  0.000e+00     NA       NA  
## AscitesY:Z_star    -4.056e-01  6.666e-01  2.078e-01 -1.951   0.0510 .
## SpidersY:Z_star     5.860e-02  1.060e+00  7.473e-02  0.784   0.4329  
## Alk_Phos:Z_star    -1.721e-05  1.000e+00  1.115e-05 -1.544   0.1227  
## SGOT:Z_star        -8.106e-05  9.999e-01  4.785e-04 -0.169   0.8655  
## Platelets:Z_star   -4.626e-04  9.995e-01  3.614e-04 -1.280   0.2006  
## Prothrombin:Z_star  2.259e-02  1.023e+00  4.895e-02  0.461   0.6445  
## Stage2:Z_star      -1.483e+00  2.270e-01  3.838e+02 -0.004   0.9969  
## Stage3:Z_star      -1.574e+00  2.073e-01  3.838e+02 -0.004   0.9967  
## Stage4:Z_star      -1.576e+00  2.067e-01  3.838e+02 -0.004   0.9967  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef) lower .95 upper .95
## AscitesY           1.802e+03  5.550e-04   2.03460 1.596e+06
## SpidersY           6.883e-01  1.453e+00   0.06574 7.206e+00
## Alk_Phos           1.000e+00  9.997e-01   0.99999 1.001e+00
## SGOT               1.006e+00  9.937e-01   0.99192 1.021e+00
## Platelets          1.008e+00  9.921e-01   0.99649 1.020e+00
## Prothrombin        1.003e+00  9.972e-01   0.20672 4.865e+00
## Stage2             9.290e+10  1.076e-11   0.00000       Inf
## Stage3             5.996e+11  1.668e-12   0.00000       Inf
## Stage4             7.527e+11  1.328e-12   0.00000       Inf
## Z_star                    NA         NA        NA        NA
## AscitesY:Z_star    6.666e-01  1.500e+00   0.44357 1.002e+00
## SpidersY:Z_star    1.060e+00  9.431e-01   0.91589 1.228e+00
## Alk_Phos:Z_star    1.000e+00  1.000e+00   0.99996 1.000e+00
## SGOT:Z_star        9.999e-01  1.000e+00   0.99898 1.001e+00
## Platelets:Z_star   9.995e-01  1.000e+00   0.99883 1.000e+00
## Prothrombin:Z_star 1.023e+00  9.777e-01   0.92926 1.126e+00
## Stage2:Z_star      2.270e-01  4.406e+00   0.00000       Inf
## Stage3:Z_star      2.073e-01  4.825e+00   0.00000       Inf
## Stage4:Z_star      2.067e-01  4.838e+00   0.00000       Inf
## 
## Concordance= 0.72  (se = 0.033 )
## Likelihood ratio test= 55.82  on 18 df,   p=1e-05
## Wald test            = 22.76  on 18 df,   p=0.2
## Score (logrank) test = 59.77  on 18 df,   p=2e-06

Model Strata Int 4 : Tanpa drug,sex,age,alk_phos dan interaksinya

strata.int4 = coxph(y ~ Ascites + Spiders  + SGOT + Platelets + Prothrombin + Stage 
                      + Ascites*Z_star + Spiders*Z_star + SGOT*Z_star + Platelets*Z_star + Prothrombin*Z_star + Stage*Z_star + 
                       strata(Z_star), 
                     data = df)
## Warning in coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 6,7,8,15,16,17 ; coefficient may be infinite.
summary(strata.int4)
## Call:
## coxph(formula = y ~ Ascites + Spiders + SGOT + Platelets + Prothrombin + 
##     Stage + Ascites * Z_star + Spiders * Z_star + SGOT * Z_star + 
##     Platelets * Z_star + Prothrombin * Z_star + Stage * Z_star + 
##     strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)  
## AscitesY            7.916e+00  2.742e+03  3.492e+00  2.267   0.0234 *
## SpidersY            3.963e-01  1.486e+00  1.134e+00  0.350   0.7266  
## SGOT                5.259e-03  1.005e+00  7.426e-03  0.708   0.4788  
## Platelets           1.042e-02  1.010e+00  5.863e-03  1.778   0.0755 .
## Prothrombin        -3.842e-02  9.623e-01  7.658e-01 -0.050   0.9600  
## Stage2              2.520e+01  8.766e+10  5.392e+03  0.005   0.9963  
## Stage3              2.661e+01  3.599e+11  5.392e+03  0.005   0.9961  
## Stage4              2.690e+01  4.818e+11  5.392e+03  0.005   0.9960  
## Z_star                     NA         NA  0.000e+00     NA       NA  
## AscitesY:Z_star    -4.273e-01  6.522e-01  2.095e-01 -2.040   0.0414 *
## SpidersY:Z_star     1.078e-02  1.011e+00  7.102e-02  0.152   0.8793  
## SGOT:Z_star        -1.460e-05  1.000e+00  4.805e-04 -0.030   0.9758  
## Platelets:Z_star   -5.986e-04  9.994e-01  3.628e-04 -1.650   0.0989 .
## Prothrombin:Z_star  2.570e-02  1.026e+00  4.673e-02  0.550   0.5823  
## Stage2:Z_star      -1.475e+00  2.288e-01  3.172e+02 -0.005   0.9963  
## Stage3:Z_star      -1.539e+00  2.147e-01  3.172e+02 -0.005   0.9961  
## Stage4:Z_star      -1.549e+00  2.125e-01  3.172e+02 -0.005   0.9961  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef)  lower .95  upper .95
## AscitesY           2.742e+03  3.647e-04  2.920e+00  2.575e+06
## SpidersY           1.486e+00  6.728e-01  1.611e-01  1.371e+01
## SGOT               1.005e+00  9.948e-01  9.907e-01  1.020e+00
## Platelets          1.010e+00  9.896e-01  9.989e-01  1.022e+00
## Prothrombin        9.623e-01  1.039e+00  2.145e-01  4.317e+00
## Stage2             8.766e+10  1.141e-11  0.000e+00        Inf
## Stage3             3.599e+11  2.779e-12  0.000e+00        Inf
## Stage4             4.818e+11  2.075e-12  0.000e+00        Inf
## Z_star                    NA         NA         NA         NA
## AscitesY:Z_star    6.522e-01  1.533e+00  4.326e-01  9.834e-01
## SpidersY:Z_star    1.011e+00  9.893e-01  8.795e-01  1.162e+00
## SGOT:Z_star        1.000e+00  1.000e+00  9.990e-01  1.001e+00
## Platelets:Z_star   9.994e-01  1.001e+00  9.987e-01  1.000e+00
## Prothrombin:Z_star 1.026e+00  9.746e-01  9.362e-01  1.124e+00
## Stage2:Z_star      2.288e-01  4.371e+00 2.336e-271 2.241e+269
## Stage3:Z_star      2.147e-01  4.658e+00 2.192e-271 2.103e+269
## Stage4:Z_star      2.125e-01  4.706e+00 2.170e-271 2.081e+269
## 
## Concordance= 0.722  (se = 0.032 )
## Likelihood ratio test= 50.93  on 16 df,   p=2e-05
## Wald test            = 41.56  on 16 df,   p=5e-04
## Score (logrank) test = 52.05  on 16 df,   p=1e-05

Model Strata Int 5 : Tanpa drug,sex,age,alk_phos,platelets dan interaksinya

strata.int5 = coxph(y ~ Ascites + Spiders  + SGOT  + Prothrombin + Stage 
                      + Ascites*Z_star + Spiders*Z_star + SGOT*Z_star + Prothrombin*Z_star + Stage*Z_star + 
                       strata(Z_star), 
                     data = df) 
## Warning in coxph.fit(X, Y, istrat, offset, init, control, weights = weights, :
## Loglik converged before variable 5,6,7,13,14,15 ; coefficient may be infinite.
summary(strata.int5)
## Call:
## coxph(formula = y ~ Ascites + Spiders + SGOT + Prothrombin + 
##     Stage + Ascites * Z_star + Spiders * Z_star + SGOT * Z_star + 
##     Prothrombin * Z_star + Stage * Z_star + strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)  
## AscitesY            7.246e+00  1.403e+03  3.468e+00  2.089   0.0367 *
## SpidersY            3.288e-01  1.389e+00  1.104e+00  0.298   0.7657  
## SGOT                4.893e-03  1.005e+00  7.198e-03  0.680   0.4967  
## Prothrombin        -2.822e-02  9.722e-01  7.786e-01 -0.036   0.9711  
## Stage2              2.694e+01  4.992e+11  5.522e+03  0.005   0.9961  
## Stage3              2.779e+01  1.174e+12  5.522e+03  0.005   0.9960  
## Stage4              2.822e+01  1.809e+12  5.522e+03  0.005   0.9959  
## Z_star                     NA         NA  0.000e+00     NA       NA  
## AscitesY:Z_star    -3.877e-01  6.786e-01  2.080e-01 -1.864   0.0623 .
## SpidersY:Z_star     1.433e-02  1.014e+00  6.932e-02  0.207   0.8362  
## SGOT:Z_star         9.526e-06  1.000e+00  4.661e-04  0.020   0.9837  
## Prothrombin:Z_star  2.519e-02  1.026e+00  4.743e-02  0.531   0.5953  
## Stage2:Z_star      -1.579e+00  2.062e-01  3.248e+02 -0.005   0.9961  
## Stage3:Z_star      -1.611e+00  1.998e-01  3.248e+02 -0.005   0.9960  
## Stage4:Z_star      -1.629e+00  1.961e-01  3.248e+02 -0.005   0.9960  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef)  lower .95  upper .95
## AscitesY           1.403e+03  7.128e-04  1.566e+00  1.257e+06
## SpidersY           1.389e+00  7.198e-01  1.598e-01  1.208e+01
## SGOT               1.005e+00  9.951e-01  9.908e-01  1.019e+00
## Prothrombin        9.722e-01  1.029e+00  2.113e-01  4.472e+00
## Stage2             4.992e+11  2.003e-12  0.000e+00        Inf
## Stage3             1.174e+12  8.519e-13  0.000e+00        Inf
## Stage4             1.809e+12  5.528e-13  0.000e+00        Inf
## Z_star                    NA         NA         NA         NA
## AscitesY:Z_star    6.786e-01  1.474e+00  4.514e-01  1.020e+00
## SpidersY:Z_star    1.014e+00  9.858e-01  8.856e-01  1.162e+00
## SGOT:Z_star        1.000e+00  1.000e+00  9.991e-01  1.001e+00
## Prothrombin:Z_star 1.026e+00  9.751e-01  9.345e-01  1.125e+00
## Stage2:Z_star      2.062e-01  4.850e+00 6.814e-278 6.239e+275
## Stage3:Z_star      1.998e-01  5.005e+00 6.603e-278 6.045e+275
## Stage4:Z_star      1.961e-01  5.099e+00 6.481e-278 5.934e+275
## 
## Concordance= 0.72  (se = 0.032 )
## Likelihood ratio test= 47.59  on 14 df,   p=2e-05
## Wald test            = 39.14  on 14 df,   p=3e-04
## Score (logrank) test = 48.84  on 14 df,   p=1e-05

Model Strata Int 6 : Tanpa drug,sex,age,alk_phos,platelets,stage dan interaksinya

strata.int6 = coxph(y ~ Ascites + Spiders  + SGOT  + Prothrombin + 
                      + Ascites*Z_star + Spiders*Z_star + SGOT*Z_star + Prothrombin*Z_star + 
                       strata(Z_star), 
                     data = df) 

summary(strata.int6)
## Call:
## coxph(formula = y ~ Ascites + Spiders + SGOT + Prothrombin + 
##     +Ascites * Z_star + Spiders * Z_star + SGOT * Z_star + Prothrombin * 
##     Z_star + strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)  
## AscitesY            7.452e+00  1.724e+03  3.474e+00  2.145   0.0319 *
## SpidersY            7.513e-01  2.120e+00  1.057e+00  0.711   0.4772  
## SGOT                7.866e-03  1.008e+00  7.010e-03  1.122   0.2618  
## Prothrombin        -1.251e-01  8.824e-01  7.155e-01 -0.175   0.8612  
## Z_star                     NA         NA  0.000e+00     NA       NA  
## AscitesY:Z_star    -3.973e-01  6.721e-01  2.080e-01 -1.910   0.0561 .
## SpidersY:Z_star    -6.136e-03  9.939e-01  6.640e-02 -0.092   0.9264  
## SGOT:Z_star        -2.051e-04  9.998e-01  4.511e-04 -0.455   0.6493  
## Prothrombin:Z_star  3.275e-02  1.033e+00  4.363e-02  0.751   0.4529  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef) lower .95 upper .95
## AscitesY           1724.1626    0.00058    1.9034 1.562e+06
## SpidersY              2.1198    0.47174    0.2670 1.683e+01
## SGOT                  1.0079    0.99216    0.9941 1.022e+00
## Prothrombin           0.8824    1.13326    0.2171 3.587e+00
## Z_star                    NA         NA        NA        NA
## AscitesY:Z_star       0.6721    1.48778    0.4471 1.010e+00
## SpidersY:Z_star       0.9939    1.00615    0.8726 1.132e+00
## SGOT:Z_star           0.9998    1.00021    0.9989 1.001e+00
## Prothrombin:Z_star    1.0333    0.96778    0.9486 1.126e+00
## 
## Concordance= 0.706  (se = 0.034 )
## Likelihood ratio test= 43.57  on 8 df,   p=7e-07
## Wald test            = 40.49  on 8 df,   p=3e-06
## Score (logrank) test = 45.63  on 8 df,   p=3e-07

Model Strata Int 7 : Tanpa interaksi spiders*zstar

strata.int7 = coxph(y ~ Ascites + Spiders  + SGOT  + Prothrombin + 
                       Ascites*Z_star + SGOT*Z_star + Prothrombin*Z_star + 
                       strata(Z_star), 
                     data = df) 

summary(strata.int7)
## Call:
## coxph(formula = y ~ Ascites + Spiders + SGOT + Prothrombin + 
##     Ascites * Z_star + SGOT * Z_star + Prothrombin * Z_star + 
##     strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)   
## AscitesY            7.451e+00  1.722e+03  3.472e+00  2.146  0.03186 * 
## SpidersY            6.557e-01  1.927e+00  2.210e-01  2.967  0.00301 **
## SGOT                7.837e-03  1.008e+00  6.993e-03  1.121  0.26245   
## Prothrombin        -1.140e-01  8.922e-01  7.046e-01 -0.162  0.87145   
## Z_star                     NA         NA  0.000e+00     NA       NA   
## AscitesY:Z_star    -3.972e-01  6.722e-01  2.079e-01 -1.911  0.05600 . 
## SGOT:Z_star        -2.037e-04  9.998e-01  4.503e-04 -0.452  0.65103   
## Prothrombin:Z_star  3.208e-02  1.033e+00  4.298e-02  0.746  0.45542   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef) lower .95 upper .95
## AscitesY           1721.7305  0.0005808    1.9090 1.553e+06
## SpidersY              1.9266  0.5190565    1.2492 2.971e+00
## SGOT                  1.0079  0.9921940    0.9941 1.022e+00
## Prothrombin           0.8922  1.1207622    0.2243 3.550e+00
## Z_star                    NA         NA        NA        NA
## AscitesY:Z_star       0.6722  1.4876936    0.4473 1.010e+00
## SGOT:Z_star           0.9998  1.0002037    0.9989 1.001e+00
## Prothrombin:Z_star    1.0326  0.9684270    0.9492 1.123e+00
## 
## Concordance= 0.707  (se = 0.034 )
## Likelihood ratio test= 43.56  on 7 df,   p=3e-07
## Wald test            = 40.5  on 7 df,   p=1e-06
## Score (logrank) test = 45.63  on 7 df,   p=1e-07

Model Strata Int 8 : Tanpa interkasi spiders dan sgot dengan zstar

strata.int8 = coxph(y ~ Ascites + Spiders  + SGOT  + Prothrombin + 
                       Ascites*Z_star + Prothrombin*Z_star + 
                       strata(Z_star), 
                     data = df) 

summary(strata.int8)
## Call:
## coxph(formula = y ~ Ascites + Spiders + SGOT + Prothrombin + 
##     Ascites * Z_star + Prothrombin * Z_star + strata(Z_star), 
##     data = df)
## 
##   n= 276, number of events= 111 
## 
##                          coef  exp(coef)   se(coef)      z Pr(>|z|)   
## AscitesY            7.378e+00  1.601e+03  3.475e+00  2.124  0.03371 * 
## SpidersY            6.511e-01  1.918e+00  2.207e-01  2.950  0.00318 **
## SGOT                4.743e-03  1.005e+00  1.617e-03  2.932  0.00337 **
## Prothrombin        -1.419e-01  8.677e-01  6.922e-01 -0.205  0.83760   
## Z_star                     NA         NA  0.000e+00     NA       NA   
## AscitesY:Z_star    -3.929e-01  6.751e-01  2.080e-01 -1.889  0.05889 . 
## Prothrombin:Z_star  3.423e-02  1.035e+00  4.217e-02  0.812  0.41701   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                    exp(coef) exp(-coef) lower .95 upper .95
## AscitesY           1600.8003  0.0006247    1.7651 1.452e+06
## SpidersY              1.9176  0.5214802    1.2442 2.956e+00
## SGOT                  1.0048  0.9952686    1.0016 1.008e+00
## Prothrombin           0.8677  1.1524312    0.2235 3.369e+00
## Z_star                    NA         NA        NA        NA
## AscitesY:Z_star       0.6751  1.4813337    0.4490 1.015e+00
## Prothrombin:Z_star    1.0348  0.9663494    0.9527 1.124e+00
## 
## Concordance= 0.706  (se = 0.034 )
## Likelihood ratio test= 43.37  on 6 df,   p=1e-07
## Wald test            = 40.26  on 6 df,   p=4e-07
## Score (logrank) test = 45.42  on 6 df,   p=4e-08

Model Strata Int 9 : Tanpa interkasi spiders,sgot,proth dengan zstar

strata.int9 = coxph(y ~ Ascites + Spiders  + SGOT  + Prothrombin + 
                       Ascites*Z_star + 
                       strata(Z_star), 
                     data = df) 

summary(strata.int9)
## Call:
## coxph(formula = y ~ Ascites + Spiders + SGOT + Prothrombin + 
##     Ascites * Z_star + strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                       coef  exp(coef)   se(coef)      z Pr(>|z|)    
## AscitesY         7.386e+00  1.613e+03  3.424e+00  2.157 0.030979 *  
## SpidersY         6.351e-01  1.887e+00  2.199e-01  2.888 0.003883 ** 
## SGOT             4.663e-03  1.005e+00  1.614e-03  2.890 0.003856 ** 
## Prothrombin      4.104e-01  1.507e+00  1.238e-01  3.314 0.000918 ***
## Z_star                  NA         NA  0.000e+00     NA       NA    
## AscitesY:Z_star -3.901e-01  6.770e-01  2.052e-01 -1.901 0.057237 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                 exp(coef) exp(-coef) lower .95 upper .95
## AscitesY         1613.134  0.0006199    1.9655 1.324e+06
## SpidersY            1.887  0.5298794    1.2263 2.904e+00
## SGOT                1.005  0.9953479    1.0015 1.008e+00
## Prothrombin         1.507  0.6633530    1.1826 1.922e+00
## Z_star                 NA         NA        NA        NA
## AscitesY:Z_star     0.677  1.4771574    0.4528 1.012e+00
## 
## Concordance= 0.704  (se = 0.034 )
## Likelihood ratio test= 42.7  on 5 df,   p=4e-08
## Wald test            = 39.29  on 5 df,   p=2e-07
## Score (logrank) test = 44.42  on 5 df,   p=2e-08

Model Strata Int 10 : Tanpa ascites hanya interaksinya saja

strata.int10 = coxph(y ~  Spiders  + SGOT  + Prothrombin + 
                       Ascites*Z_star + 
                       strata(Z_star), 
                     data = df) 

summary(strata.int10)
## Call:
## coxph(formula = y ~ Spiders + SGOT + Prothrombin + Ascites * 
##     Z_star + strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                       coef  exp(coef)   se(coef)      z Pr(>|z|)    
## SpidersY         6.351e-01  1.887e+00  2.199e-01  2.888 0.003883 ** 
## SGOT             4.663e-03  1.005e+00  1.614e-03  2.890 0.003856 ** 
## Prothrombin      4.104e-01  1.507e+00  1.238e-01  3.314 0.000918 ***
## AscitesY         7.386e+00  1.613e+03  3.424e+00  2.157 0.030979 *  
## Z_star                  NA         NA  0.000e+00     NA       NA    
## AscitesY:Z_star -3.901e-01  6.770e-01  2.052e-01 -1.901 0.057237 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                 exp(coef) exp(-coef) lower .95 upper .95
## SpidersY            1.887  0.5298794    1.2263 2.904e+00
## SGOT                1.005  0.9953479    1.0015 1.008e+00
## Prothrombin         1.507  0.6633530    1.1826 1.922e+00
## AscitesY         1613.134  0.0006199    1.9655 1.324e+06
## Z_star                 NA         NA        NA        NA
## AscitesY:Z_star     0.677  1.4771574    0.4528 1.012e+00
## 
## Concordance= 0.704  (se = 0.034 )
## Likelihood ratio test= 42.7  on 5 df,   p=4e-08
## Wald test            = 39.29  on 5 df,   p=2e-07
## Score (logrank) test = 44.42  on 5 df,   p=2e-08

Perbandingan : Manakah model strata dengan interaksi yang terbaik?

interaction_model_list = list(
  strata.int_full = strata.int_full,
  strata.int1 = strata.int1,
  strata.int2 = strata.int2,
  strata.int3 = strata.int3,
  strata.int4 = strata.int4,
  strata.int5 = strata.int5,
  strata.int6 = strata.int6,
  strata.int7 = strata.int7,
  strata.int8 = strata.int8,
  strata.int9 = strata.int9,
  strata.int10 = strata.int10
  
)

stra.int_summary = data.frame()


for (model_name in names(interaction_model_list)) {
  model = interaction_model_list[[model_name]]
  model_summary_data = summary(model)
  variables = rownames(model_summary_data$coefficients)
  
 
  HR = model_summary_data$coefficients[, "exp(coef)"]
  
  CI_lower = model_summary_data$conf.int[, "lower .95"]
  CI_upper = model_summary_data$conf.int[, "upper .95"]
  
  model_AIC = AIC(model)
  
 
  temp_df = data.frame(
    Model = model_name,
    Variable = variables,
    HR = HR,
    CI_Lower = CI_lower,
    CI_Upper = CI_upper,
    AIC = model_AIC
  )
  
  stra.int_summary = rbind(stra.int_summary, temp_df)
}

# Print hasil akhir
print(stra.int_summary)
##                               Model           Variable           HR
## DrugPlacebo         strata.int_full        DrugPlacebo 2.972012e-01
## Age                 strata.int_full                Age 1.000168e+00
## SexM                strata.int_full               SexM 2.114988e+00
## AscitesY            strata.int_full           AscitesY 1.155380e+04
## SpidersY            strata.int_full           SpidersY 9.461361e-01
## Alk_Phos            strata.int_full           Alk_Phos 1.000269e+00
## SGOT                strata.int_full               SGOT 1.008601e+00
## Platelets           strata.int_full          Platelets 1.008056e+00
## Prothrombin         strata.int_full        Prothrombin 1.238109e+00
## Stage2              strata.int_full             Stage2 2.628239e+11
## Stage3              strata.int_full             Stage3 9.878790e+11
## Stage4              strata.int_full             Stage4 9.841466e+11
## Z_star              strata.int_full             Z_star           NA
## DrugPlacebo:Z_star  strata.int_full DrugPlacebo:Z_star 1.083278e+00
## Age:Z_star          strata.int_full         Age:Z_star 9.999961e-01
## SexM:Z_star         strata.int_full        SexM:Z_star 9.647826e-01
## AscitesY:Z_star     strata.int_full    AscitesY:Z_star 5.985060e-01
## SpidersY:Z_star     strata.int_full    SpidersY:Z_star 1.041599e+00
## Alk_Phos:Z_star     strata.int_full    Alk_Phos:Z_star 9.999862e-01
## SGOT:Z_star         strata.int_full        SGOT:Z_star 9.998124e-01
## Platelets:Z_star    strata.int_full   Platelets:Z_star 9.995647e-01
## Prothrombin:Z_star  strata.int_full Prothrombin:Z_star 1.008879e+00
## Stage2:Z_star       strata.int_full      Stage2:Z_star 2.141616e-01
## Stage3:Z_star       strata.int_full      Stage3:Z_star 2.011257e-01
## Stage4:Z_star       strata.int_full      Stage4:Z_star 2.023781e-01
## Age1                    strata.int1                Age 1.000206e+00
## SexM1                   strata.int1               SexM 2.002912e+00
## AscitesY1               strata.int1           AscitesY 6.933900e+03
## SpidersY1               strata.int1           SpidersY 9.523195e-01
## Alk_Phos1               strata.int1           Alk_Phos 1.000287e+00
## SGOT1                   strata.int1               SGOT 1.007373e+00
## Platelets1              strata.int1          Platelets 1.008946e+00
## Prothrombin1            strata.int1        Prothrombin 8.770074e-01
## Stage21                 strata.int1             Stage2 1.263974e+11
## Stage31                 strata.int1             Stage3 5.602553e+11
## Stage41                 strata.int1             Stage4 5.651942e+11
## Z_star1                 strata.int1             Z_star           NA
## Age:Z_star1             strata.int1         Age:Z_star 9.999937e-01
## SexM:Z_star1            strata.int1        SexM:Z_star 9.671237e-01
## AscitesY:Z_star1        strata.int1    AscitesY:Z_star 6.153077e-01
## SpidersY:Z_star1        strata.int1    SpidersY:Z_star 1.039613e+00
## Alk_Phos:Z_star1        strata.int1    Alk_Phos:Z_star 9.999851e-01
## SGOT:Z_star1            strata.int1        SGOT:Z_star 9.999023e-01
## Platelets:Z_star1       strata.int1   Platelets:Z_star 9.995146e-01
## Prothrombin:Z_star1     strata.int1 Prothrombin:Z_star 1.030358e+00
## Stage2:Z_star1          strata.int1      Stage2:Z_star 2.243694e-01
## Stage3:Z_star1          strata.int1      Stage3:Z_star 2.089916e-01
## Stage4:Z_star1          strata.int1      Stage4:Z_star 2.105711e-01
## Age2                    strata.int2                Age 1.000195e+00
## AscitesY2               strata.int2           AscitesY 4.476680e+03
## SpidersY2               strata.int2           SpidersY 9.067968e-01
## Alk_Phos2               strata.int2           Alk_Phos 1.000279e+00
## SGOT2                   strata.int2               SGOT 1.006356e+00
## Platelets2              strata.int2          Platelets 1.008803e+00
## Prothrombin2            strata.int2        Prothrombin 9.538151e-01
## Stage22                 strata.int2             Stage2 1.458159e+11
## Stage32                 strata.int2             Stage3 6.777161e+11
## Stage42                 strata.int2             Stage4 8.268488e+11
## Z_star2                 strata.int2             Z_star           NA
## Age:Z_star2             strata.int2         Age:Z_star 9.999945e-01
## AscitesY:Z_star2        strata.int2    AscitesY:Z_star 6.319692e-01
## SpidersY:Z_star2        strata.int2    SpidersY:Z_star 1.040924e+00
## Alk_Phos:Z_star2        strata.int2    Alk_Phos:Z_star 9.999857e-01
## SGOT:Z_star2            strata.int2        SGOT:Z_star 9.999622e-01
## Platelets:Z_star2       strata.int2   Platelets:Z_star 9.995174e-01
## Prothrombin:Z_star2     strata.int2 Prothrombin:Z_star 1.024951e+00
## Stage2:Z_star2          strata.int2      Stage2:Z_star 2.216299e-01
## Stage3:Z_star2          strata.int2      Stage3:Z_star 2.060379e-01
## Stage4:Z_star2          strata.int2      Stage4:Z_star 2.051070e-01
## AscitesY3               strata.int3           AscitesY 1.801912e+03
## SpidersY3               strata.int3           SpidersY 6.883091e-01
## Alk_Phos3               strata.int3           Alk_Phos 1.000331e+00
## SGOT3                   strata.int3               SGOT 1.006364e+00
## Platelets3              strata.int3          Platelets 1.007949e+00
## Prothrombin3            strata.int3        Prothrombin 1.002784e+00
## Stage23                 strata.int3             Stage2 9.290260e+10
## Stage33                 strata.int3             Stage3 5.996304e+11
## Stage43                 strata.int3             Stage4 7.527457e+11
## Z_star3                 strata.int3             Z_star           NA
## AscitesY:Z_star3        strata.int3    AscitesY:Z_star 6.666066e-01
## SpidersY:Z_star3        strata.int3    SpidersY:Z_star 1.060353e+00
## Alk_Phos:Z_star3        strata.int3    Alk_Phos:Z_star 9.999828e-01
## SGOT:Z_star3            strata.int3        SGOT:Z_star 9.999189e-01
## Platelets:Z_star3       strata.int3   Platelets:Z_star 9.995376e-01
## Prothrombin:Z_star3     strata.int3 Prothrombin:Z_star 1.022842e+00
## Stage2:Z_star3          strata.int3      Stage2:Z_star 2.269827e-01
## Stage3:Z_star3          strata.int3      Stage3:Z_star 2.072508e-01
## Stage4:Z_star3          strata.int3      Stage4:Z_star 2.067081e-01
## AscitesY4               strata.int4           AscitesY 2.741760e+03
## SpidersY4               strata.int4           SpidersY 1.486349e+00
## SGOT4                   strata.int4               SGOT 1.005273e+00
## Platelets4              strata.int4          Platelets 1.010477e+00
## Prothrombin4            strata.int4        Prothrombin 9.623041e-01
## Stage24                 strata.int4             Stage2 8.765989e+10
## Stage34                 strata.int4             Stage3 3.599030e+11
## Stage44                 strata.int4             Stage4 4.818392e+11
## Z_star4                 strata.int4             Z_star           NA
## AscitesY:Z_star4        strata.int4    AscitesY:Z_star 6.522462e-01
## SpidersY:Z_star4        strata.int4    SpidersY:Z_star 1.010841e+00
## SGOT:Z_star4            strata.int4        SGOT:Z_star 9.999854e-01
## Platelets:Z_star4       strata.int4   Platelets:Z_star 9.994016e-01
## Prothrombin:Z_star4     strata.int4 Prothrombin:Z_star 1.026032e+00
## Stage2:Z_star4          strata.int4      Stage2:Z_star 2.287839e-01
## Stage3:Z_star4          strata.int4      Stage3:Z_star 2.146776e-01
## Stage4:Z_star4          strata.int4      Stage4:Z_star 2.125013e-01
## AscitesY5               strata.int5           AscitesY 1.402968e+03
## SpidersY5               strata.int5           SpidersY 1.389313e+00
## SGOT5                   strata.int5               SGOT 1.004905e+00
## Prothrombin5            strata.int5        Prothrombin 9.721728e-01
## Stage25                 strata.int5             Stage2 4.991521e+11
## Stage35                 strata.int5             Stage3 1.173906e+12
## Stage45                 strata.int5             Stage4 1.809024e+12
## Z_star5                 strata.int5             Z_star           NA
## AscitesY:Z_star5        strata.int5    AscitesY:Z_star 6.786340e-01
## SpidersY:Z_star5        strata.int5    SpidersY:Z_star 1.014432e+00
## SGOT:Z_star5            strata.int5        SGOT:Z_star 1.000010e+00
## Prothrombin:Z_star5     strata.int5 Prothrombin:Z_star 1.025513e+00
## Stage2:Z_star5          strata.int5      Stage2:Z_star 2.061837e-01
## Stage3:Z_star5          strata.int5      Stage3:Z_star 1.997853e-01
## Stage4:Z_star5          strata.int5      Stage4:Z_star 1.961196e-01
## AscitesY6               strata.int6           AscitesY 1.724163e+03
## SpidersY6               strata.int6           SpidersY 2.119825e+00
## SGOT6                   strata.int6               SGOT 1.007897e+00
## Prothrombin6            strata.int6        Prothrombin 8.824064e-01
## Z_star6                 strata.int6             Z_star           NA
## AscitesY:Z_star6        strata.int6    AscitesY:Z_star 6.721424e-01
## SpidersY:Z_star6        strata.int6    SpidersY:Z_star 9.938830e-01
## SGOT:Z_star6            strata.int6        SGOT:Z_star 9.997949e-01
## Prothrombin:Z_star6     strata.int6 Prothrombin:Z_star 1.033289e+00
## AscitesY7               strata.int7           AscitesY 1.721730e+03
## SpidersY7               strata.int7           SpidersY 1.926573e+00
## SGOT7                   strata.int7               SGOT 1.007867e+00
## Prothrombin7            strata.int7        Prothrombin 8.922499e-01
## Z_star7                 strata.int7             Z_star           NA
## AscitesY:Z_star7        strata.int7    AscitesY:Z_star 6.721814e-01
## SGOT:Z_star7            strata.int7        SGOT:Z_star 9.997963e-01
## Prothrombin:Z_star7     strata.int7 Prothrombin:Z_star 1.032602e+00
## AscitesY8               strata.int8           AscitesY 1.600800e+03
## SpidersY8               strata.int8           SpidersY 1.917618e+00
## SGOT8                   strata.int8               SGOT 1.004754e+00
## Prothrombin8            strata.int8        Prothrombin 8.677308e-01
## Z_star8                 strata.int8             Z_star           NA
## AscitesY:Z_star8        strata.int8    AscitesY:Z_star 6.750673e-01
## Prothrombin:Z_star8     strata.int8 Prothrombin:Z_star 1.034822e+00
## AscitesY9               strata.int9           AscitesY 1.613134e+03
## SpidersY9               strata.int9           SpidersY 1.887222e+00
## SGOT9                   strata.int9               SGOT 1.004674e+00
## Prothrombin9            strata.int9        Prothrombin 1.507493e+00
## Z_star9                 strata.int9             Z_star           NA
## AscitesY:Z_star9        strata.int9    AscitesY:Z_star 6.769759e-01
## SpidersY10             strata.int10           SpidersY 1.887222e+00
## SGOT10                 strata.int10               SGOT 1.004674e+00
## Prothrombin10          strata.int10        Prothrombin 1.507493e+00
## AscitesY10             strata.int10           AscitesY 1.613134e+03
## Z_star10               strata.int10             Z_star           NA
## AscitesY:Z_star10      strata.int10    AscitesY:Z_star 6.769759e-01
##                          CI_Lower      CI_Upper      AIC
## DrugPlacebo          4.764397e-02  1.853929e+00 606.5616
## Age                  9.995677e-01  1.000768e+00 606.5616
## SexM                 4.593096e-02  9.738912e+01 606.5616
## AscitesY             9.419885e+00  1.417112e+07 606.5616
## SpidersY             7.823957e-02  1.144144e+01 606.5616
## Alk_Phos             9.999080e-01  1.000630e+00 606.5616
## SGOT                 9.929812e-01  1.024466e+00 606.5616
## Platelets            9.961788e-01  1.020075e+00 606.5616
## Prothrombin          2.189896e-01  6.999939e+00 606.5616
## Stage2               0.000000e+00           Inf 606.5616
## Stage3               0.000000e+00           Inf 606.5616
## Stage4               0.000000e+00           Inf 606.5616
## Z_star                         NA            NA 606.5616
## DrugPlacebo:Z_star   9.620936e-01  1.219728e+00 606.5616
## Age:Z_star           9.999591e-01  1.000033e+00 606.5616
## SexM:Z_star          7.612757e-01  1.222692e+00 606.5616
## AscitesY:Z_star      3.906848e-01  9.168757e-01 606.5616
## SpidersY:Z_star      8.916782e-01  1.216726e+00 606.5616
## Alk_Phos:Z_star      9.999634e-01  1.000009e+00 606.5616
## SGOT:Z_star          9.988085e-01  1.000817e+00 606.5616
## Platelets:Z_star     9.988244e-01  1.000306e+00 606.5616
## Prothrombin:Z_star   9.082913e-01  1.120605e+00 606.5616
## Stage2:Z_star        0.000000e+00           Inf 606.5616
## Stage3:Z_star        0.000000e+00           Inf 606.5616
## Stage4:Z_star        0.000000e+00           Inf 606.5616
## Age1                 9.996237e-01  1.000789e+00 604.3462
## SexM1                4.546360e-02  8.823888e+01 604.3462
## AscitesY1            5.964685e+00  8.060604e+06 604.3462
## SpidersY1            8.348442e-02  1.086325e+01 604.3462
## Alk_Phos1            9.999339e-01  1.000640e+00 604.3462
## SGOT1                9.926898e-01  1.022273e+00 604.3462
## Platelets1           9.968626e-01  1.021176e+00 604.3462
## Prothrombin1         1.728556e-01  4.449622e+00 604.3462
## Stage21              0.000000e+00           Inf 604.3462
## Stage31              0.000000e+00           Inf 604.3462
## Stage41              0.000000e+00           Inf 604.3462
## Z_star1                        NA            NA 604.3462
## Age:Z_star1          9.999576e-01  1.000030e+00 604.3462
## SexM:Z_star1         7.646008e-01  1.223290e+00 604.3462
## AscitesY:Z_star1     4.028037e-01  9.399205e-01 604.3462
## SpidersY:Z_star1     8.930395e-01  1.210242e+00 604.3462
## Alk_Phos:Z_star1     9.999627e-01  1.000007e+00 604.3462
## SGOT:Z_star1         9.989511e-01  1.000854e+00 604.3462
## Platelets:Z_star1    9.987635e-01  1.000266e+00 604.3462
## Prothrombin:Z_star1  9.334604e-01  1.137314e+00 604.3462
## Stage2:Z_star1       0.000000e+00           Inf 604.3462
## Stage3:Z_star1       0.000000e+00           Inf 604.3462
## Stage4:Z_star1       0.000000e+00           Inf 604.3462
## Age2                 9.996170e-01  1.000773e+00 600.6815
## AscitesY2            4.474544e+00  4.478817e+06 600.6815
## SpidersY2            7.990245e-02  1.029105e+01 600.6815
## Alk_Phos2            9.999243e-01  1.000634e+00 600.6815
## SGOT2                9.920142e-01  1.020905e+00 600.6815
## Platelets2           9.968687e-01  1.020881e+00 600.6815
## Prothrombin2         1.940022e-01  4.689448e+00 600.6815
## Stage22              0.000000e+00           Inf 600.6815
## Stage32              0.000000e+00           Inf 600.6815
## Stage42              0.000000e+00           Inf 600.6815
## Z_star2                        NA            NA 600.6815
## Age:Z_star2          9.999587e-01  1.000030e+00 600.6815
## AscitesY:Z_star2     4.175688e-01  9.564533e-01 600.6815
## SpidersY:Z_star2     8.946642e-01  1.211095e+00 600.6815
## Alk_Phos:Z_star2     9.999632e-01  1.000008e+00 600.6815
## SGOT:Z_star2         9.990271e-01  1.000898e+00 600.6815
## Platelets:Z_star2    9.987788e-01  1.000257e+00 600.6815
## Prothrombin:Z_star2  9.303129e-01  1.129217e+00 600.6815
## Stage2:Z_star2       0.000000e+00           Inf 600.6815
## Stage3:Z_star2       0.000000e+00           Inf 600.6815
## Stage4:Z_star2       0.000000e+00           Inf 600.6815
## AscitesY3            2.034604e+00  1.595833e+06 599.4843
## SpidersY3            6.574306e-02  7.206378e+00 599.4843
## Alk_Phos3            9.999881e-01  1.000675e+00 599.4843
## SGOT3                9.919247e-01  1.021014e+00 599.4843
## Platelets3           9.964875e-01  1.019542e+00 599.4843
## Prothrombin3         2.067162e-01  4.864526e+00 599.4843
## Stage23              0.000000e+00           Inf 599.4843
## Stage33              0.000000e+00           Inf 599.4843
## Stage43              0.000000e+00           Inf 599.4843
## Z_star3                        NA            NA 599.4843
## AscitesY:Z_star3     4.435731e-01  1.001784e+00 599.4843
## SpidersY:Z_star3     9.158851e-01  1.227610e+00 599.4843
## Alk_Phos:Z_star3     9.999609e-01  1.000005e+00 599.4843
## SGOT:Z_star3         9.989815e-01  1.000857e+00 599.4843
## Platelets:Z_star3    9.988298e-01  1.000246e+00 599.4843
## Prothrombin:Z_star3  9.292650e-01  1.125843e+00 599.4843
## Stage2:Z_star3       0.000000e+00           Inf 599.4843
## Stage3:Z_star3       0.000000e+00           Inf 599.4843
## Stage4:Z_star3       0.000000e+00           Inf 599.4843
## AscitesY4            2.919844e+00  2.574537e+06 600.3745
## SpidersY4            1.611331e-01  1.371061e+01 600.3745
## SGOT4                9.907470e-01  1.020013e+00 600.3745
## Platelets4           9.989312e-01  1.022157e+00 600.3745
## Prothrombin4         2.145129e-01  4.316893e+00 600.3745
## Stage24              0.000000e+00           Inf 600.3745
## Stage34              0.000000e+00           Inf 600.3745
## Stage44              0.000000e+00           Inf 600.3745
## Z_star4                        NA            NA 600.3745
## AscitesY:Z_star4     4.326103e-01  9.833910e-01 600.3745
## SpidersY:Z_star4     8.794867e-01  1.161814e+00 600.3745
## SGOT:Z_star4         9.990440e-01  1.000928e+00 600.3745
## Platelets:Z_star4    9.986913e-01  1.000112e+00 600.3745
## Prothrombin:Z_star4  9.362371e-01  1.124439e+00 600.3745
## Stage2:Z_star4      2.335940e-271 2.240728e+269 600.3745
## Stage3:Z_star4      2.191938e-271 2.102544e+269 600.3745
## Stage4:Z_star4      2.169670e-271 2.081275e+269 600.3745
## AscitesY5            1.565589e+00  1.257239e+06 599.7154
## SpidersY5            1.597501e-01  1.208257e+01 599.7154
## SGOT5                9.908269e-01  1.019183e+00 599.7154
## Prothrombin5         2.113318e-01  4.472209e+00 599.7154
## Stage25              0.000000e+00           Inf 599.7154
## Stage35              0.000000e+00           Inf 599.7154
## Stage45              0.000000e+00           Inf 599.7154
## Z_star5                        NA            NA 599.7154
## AscitesY:Z_star5     4.514474e-01  1.020150e+00 599.7154
## SpidersY:Z_star5     8.855563e-01  1.162063e+00 599.7154
## SGOT:Z_star5         9.990964e-01  1.000923e+00 599.7154
## Prothrombin:Z_star5  9.344774e-01  1.125416e+00 599.7154
## Stage2:Z_star5      6.814091e-278 6.238793e+275 599.7154
## Stage3:Z_star5      6.602677e-278 6.045150e+275 599.7154
## Stage4:Z_star5      6.481425e-278 5.934325e+275 599.7154
## AscitesY6            1.903414e+00  1.561792e+06 591.7295
## SpidersY6            2.670145e-01  1.682927e+01 591.7295
## SGOT6                9.941431e-01  1.021841e+00 591.7295
## Prothrombin6         2.170679e-01  3.587086e+00 591.7295
## Z_star6                        NA            NA 591.7295
## AscitesY:Z_star6     4.471075e-01  1.010440e+00 591.7295
## SpidersY:Z_star6     8.726074e-01  1.132013e+00 591.7295
## SGOT:Z_star6         9.989113e-01  1.000679e+00 591.7295
## Prothrombin:Z_star6  9.486032e-01  1.125535e+00 591.7295
## AscitesY7            1.909030e+00  1.552808e+06 589.7380
## SpidersY7            1.249226e+00  2.971186e+00 589.7380
## SGOT7                9.941477e-01  1.021776e+00 589.7380
## Prothrombin7         2.242602e-01  3.549938e+00 589.7380
## Z_star7                        NA            NA 589.7380
## AscitesY:Z_star7     4.472534e-01  1.010228e+00 589.7380
## SGOT:Z_star7         9.989143e-01  1.000679e+00 589.7380
## Prothrombin:Z_star7  9.491754e-01  1.123362e+00 589.7380
## AscitesY8            1.765144e+00  1.451758e+06 587.9379
## SpidersY8            1.244200e+00  2.955521e+00 587.9379
## SGOT8                1.001574e+00  1.007944e+00 587.9379
## Prothrombin8         2.234652e-01  3.369459e+00 587.9379
## Z_star8                        NA            NA 587.9379
## AscitesY:Z_star8     4.490406e-01  1.014866e+00 587.9379
## Prothrombin:Z_star8  9.527223e-01  1.123997e+00 587.9379
## AscitesY9            1.965532e+00  1.323917e+06 586.6079
## SpidersY9            1.226319e+00  2.904306e+00 586.6079
## SGOT9                1.001501e+00  1.007856e+00 586.6079
## Prothrombin9         1.182620e+00  1.921611e+00 586.6079
## Z_star9                        NA            NA 586.6079
## AscitesY:Z_star9     4.528318e-01  1.012068e+00 586.6079
## SpidersY10           1.226319e+00  2.904306e+00 586.6079
## SGOT10               1.001501e+00  1.007856e+00 586.6079
## Prothrombin10        1.182620e+00  1.921611e+00 586.6079
## AscitesY10           1.965532e+00  1.323917e+06 586.6079
## Z_star10                       NA            NA 586.6079
## AscitesY:Z_star10    4.528318e-01  1.012068e+00 586.6079
write.csv(stra.int_summary, "stratifiedmodel_int.csv", row.names = FALSE)

Model Strata Int Final : strata.int9

strata.int_final = strata.int9

summary(strata.int_final)
## Call:
## coxph(formula = y ~ Ascites + Spiders + SGOT + Prothrombin + 
##     Ascites * Z_star + strata(Z_star), data = df)
## 
##   n= 276, number of events= 111 
## 
##                       coef  exp(coef)   se(coef)      z Pr(>|z|)    
## AscitesY         7.386e+00  1.613e+03  3.424e+00  2.157 0.030979 *  
## SpidersY         6.351e-01  1.887e+00  2.199e-01  2.888 0.003883 ** 
## SGOT             4.663e-03  1.005e+00  1.614e-03  2.890 0.003856 ** 
## Prothrombin      4.104e-01  1.507e+00  1.238e-01  3.314 0.000918 ***
## Z_star                  NA         NA  0.000e+00     NA       NA    
## AscitesY:Z_star -3.901e-01  6.770e-01  2.052e-01 -1.901 0.057237 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
##                 exp(coef) exp(-coef) lower .95 upper .95
## AscitesY         1613.134  0.0006199    1.9655 1.324e+06
## SpidersY            1.887  0.5298794    1.2263 2.904e+00
## SGOT                1.005  0.9953479    1.0015 1.008e+00
## Prothrombin         1.507  0.6633530    1.1826 1.922e+00
## Z_star                 NA         NA        NA        NA
## AscitesY:Z_star     0.677  1.4771574    0.4528 1.012e+00
## 
## Concordance= 0.704  (se = 0.034 )
## Likelihood ratio test= 42.7  on 5 df,   p=4e-08
## Wald test            = 39.29  on 5 df,   p=2e-07
## Score (logrank) test = 44.42  on 5 df,   p=2e-08

Asumsi PH Model Strata Int Final

ph.test_stra.int = cox.zph(strata.int_final)
print(ph.test_stra.int)
##                 chisq df     p
## Ascites        0.5484  1 0.459
## Spiders        0.0372  1 0.847
## SGOT           0.2074  1 0.649
## Prothrombin    2.8117  1 0.094
## Ascites:Z_star 0.6782  1 0.410
## GLOBAL         5.1567  5 0.397

Perbandingan : Mana model stratified terbaik antara Interaksi vs Non-Interaksi?

LL_noint = strata_model_final$loglik[2]  
LL_int = strata.int_final$loglik[2]      

chisq_stat = -2 * (LL_noint - LL_int)

ncoef_noint = length(strata_model_final$coefficients)  
ncoef_int = length(strata.int_final$coefficients)  
ncoef_diff = ncoef_int - ncoef_noint 

p_value = 1 - pchisq(chisq_stat, df = ncoef_diff)

chisq_table = qchisq(0.95, df = ncoef_diff)

decision = ifelse(p_value < 0.05, "Tolak H0", "Gagal Tolak H0")
conclusion = ifelse(p_value < 0.05, 
                     "Ada bukti cukup untuk menyatakan bahwa interaksi meningkatkan model.",
                     "Tidak ada bukti cukup untuk menyatakan bahwa interaksi meningkatkan model.")

loglik_comparison = data.frame(
  Keterangan = c(
    "Loglik Model Tanpa Interaksi",
    "Loglik Model Dengan Interaksi",
    "DF",
    "Chi-Square Hitung",
    "Chi-Square Tabel",
    "P-Value",
    "Keputusan",
    "Kesimpulan"
  ),
  Nilai = c(
    LL_noint,
    LL_int,
    ncoef_diff,
    chisq_stat,
    chisq_table,
    p_value,
    decision,
    conclusion
  )
)

# Print data frame
print(loglik_comparison)
##                      Keterangan
## 1  Loglik Model Tanpa Interaksi
## 2 Loglik Model Dengan Interaksi
## 3                            DF
## 4             Chi-Square Hitung
## 5              Chi-Square Tabel
## 6                       P-Value
## 7                     Keputusan
## 8                    Kesimpulan
##                                                                        Nilai
## 1                                                            -290.6135953816
## 2                                                          -288.303971454406
## 3                                                                          2
## 4                                                           4.61924785438771
## 5                                                           5.99146454710798
## 6                                                         0.0992985880372381
## 7                                                             Gagal Tolak H0
## 8 Tidak ada bukti cukup untuk menyatakan bahwa interaksi meningkatkan model.