Skip to content

Commit

Permalink
Fix error in svycox - ksh
Browse files Browse the repository at this point in the history
  • Loading branch information
Suhyeon-Kwon committed Apr 2, 2024
1 parent 7fabc4c commit 479f5c9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/svycox.R
Original file line number Diff line number Diff line change
Expand Up @@ -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))
Expand Down

0 comments on commit 479f5c9

Please sign in to comment.