From 683f405133e8c558b969ce793add336b97a7093f Mon Sep 17 00:00:00 2001 From: Andrew Hooker Date: Wed, 15 Nov 2023 16:28:36 +0100 Subject: [PATCH] updating website --- DESCRIPTION | 4 ++++ vignettes/articles/handling_LOQ.Rmd | 25 ++++++++++++++----------- 2 files changed, 18 insertions(+), 11 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 1992cd1..fb4357f 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -60,3 +60,7 @@ Copyright: 2014-2021 Andrew C. Hooker Encoding: UTF-8 RoxygenNote: 7.2.3 VignetteBuilder: knitr +Config/Needs/website: + mrgsolve, + kableExtra + diff --git a/vignettes/articles/handling_LOQ.Rmd b/vignettes/articles/handling_LOQ.Rmd index ae036f6..92f377a 100644 --- a/vignettes/articles/handling_LOQ.Rmd +++ b/vignettes/articles/handling_LOQ.Rmd @@ -105,28 +105,32 @@ plot_model_prediction(poped_db, model_num_points = 500,facet_scales = "free",PI= ``` # Design evaluation -Next, we evaluate the initial design. We see that the relative standard error of the parameters (in percent) are relatively well estimated with this design except for the proportional RUV. +Next, we evaluate the initial design. ```{r} eval_full <- evaluate_design(poped_db) +round(eval_full$rse) ``` -```{r,echo=FALSE} +We see that the relative standard error of the parameters (in percent) are relatively well estimated with this initial design except for the proportional RUV parameter (`sig_prop`). + + +```{r,echo=FALSE,eval=FALSE} kable( data.frame("RSE"=round(eval_full$rse)), - booktabs = TRUE, - caption = 'Expected parameter RSE (in %) for the initial design.' + booktabs = TRUE#, + #caption = 'Expected parameter RSE (in %) for the initial design.' ) %>% kable_styling("striped",full_width = F) ``` # LOQ handling -We assume that the LOQ level is at 2 concentration units. +We assume that the LOQ level is at 2 concentration units. Here shown as a red dotted line. ```{r} library(ggplot2) plot_model_prediction(poped_db, model_num_points = 500,facet_scales = "free",PI=T) + - geom_hline(yintercept = 2,color="red",linetype="dotted") + geom_hline(yintercept = 2,color="red",linetype="dotted",linewidth=1) ``` @@ -169,7 +173,7 @@ testthat::expect_equal(eval_red$ofv,eval_D2$ofv) testthat::expect_equal(eval_red$rse,eval_D2$rse) ``` -Predicted parameter uncertainty for the three methods is shown below. We see that the uncertainty is generally higher with the LOQ evaluations (as expected). We also see that because the D2 method ignores data that is below LOQ (the last observation in the design), then the predictions of uncertainty are significantly larger. +Predicted parameter uncertainty for the three methods is shown in the table below (as relative standard error, RSE, in percent). We see that the uncertainty is generally higher with the LOQ evaluations (as expected). We also see that because the D2 method ignores data that is below LOQ (the last observation in the design), then the predictions of uncertainty are significantly larger. ```{r origRSE,echo=FALSE} eval_rse <- @@ -178,16 +182,15 @@ eval_rse <- "D6"=round(eval_D6$rse), "D2"=round(eval_D2$rse)) -``` - -```{r,echo=FALSE} knitr::kable( eval_rse, booktabs = TRUE, - caption = 'RSE (in %) for the initial design using different methods of handling LOQ.' + #caption = 'RSE (in %) for the initial design using different methods of handling LOQ.' ) %>% kable_styling("striped",full_width = F) + ``` + ## ULOQ handling If needed we can also handle upper limits of quantification. Lets assume we have an ULOQ at 7 units in addition to the LLOQ of 2 units: