-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #65 from InsightRX/RXR-2295_cefepime-neurotoxicity
RXR-2295 Add `calc_cefepime_neurotoxicity()` function
- Loading branch information
Showing
9 changed files
with
75 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
#' Calculate Cefepime-associated Neurotoxicity | ||
#' | ||
#' Calculate probability of cefepime-associated neurotoxicity as a function of | ||
#' cefepime plasma trough concentrations. This model was based on a data set | ||
#' of adult patients receiving thrice-daily cefepime and may not correspond to | ||
#' other dosing intervals or patient populations. | ||
#' | ||
#' @note | ||
#' The intercept and slope used in this function match Figure 2 in the cited | ||
#' paper, but differ slightly from the values provided in the text. This | ||
#' interpretation was confirmed via correspondence with the authors. | ||
#' | ||
#' @param trough_concentration Cefepime plasma trough concentration (mg/L). | ||
#' @references \href{https://doi.org/10.1016/j.cmi.2019.06.028}{ | ||
#' Boschung-Pasquier et al., Clinical Microbiology and Infection (2020)} | ||
#' | ||
#' @return Probability of cefepime-associated neurotoxicity. | ||
#' @examples | ||
#' calc_cefepime_neurotoxicity(trough_concentration = c(13.7, 17.8)) | ||
#' @export | ||
calc_cefepime_neurotoxicity <- function(trough_concentration) { | ||
b0 <- -4.7777798 | ||
b1 <- 0.2684747 | ||
stats::plogis(b0 + b1*trough_concentration) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
test_that("cefepime neurotoxicity calculation is correct", { | ||
expect_equal(signif(calc_cefepime_neurotoxicity(13.7), 2), .25) | ||
expect_equal(signif(calc_cefepime_neurotoxicity(17.8), 2), .50) | ||
}) |