Skip to content

Commit 0735f55

Browse files
authored
Merge pull request #65 from sl-eeper/master
add c index in cox2.display
2 parents d3c688e + 4bdbd7a commit 0735f55

File tree

4 files changed

+12
-4
lines changed

4 files changed

+12
-4
lines changed

DESCRIPTION

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: jstable
22
Title: Create Tables from Different Types of Regression
3-
Version: 1.3.8
4-
Date: 2024-11-28
3+
Version: 1.3.9
4+
Date: 2024-02-05
55
Authors@R: c(person("Jinseob", "Kim", email = "[email protected]", role = c("aut", "cre"), comment = c(ORCID = "0000-0002-9403-605X")),
66
person("Zarathu", role = c("cph", "fnd")),
77
person("Yoonkyoung","Jeon", role = c("aut")),

NEWS.md

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# jstable 1.3.9
2+
* Update: Add C-Index in cox2.display
3+
14
# jstable 1.3.8
25
* Update: Detect mixed model and show corresponding values in 'TableSubgroupGLM', 'TableSubgroupMultiGLM'
36

R/cox2.R

+6-2
Original file line numberDiff line numberDiff line change
@@ -247,8 +247,12 @@ cox2.display <- function(cox.obj.withmodel, dec = 2, msm = NULL) {
247247
no.obs <- model$n
248248
no.event <- model$nevent
249249
aic <- stats::AIC(model)
250-
metric.mat <- cbind(c(NA, no.obs, no.event, aic), matrix(NA, 4, ncol(fix.all) - 1))
251-
rownames(metric.mat) <- c(NA, "No. of observations", "No. of events", "AIC")
250+
ccd<-model$concordance
251+
concordance_value <- round(ccd["concordance"],3)
252+
std_value <- round(ccd["std"],3)
253+
c_index<-paste0(concordance_value, '(', std_value, ')')
254+
metric.mat <- cbind(c(NA, no.obs, no.event, aic, c_index ), matrix(NA, 5, ncol(fix.all) - 1))
255+
rownames(metric.mat) <- c(NA, "No. of observations", "No. of events", "AIC", "C-Index")
252256

253257
## Integrated ll
254258
# ll = model$loglik[2]

jstable.Rproj

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
Version: 1.0
2+
ProjectId: 12e42a5d-6633-4bd9-bd4a-a6bf42b4d15d
23

34
RestoreWorkspace: Default
45
SaveWorkspace: Default

0 commit comments

Comments
 (0)