diff options
author | Johannes Ranke <jranke@uni-bremen.de> | 2020-10-27 15:34:14 +0100 |
---|---|---|
committer | Johannes Ranke <jranke@uni-bremen.de> | 2020-10-27 15:36:46 +0100 |
commit | a5874ab7fce4616e80be69366ff0685332f47bf1 (patch) | |
tree | 17f36842de8ff457879be152779f8704f06a4787 /R/sigma_twocomp.R | |
parent | ca1b4c8cdb1de72b44df0ee8cebe11e10814efdf (diff) |
Add summary method for nlme.mmkin objects
Improve and update docs
Diffstat (limited to 'R/sigma_twocomp.R')
-rw-r--r-- | R/sigma_twocomp.R | 21 |
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) |