aboutsummaryrefslogtreecommitdiff
path: root/R/sigma_twocomp.R
diff options
context:
space:
mode:
Diffstat (limited to 'R/sigma_twocomp.R')
-rw-r--r--R/sigma_twocomp.R21
1 files changed, 7 insertions, 14 deletions
diff --git a/R/sigma_twocomp.R b/R/sigma_twocomp.R
index e8a92ced..e7f4368b 100644
--- a/R/sigma_twocomp.R
+++ b/R/sigma_twocomp.R
@@ -1,16 +1,16 @@
#' Two-component error model
-#'
+#'
#' Function describing the standard deviation of the measurement error in
#' dependence of the measured value \eqn{y}:
-#'
+#'
#' \deqn{\sigma = \sqrt{ \sigma_{low}^2 + y^2 * {rsd}_{high}^2}} sigma =
#' sqrt(sigma_low^2 + y^2 * rsd_high^2)
-#'
+#'
#' This is the error model used for example by Werner et al. (1978). The model
#' proposed by Rocke and Lorenzato (1995) can be written in this form as well,
#' but assumes approximate lognormal distribution of errors for high values of
#' y.
-#'
+#'
#' @param y The magnitude of the observed value
#' @param sigma_low The asymptotic minimum of the standard deviation for low
#' observed values
@@ -20,7 +20,7 @@
#' @references Werner, Mario, Brooks, Samuel H., and Knott, Lancaster B. (1978)
#' Additive, Multiplicative, and Mixed Analytical Errors. Clinical Chemistry
#' 24(11), 1895-1898.
-#'
+#'
#' Rocke, David M. and Lorenzato, Stefan (1995) A two-component model for
#' measurement error in analytical chemistry. Technometrics 37(2), 176-184.
#' @examples
@@ -36,15 +36,8 @@
#' data = d_syn, na.action = na.omit,
#' start = list(parent_0 = 100, lrc = -3))
#' if (length(findFunction("varConstProp")) > 0) {
-#' f_gnls_tc <- gnls(value ~ SSasymp(time, 0, parent_0, lrc),
-#' data = d_syn, na.action = na.omit,
-#' start = list(parent_0 = 100, lrc = -3),
-#' weights = varConstProp())
-#' f_gnls_tc_sf <- gnls(value ~ SSasymp(time, 0, parent_0, lrc),
-#' data = d_syn, na.action = na.omit,
-#' start = list(parent_0 = 100, lrc = -3),
-#' control = list(sigma = 1),
-#' weights = varConstProp())
+#' f_gnls_tc <- update(f_gnls, weights = varConstProp())
+#' f_gnls_tc_sf <- update(f_gnls_tc, control = list(sigma = 1))
#' }
#' f_mkin <- mkinfit("SFO", d_syn, error_model = "const", quiet = TRUE)
#' f_mkin_tc <- mkinfit("SFO", d_syn, error_model = "tc", quiet = TRUE)

Contact - Imprint