From 479f5c9ee99ee147a2b788bc041489aa98ebcc0b Mon Sep 17 00:00:00 2001 From: Suhyeon-Kwon Date: Tue, 2 Apr 2024 17:47:12 +0900 Subject: [PATCH] Fix error in `svycox` - ksh --- R/svycox.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/svycox.R b/R/svycox.R index 1e76c77..e7d9d9f 100644 --- a/R/svycox.R +++ b/R/svycox.R @@ -47,7 +47,8 @@ svycox.display <- function(svycoxph.obj, decimal = 2) { # uni.res <- data.frame(summary(survey::svycoxph(as.formula(paste(formula.surv, "~", xf, sep="")), design = design.model))$coefficients) names(uni.res)[ncol(uni.res)] <- "p" uni.res2 <- uni.res[, c("coef", grep("se", colnames(uni.res), value = T)[length(grep("se", colnames(uni.res)))], "z", "p")] - + unis <- list(uni.res2) + fix.all <- coxExp(uni.res2, dec = decimal) colnames(fix.all) <- c("HR(95%CI)", "P value") # rownames(fix.all) = ifelse(mtype == "frailty", names(model$coefficients)[-length(model$coefficients)], names(model$coefficients))