rport updates, new logo, app.r logic updated, 4pl XL made nicer
Build and deploy Roxygen2|pkgdown documentation site / build-and-deploy-documentation (push) Successful in 44s
run tests / build-and-deploy-documentation (push) Successful in 7s

This commit is contained in:
2026-06-02 15:43:15 +02:00
parent c480111552
commit 4cfda9d162
11 changed files with 420 additions and 141 deletions
+26 -17
View File
@@ -12,7 +12,7 @@ header_includes:
-\pagestyle{fancy}
-\usepackage{pdflscape}
-\usepackage{longtable}
-\rhead{\includegraphics[width=.15\textwidth]{`r getwd()`/logo.png}}
-\rhead{\includegraphics[width=.15\textwidth]{`r getwd()`/logov2.png}}
params:
FileName: NA
author: NA
@@ -22,7 +22,7 @@ params:
coeffs: NA
author: "Author: `r params$author`"
title: |
| ![](logo.png){width=2in}
| ![](logov2.png){width=1in}
| 4PL bioassay evaluation
subtitle: |
`r params$FileName`
@@ -131,7 +131,7 @@ kable(pottab4plXL, format = "markdown", caption= "Relative potency with absolute
```
NOTE: results of unrestricted model for Information only.
## Plot of the data and models
@@ -229,15 +229,6 @@ kable(PLAausw, format = "markdown", caption= "Restricted 4PL model", digits=3, r
```
<!-- A depiction of the CI and corresponding limits of relative potency is shown here: -->
<!-- ```{r, label='relpotPlot', echo=FALSE, warning=FALSE, fig.height=2, fig.width=3.5, fig.cap="Rel potency with CIs and limits", fig.align='left', results='asis'} -->
<!-- print(relpotTestPlot) -->
<!-- ``` -->
Sebaugh et al proposed bend points for test and reference samples, that define the points with highest turning behavior. Table 6 lists these bendpoints as well as asymptote points ~ twice as far from the center as the bendpoints.
@@ -248,7 +239,7 @@ kable(PLbend, format = "markdown", caption= "Bendpoints and asymptote points of
```
The results of the non-linear fitting procedure for the unrestricted model (8 parameters) is listed in table 6:
The results of the non-linear fitting procedure for the unrestricted model (8 parameters) is listed in table 7:
```{r UnRPLAausw, echo=FALSE, warning=FALSE, results='asis'}
@@ -257,14 +248,19 @@ kable(UnRPLAausw, format = "markdown", caption= "Unrestricted 4PL model", digits
```
<!-- ```{r UnRPLBend, echo=FALSE, warning=FALSE, results='asis'} -->
<!-- kable(UnRPLBend, format = "markdown", caption= "Bend points of 4PL unrestricted", digits=3, row.names = F) -->
# Signature
<!-- ``` -->
\vspace{1.5cm}
\noindent
\begin{tabular}{p{6cm}p{1cm}p{6cm}}
\cline{1-1} \cline{3-3}
Date & & Signature
\end{tabular}
\newpage
# Appendix: Formulas
@@ -305,7 +301,20 @@ $$
B_{true}=B*\frac{D-A}{4}
$$
## Confidence intervals
In general, the confidence intervals are calculated as follows:
$$
CI = \hat\theta\pm se(\hat\theta)*q^{t_{n-p}}_{1-\frac{\alpha}{2}}
$$
…where $\hat\theta$ is a fitted parameter or a linear combination thereof, q is the 1-alpha/2 quantile of the Students t-distribution with n-p degrees of freedom and se is the standard error derived from any covariance matrix.
Let $\theta$ be the 4+1 parameters of the fit (a, b, d, EC50 of reference and EC50 difference). It can be shown that the least squares estimator $\hat\theta$ is normally distributed with asymptotic covariance matrix. The gradient method provides one of several ways to calculate the covariance matrix:
$$
\hat{V(\theta)}= \sigma^2(A(\hat\theta)^T*A(\hat\theta))^{-1}
$$
where A($\theta$) is the n x p matrix of the first partial derivatives for each parameter (i.e. gradient) realized at the fitted parameter estimates. The RMSE of the model or the pure error is used as estimate of $\sigma$. The square root of the diagonals of $\hat{V(\theta)}$ gives the standard errors and with that confidence intervals (CI) can be computed.
# Literature
@@ -317,6 +326,6 @@ VerHoef, J.M.: Who invented the Delta Method? The American Statistician, 2012, 6
Bates, D.M., Watts, D.G. (1988). Comparing models. In: Nonlinear Regression Analysis and Its Applications. New York: Wiley, pp 103-108
Bates, D.M., Watts, D.G. (1988) 2. In: Nonlinear Regression Analysis and Its Applications. New York: Wiley, pp 52-58