Skip to content

Commit

Permalink
updating website
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewhooker committed Nov 15, 2023
1 parent b3976ad commit 683f405
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 11 deletions.
4 changes: 4 additions & 0 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,7 @@ Copyright: 2014-2021 Andrew C. Hooker
Encoding: UTF-8
RoxygenNote: 7.2.3
VignetteBuilder: knitr
Config/Needs/website:
mrgsolve,
kableExtra

25 changes: 14 additions & 11 deletions vignettes/articles/handling_LOQ.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -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)
```


Expand Down Expand Up @@ -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 <-
Expand All @@ -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:
Expand Down

0 comments on commit 683f405

Please sign in to comment.