Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/jinseob2kim/jsmodule
Browse files Browse the repository at this point in the history
  • Loading branch information
jinseob2kim committed Dec 7, 2023
2 parents 3beb4c8 + 6d758d4 commit eba4c48
Showing 1 changed file with 16 additions and 8 deletions.
24 changes: 16 additions & 8 deletions R/roc.R
Original file line number Diff line number Diff line change
Expand Up @@ -582,8 +582,10 @@ rocModule <- function(input, output, session, data, data_label, data_varStruct =
mm <- glm(as.formula(forms), data = data.roc, family = binomial, x = T)
return(pROC::roc(mm$y, mm$x[, 2]))
})
res.cut <- pROC::coords(res.roc1[[1]], x = "best", input = "threshold", best.method = "youden",
ret = c("threshold", "sensitivity", "specificity", "accuracy", "ppv", "npv"))
res.cut <- pROC::coords(res.roc1[[1]],
x = "best", input = "threshold", best.method = "youden",
ret = c("threshold", "sensitivity", "specificity", "accuracy", "ppv", "npv")
)
} else {
res.cut <- NULL
}
Expand Down Expand Up @@ -638,8 +640,10 @@ rocModule <- function(input, output, session, data, data_label, data_varStruct =
mm <- survey::svyglm(as.formula(forms), design = data.design, family = quasibinomial(), x = T)
return(pROC::roc(mm$y, mm$x[, 2]))
})
res.cut <- pROC::coords(res.roc1[[1]], x = "best", input = "threshold", best.method = "youden",
ret = c("threshold", "sensitivity", "specificity", "accuracy", "ppv", "npv"))
res.cut <- pROC::coords(res.roc1[[1]],
x = "best", input = "threshold", best.method = "youden",
ret = c("threshold", "sensitivity", "specificity", "accuracy", "ppv", "npv")
)
} else {
res.cut <- NULL
}
Expand Down Expand Up @@ -1049,8 +1053,10 @@ rocModule2 <- function(input, output, session, data, data_label, data_varStruct
mm <- glm(as.formula(forms), data = data.roc, family = binomial, x = T)
return(pROC::roc(mm$y, mm$x[, 2]))
})
res.cut <- pROC::coords(res.roc1[[1]], x = "best", input = "threshold", best.method = "youden",
ret = c("threshold", "sensitivity", "specificity", "accuracy", "ppv", "npv"))
res.cut <- pROC::coords(res.roc1[[1]],
x = "best", input = "threshold", best.method = "youden",
ret = c("threshold", "sensitivity", "specificity", "accuracy", "ppv", "npv")
)
} else {
res.cut <- NULL
}
Expand Down Expand Up @@ -1105,8 +1111,10 @@ rocModule2 <- function(input, output, session, data, data_label, data_varStruct
mm <- survey::svyglm(as.formula(forms), design = data.design, family = quasibinomial(), x = T)
return(pROC::roc(mm$y, mm$x[, 2]))
})
res.cut <- pROC::coords(res.roc1[[1]], x = "best", input = "threshold", best.method = "youden",
ret = c("threshold", "sensitivity", "specificity", "accuracy", "ppv", "npv"))
res.cut <- pROC::coords(res.roc1[[1]],
x = "best", input = "threshold", best.method = "youden",
ret = c("threshold", "sensitivity", "specificity", "accuracy", "ppv", "npv")
)
} else {
res.cut <- NULL
}
Expand Down

0 comments on commit eba4c48

Please sign in to comment.