jinseob2kim / jstable
Showing 1 of 5 files from the diff.
Other files ignored by Codecov
NEWS.md has changed.
NAMESPACE has changed.
DESCRIPTION has changed.
CRAN-RELEASE was deleted.

@@ -40,7 +40,6 @@
Loading
40 40
#' @importFrom survival coxph
41 41
#' @importFrom survey svycoxph
42 42
#' @importFrom stats confint coefficients
43 -
#' @importFrom car Anova
44 43
#' @importFrom utils tail
45 44
46 45
TableSubgroupCox <- function(formula, var_subgroup = NULL, var_cov = NULL, data, time_eventrate = 3 * 365, decimal.hr = 2, decimal.percent = 1, decimal.pvalue = 3){
@@ -127,8 +126,8 @@
Loading
127 126
        model.int <- survival::coxph(as.formula(gsub(xlabel, paste(xlabel, "*", var_subgroup, sep=""), deparse(formula))), data = data.int, weights = get(names(data$allprob)), robust =T)
128 127
        model.int$call$formula <- as.formula(gsub(xlabel, paste(xlabel, "*", var_subgroup, sep=""), deparse(formula)))
129 128
        model.int$call$data <- as.name("data.int")
130 -
        pv_anova <- car::Anova(model.int, test.statistics = "Wald")
131 -
        pv_int <- pv_anova[nrow(pv_anova), 3]
129 +
        pv_anova <- anova(model.int)
130 +
        pv_int <- pv_anova[nrow(pv_anova), 4]
132 131
      }
133 132
      res.kap <- purrr::map(label_val, ~survey::svykm(formula.km, design = subset(data, get(var_subgroup) == . )))
134 133
      mkz <- function(reskap){
@@ -151,8 +150,8 @@
Loading
151 150
      if (length(label_val) > 2){
152 151
        model.int$call$formula <- as.formula(gsub(xlabel, paste(xlabel, "*", var_subgroup, sep=""), deparse(formula)))
153 152
        model.int$call$data <- as.name("data")
154 -
        pv_anova <- car::Anova(model.int, test.statistics = "Wald")
155 -
        pv_int <- round(pv_anova[nrow(pv_anova), 3], decimal.pvalue)
153 +
        pv_anova <- anova(model.int)
154 +
        pv_int <- round(pv_anova[nrow(pv_anova), 4], decimal.pvalue)
156 155
      }
157 156
      res.kap.times <- data %>% filter(!is.na(get(var_subgroup))) %>% group_split(get(var_subgroup)) %>% purrr::map(~survival::survfit(formula.km, data = .)) %>% purrr::map(~summary(., times = time_eventrate, extend = T))
158 157
      prop <- res.kap.times %>% purrr::map(~round(100 * (1 - .[["surv"]]), decimal.percent)) %>% dplyr::bind_cols() %>% t
Files Coverage
R 84.65%
Project Totals (13 files) 84.65%
Sunburst
The inner-most circle is the entire project, moving away from the center are folders then, finally, a single file. The size and color of each slice is representing the number of statements and the coverage, respectively.
Icicle
The top section represents the entire project. Proceeding with folders and finally individual files. The size and color of each slice is representing the number of statements and the coverage, respectively.
Grid
Each block represents a single file in the project. The size and color of each block is represented by the number of statements and the coverage, respectively.
Loading