aboutsummaryrefslogtreecommitdiff
path: root/man
diff options
context:
space:
mode:
Diffstat (limited to 'man')
-rw-r--r--man/DFOP.solution.Rd36
-rw-r--r--man/FOCUS_2006_DFOP_ref_A_to_B.Rd39
-rw-r--r--man/FOCUS_2006_FOMC_ref_A_to_F.Rd38
-rw-r--r--man/FOCUS_2006_HS_ref_A_to_F.Rd39
-rw-r--r--man/FOCUS_2006_SFO_ref_A_to_F.Rd37
-rw-r--r--man/FOCUS_2006_datasets.Rd35
-rw-r--r--man/FOMC.solution.Rd49
-rw-r--r--man/HS.solution.Rd34
-rw-r--r--man/SFO.solution.Rd29
-rw-r--r--man/SFORB.solution.Rd36
-rw-r--r--man/endpoints.Rd33
-rw-r--r--man/ilr.Rd56
-rw-r--r--man/mccall81_245T.Rd42
-rw-r--r--man/mkin_long_to_wide.Rd36
-rw-r--r--man/mkin_wide_to_long.Rd32
-rw-r--r--man/mkinerrmin.Rd44
-rw-r--r--man/mkinfit.Rd254
-rw-r--r--man/mkinmod.Rd63
-rw-r--r--man/mkinparplot.Rd35
-rw-r--r--man/mkinplot.Rd26
-rw-r--r--man/mkinpredict.Rd91
-rw-r--r--man/mkinresplot.Rd67
-rw-r--r--man/plot.mkinfit.Rd94
-rw-r--r--man/schaefer07_complex_case.Rd42
-rw-r--r--man/summary.mkinfit.Rd75
-rw-r--r--man/transform_odeparms.Rd69
26 files changed, 0 insertions, 1431 deletions
diff --git a/man/DFOP.solution.Rd b/man/DFOP.solution.Rd
deleted file mode 100644
index d30cf7f..0000000
--- a/man/DFOP.solution.Rd
+++ /dev/null
@@ -1,36 +0,0 @@
-\name{DFOP.solution}
-\Rdversion{1.1}
-\alias{DFOP.solution}
-\title{
-Dual First-Order in Parallel kinetics
-}
-\description{
- Function describing decline from a defined starting value using the sum
- of two exponential decline functions.
-}
-\usage{
-DFOP.solution(t, parent.0, k1, k2, g)
-}
-\arguments{
- \item{t}{ Time. }
- \item{parent.0}{ Starting value for the response variable at time zero. }
- \item{k1}{ First kinetic constant. }
- \item{k2}{ Second kinetic constant. }
- \item{g}{ Fraction of the starting value declining according to the
- first kinetic constant.
- }
-}
-\value{
- The value of the response variable at time \code{t}.
-}
-\references{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
- \dontrun{plot(function(x) DFOP.solution(x, 100, 5, 0.5, 0.3), 0, 4, ylim=c(0,100))}
-}
-\keyword{ manip }
diff --git a/man/FOCUS_2006_DFOP_ref_A_to_B.Rd b/man/FOCUS_2006_DFOP_ref_A_to_B.Rd
deleted file mode 100644
index 88bd4ac..0000000
--- a/man/FOCUS_2006_DFOP_ref_A_to_B.Rd
+++ /dev/null
@@ -1,39 +0,0 @@
-\name{FOCUS_2006_DFOP_ref_A_to_B}
-\Rdversion{1.1}
-\alias{FOCUS_2006_DFOP_ref_A_to_B}
-\docType{data}
-\title{
-Results of fitting the DFOP model to Datasets A to B of FOCUS (2006)
-}
-\description{
-A table with the fitted parameters and the resulting DT50 and DT90 values
-generated with different software packages. Taken directly from FOCUS (2006).
-The results from fitting the data with the Topfit software was removed, as
-the initial concentration of the parent compound was fixed to a value of 100
-in this fit.
-}
-\usage{data(FOCUS_2006_DFOP_ref_A_to_B)}
-\format{
- A data frame containing the following variables.
- \describe{
- \item{\code{package}}{a factor giving the name of the software package}
- \item{\code{M0}}{The fitted initial concentration of the parent compound}
- \item{\code{f}}{The fitted f parameter}
- \item{\code{k1}}{The fitted k1 parameter}
- \item{\code{k2}}{The fitted k2 parameter}
- \item{\code{DT50}}{The resulting half-life of the parent compound}
- \item{\code{DT90}}{The resulting DT90 of the parent compound}
- \item{\code{dataset}}{The FOCUS dataset that was used}
- }
-}
-\source{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
-data(FOCUS_2006_DFOP_ref_A_to_B)
-}
-\keyword{datasets}
diff --git a/man/FOCUS_2006_FOMC_ref_A_to_F.Rd b/man/FOCUS_2006_FOMC_ref_A_to_F.Rd
deleted file mode 100644
index 2fcc2db..0000000
--- a/man/FOCUS_2006_FOMC_ref_A_to_F.Rd
+++ /dev/null
@@ -1,38 +0,0 @@
-\name{FOCUS_2006_FOMC_ref_A_to_F}
-\Rdversion{1.1}
-\alias{FOCUS_2006_FOMC_ref_A_to_F}
-\docType{data}
-\title{
-Results of fitting the FOMC model to Datasets A to F of FOCUS (2006)
-}
-\description{
-A table with the fitted parameters and the resulting DT50 and DT90 values
-generated with different software packages. Taken directly from FOCUS (2006).
-The results from fitting the data with the Topfit software was removed, as
-the initial concentration of the parent compound was fixed to a value of 100
-in this fit.
-}
-\usage{data(FOCUS_2006_FOMC_ref_A_to_F)}
-\format{
- A data frame containing the following variables.
- \describe{
- \item{\code{package}}{a factor giving the name of the software package}
- \item{\code{M0}}{The fitted initial concentration of the parent compound}
- \item{\code{alpha}}{The fitted alpha parameter}
- \item{\code{beta}}{The fitted beta parameter}
- \item{\code{DT50}}{The resulting half-life of the parent compound}
- \item{\code{DT90}}{The resulting DT90 of the parent compound}
- \item{\code{dataset}}{The FOCUS dataset that was used}
- }
-}
-\source{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
-data(FOCUS_2006_FOMC_ref_A_to_F)
-}
-\keyword{datasets}
diff --git a/man/FOCUS_2006_HS_ref_A_to_F.Rd b/man/FOCUS_2006_HS_ref_A_to_F.Rd
deleted file mode 100644
index 6fc9993..0000000
--- a/man/FOCUS_2006_HS_ref_A_to_F.Rd
+++ /dev/null
@@ -1,39 +0,0 @@
-\name{FOCUS_2006_HS_ref_A_to_F}
-\Rdversion{1.1}
-\alias{FOCUS_2006_HS_ref_A_to_F}
-\docType{data}
-\title{
-Results of fitting the HS model to Datasets A to F of FOCUS (2006)
-}
-\description{
-A table with the fitted parameters and the resulting DT50 and DT90 values
-generated with different software packages. Taken directly from FOCUS (2006).
-The results from fitting the data with the Topfit software was removed, as
-the initial concentration of the parent compound was fixed to a value of 100
-in this fit.
-}
-\usage{data(FOCUS_2006_HS_ref_A_to_F)}
-\format{
- A data frame containing the following variables.
- \describe{
- \item{\code{package}}{a factor giving the name of the software package}
- \item{\code{M0}}{The fitted initial concentration of the parent compound}
- \item{\code{tb}}{The fitted tb parameter}
- \item{\code{k1}}{The fitted k1 parameter}
- \item{\code{k2}}{The fitted k2 parameter}
- \item{\code{DT50}}{The resulting half-life of the parent compound}
- \item{\code{DT90}}{The resulting DT90 of the parent compound}
- \item{\code{dataset}}{The FOCUS dataset that was used}
- }
-}
-\source{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
-data(FOCUS_2006_HS_ref_A_to_F)
-}
-\keyword{datasets}
diff --git a/man/FOCUS_2006_SFO_ref_A_to_F.Rd b/man/FOCUS_2006_SFO_ref_A_to_F.Rd
deleted file mode 100644
index 19650ed..0000000
--- a/man/FOCUS_2006_SFO_ref_A_to_F.Rd
+++ /dev/null
@@ -1,37 +0,0 @@
-\name{FOCUS_2006_SFO_ref_A_to_F}
-\Rdversion{1.1}
-\alias{FOCUS_2006_SFO_ref_A_to_F}
-\docType{data}
-\title{
-Results of fitting the SFO model to Datasets A to F of FOCUS (2006)
-}
-\description{
-A table with the fitted parameters and the resulting DT50 and DT90 values
-generated with different software packages. Taken directly from FOCUS (2006).
-The results from fitting the data with the Topfit software was removed, as
-the initial concentration of the parent compound was fixed to a value of 100
-in this fit.
-}
-\usage{data(FOCUS_2006_SFO_ref_A_to_F)}
-\format{
- A data frame containing the following variables.
- \describe{
- \item{\code{package}}{a factor giving the name of the software package}
- \item{\code{M0}}{The fitted initial concentration of the parent compound}
- \item{\code{k}}{The fitted first-order degradation rate constant}
- \item{\code{DT50}}{The resulting half-life of the parent compound}
- \item{\code{DT90}}{The resulting DT90 of the parent compound}
- \item{\code{dataset}}{The FOCUS dataset that was used}
- }
-}
-\source{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
-data(FOCUS_2006_SFO_ref_A_to_F)
-}
-\keyword{datasets}
diff --git a/man/FOCUS_2006_datasets.Rd b/man/FOCUS_2006_datasets.Rd
deleted file mode 100644
index 5053b88..0000000
--- a/man/FOCUS_2006_datasets.Rd
+++ /dev/null
@@ -1,35 +0,0 @@
-\name{FOCUS_2006_datasets}
-\Rdversion{1.1}
-\alias{FOCUS_2006_A}
-\alias{FOCUS_2006_B}
-\alias{FOCUS_2006_C}
-\alias{FOCUS_2006_D}
-\alias{FOCUS_2006_E}
-\alias{FOCUS_2006_F}
-\docType{data}
-\title{
-Datasets A to F from the FOCUS Kinetics report from 2006
-}
-\description{
-Data taken from FOCUS (2006), p. 258.
-}
-\usage{FOCUS_2006_datasets}
-\format{
- 6 datasets with observations on the following variables.
- \describe{
- \item{\code{name}}{a factor containing the name of the observed variable}
- \item{\code{time}}{a numeric vector containing time points}
- \item{\code{value}}{a numeric vector containing concentrations in percent of applied radioactivity}
- }
-}
-\source{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
-FOCUS_2006_C
-}
-\keyword{datasets}
diff --git a/man/FOMC.solution.Rd b/man/FOMC.solution.Rd
deleted file mode 100644
index d04d34e..0000000
--- a/man/FOMC.solution.Rd
+++ /dev/null
@@ -1,49 +0,0 @@
-\name{FOMC.solution}
-\Rdversion{1.1}
-\alias{FOMC.solution}
-\title{ First-Order Multi-Compartment kinetics }
-\description{
- Function describing exponential decline from a defined starting value, with
- a decreasing rate constant.
-
- The form given here differs slightly from the original reference by Gustafson
- and Holden (1990). The parameter \code{beta} corresponds to 1/beta in the
- original equation.
-}
-\usage{
-FOMC.solution(t, parent.0, alpha, beta)
-}
-\arguments{
- \item{t}{ Time. }
- \item{parent.0}{ Starting value for the response variable at time zero. }
- \item{alpha}{
- Shape parameter determined by coefficient of variation of rate constant
- values. }
- \item{beta}{
- Location parameter.
-}
-}
-\note{
- The solution of the FOMC kinetic model reduces to the
- \code{\link{SFO.solution}} for large values of \code{alpha} and
- \code{beta} with
- \eqn{k = \frac{\beta}{\alpha}}{k = beta/alpha}.
-}
-\value{
- The value of the response variable at time \code{t}.
-}
-\references{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-
- Gustafson DI and Holden LR (1990) Nonlinear pesticide dissipation in soil: A
- new model based on spatial variability. \emph{Environmental Science and
- Technology} \bold{24}, 1032-1038
-}
-\examples{
- \dontrun{plot(function(x) FOMC.solution(x, 100, 10, 2), 0, 2)}
-}
-\keyword{ manip }
diff --git a/man/HS.solution.Rd b/man/HS.solution.Rd
deleted file mode 100644
index 71f68a1..0000000
--- a/man/HS.solution.Rd
+++ /dev/null
@@ -1,34 +0,0 @@
-\name{HS.solution}
-\Rdversion{1.1}
-\alias{HS.solution}
-\title{ Hockey-Stick kinetics }
-\description{
- Function describing two exponential decline functions with a break point
- between them.
-}
-\usage{
-HS.solution(t, parent.0, k1, k2, tb)
-}
-\arguments{
- \item{t}{ Time. }
- \item{parent.0}{ Starting value for the response variable at time zero. }
- \item{k1}{ First kinetic constant. }
- \item{k2}{ Second kinetic constant. }
- \item{tb}{ Break point. Before this time, exponential decline according
- to \code{k1} is calculated, after this time, exponential decline proceeds
- according to \code{k2}. }
-}
-\value{
- The value of the response variable at time \code{t}.
-}
-\references{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
- \dontrun{plot(function(x) HS.solution(x, 100, 2, 0.3, 0.5), 0, 2, ylim=c(0,100))}
-}
-\keyword{ manip }
diff --git a/man/SFO.solution.Rd b/man/SFO.solution.Rd
deleted file mode 100644
index 41a9ba9..0000000
--- a/man/SFO.solution.Rd
+++ /dev/null
@@ -1,29 +0,0 @@
-\name{SFO.solution}
-\Rdversion{1.1}
-\alias{SFO.solution}
-\title{ Single First-Order kinetics }
-\description{
- Function describing exponential decline from a defined starting value.
-}
-\usage{
- SFO.solution(t, parent.0, k)
-}
-\arguments{
- \item{t}{ Time. }
- \item{parent.0}{ Starting value for the response variable at time zero. }
- \item{k}{ Kinetic constant. }
-}
-\value{
- The value of the response variable at time \code{t}.
-}
-\references{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
- \dontrun{plot(function(x) SFO.solution(x, 100, 3), 0, 2)}
-}
-\keyword{ manip }
diff --git a/man/SFORB.solution.Rd b/man/SFORB.solution.Rd
deleted file mode 100644
index a935f69..0000000
--- a/man/SFORB.solution.Rd
+++ /dev/null
@@ -1,36 +0,0 @@
-\name{SFORB.solution}
-\Rdversion{1.1}
-\alias{SFORB.solution}
-\title{ Single First-Order Reversible Binding kinetics }
-\description{
- Function describing the solution of the differential equations describing
- the kinetic model with first-order terms for a two-way transfer from a free
- to a bound fraction, and a first-order degradation term for the free
- fraction. The initial condition is a defined amount in the free fraction and
- no substance in the bound fraction.
-}
-\usage{
- SFORB.solution(t, parent.0, k_12, k_21, k_1output)
-}
-\arguments{
- \item{t}{ Time. }
- \item{parent.0}{ Starting value for the response variable at time zero. }
- \item{k_12}{ Kinetic constant describing transfer from free to bound. }
- \item{k_21}{ Kinetic constant describing transfer from bound to free. }
- \item{k_1output}{ Kinetic constant describing degradation of the free fraction. }
-}
-\value{
- The value of the response variable, which is the sum of free and bound
- fractions at time \code{t}.
-}
-\references{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\examples{
- \dontrun{plot(function(x) SFORB.solution(x, 100, 0.5, 2, 3), 0, 2)}
-}
-\keyword{ manip }
diff --git a/man/endpoints.Rd b/man/endpoints.Rd
deleted file mode 100644
index 21316cf..0000000
--- a/man/endpoints.Rd
+++ /dev/null
@@ -1,33 +0,0 @@
-\name{endpoints}
-\alias{endpoints}
-\title{
-Function to calculate endpoints for further use from kinetic models fitted with mkinfit
-}
-\description{
-This function calculates DT50 and DT90 values as well as formation fractions from kinetic models
-fitted with mkinfit. If the SFORB model was specified for one of the parents or metabolites,
-the Eigenvalues are returned. These are equivalent to the rate constantes of the DFOP model, but
-with the advantage that the SFORB model can also be used for metabolites.
-}
-\usage{
-endpoints(fit, pseudoDT50 = FALSE)
-}
-\arguments{
- \item{fit}{
- An object of class \code{\link{mkinfit}}.
-}
- \item{pseudoDT50}{
- Should pseudoDT50 values for FOMC, DFOP and SFORB models be reported, as
- recommended by the FOCUS group? Currently not implemented.
-}
-}
-\note{
- The function is used internally by \code{\link{summary.mkinfit}}.
-}
-\value{
- A list with the components mentioned above.
-}
-\author{
- Johannes Ranke
-}
-\keyword{ manip }
diff --git a/man/ilr.Rd b/man/ilr.Rd
deleted file mode 100644
index cedb49c..0000000
--- a/man/ilr.Rd
+++ /dev/null
@@ -1,56 +0,0 @@
-\name{ilr}
-\alias{ilr}
-\alias{invilr}
-\title{
- Function to perform isotropic log-ratio transformation
-}
-\description{
- This implementation is a special case of the class of isotropic log-ratio transformations.
-}
-\usage{
- ilr(x)
- invilr(x)
-}
-\arguments{
- \item{x}{
- A numeric vector. Naturally, the forward transformation is only sensible for
- vectors with all elements being greater than zero.
- }
-}
-\value{
- The result of the forward or backward transformation. The returned components always
- sum to 1 for the case of the inverse log-ratio transformation.
-}
-\references{
- Peter Filzmoser, Karel Hron (2008) Outlier Detection for Compositional Data Using Robust Methods. Math Geosci 40 233-248
-}
-\author{
- René Lehmann and Johannes Ranke
-}
-\seealso{
- Other implementations are in R packages \code{compositions} and \code{robCompositions}.
-}
-\examples{
-# Order matters
-ilr(c(0.1, 1, 10))
-ilr(c(10, 1, 0.1))
-# Equal entries give ilr transformations with zeros as elements
-ilr(c(3, 3, 3))
-# Almost equal entries give small numbers
-ilr(c(0.3, 0.4, 0.3))
-# Only the ratio between the numbers counts, not their sum
-invilr(ilr(c(0.7, 0.29, 0.01)))
-invilr(ilr(2.1 * c(0.7, 0.29, 0.01)))
-# Inverse transformation of larger numbers gives unequal elements
-invilr(-10)
-invilr(c(-10, 0))
-# The sum of the elements of the inverse ilr is 1
-sum(invilr(c(-10, 0)))
-# This is why we do not need all elements of the inverse transformation to go back:
-a <- c(0.1, 0.3, 0.5)
-b <- invilr(a)
-length(b) # Four elements
-ilr(c(b[1:3], 1 - sum(b[1:3]))) # Gives c(0.1, 0.3, 0.5)
-}
-
-\keyword{ manip }
diff --git a/man/mccall81_245T.Rd b/man/mccall81_245T.Rd
deleted file mode 100644
index 6c1a137..0000000
--- a/man/mccall81_245T.Rd
+++ /dev/null
@@ -1,42 +0,0 @@
-\name{mccall81_245T}
-\alias{mccall81_245T}
-\docType{data}
-\title{
- Datasets on aerobic soil metabolism of 2,4,5-T in six soils
-}
-\description{
- Time course of 2,4,5-trichlorophenoxyacetic acid, and the corresponding
- 2,4,5-trichlorophenol and 2,4,5-trichloroanisole as recovered in diethylether
- extracts.
-}
-\usage{mccall81_245T}
-\format{
- A dataframe containing the following variables.
- \describe{
- \item{\code{name}}{the name of the compound observed. Note that T245 is used as
- an acronym for 2,4,5-T. T245 is a legitimate object name
- in R, which is necessary for specifying models using
- \code{\link{mkinmod}}.}
- \item{\code{time}}{a numeric vector containing sampling times in days after
- treatment}
- \item{\code{value}}{a numeric vector containing concentrations in percent of applied radioactivity}
- \item{\code{soil}}{a factor containing the name of the soil}
- }
-}
-\source{
- McCall P, Vrona SA, Kelley SS (1981) Fate of uniformly carbon-14 ring labeled 2,4,5-Trichlorophenoxyacetic acid and 2,4-dichlorophenoxyacetic acid. J Agric Chem 29, 100-107
- \url{http://dx.doi.org/10.1021/jf00103a026}
-}
-\examples{
- SFO_SFO_SFO <- mkinmod(T245 = list(type = "SFO", to = "phenol"),
- phenol = list(type = "SFO", to = "anisole"),
- anisole = list(type = "SFO"))
- \dontrun{fit.1 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == "Commerce"))
- summary(fit.1, data = FALSE)}
- # No covariance matrix and k_phenol_sink is really small, therefore fix it to zero
- fit.2 <- mkinfit(SFO_SFO_SFO, subset(mccall81_245T, soil == "Commerce"),
- parms.ini = c(k_phenol_sink = 0),
- fixed_parms = "k_phenol_sink")
- summary(fit.2, data = FALSE)
-}
-\keyword{datasets}
diff --git a/man/mkin_long_to_wide.Rd b/man/mkin_long_to_wide.Rd
deleted file mode 100644
index e583664..0000000
--- a/man/mkin_long_to_wide.Rd
+++ /dev/null
@@ -1,36 +0,0 @@
-\name{mkin_long_to_wide}
-\alias{mkin_long_to_wide}
-\title{
- Convert a dataframe from long to wide format.
-}
-\usage{
-mkin_long_to_wide(long_data, time = "time", outtime = "time")
-}
-\description{
- This function takes a dataframe in the long form as required by \code{\link{modCost}}
- and converts it into a dataframe with one independent variable and several
- dependent variables as columns.
-}
-\arguments{
- \item{long_data}{
- The dataframe must contain one variable called "time" with the time values specified by the
- \code{time} argument, one column called "name" with the grouping of the observed values, and
- finally one column of observed values called "value".
-}
- \item{time}{
- The name of the time variable in the long input data.
-}
- \item{outtime}{
- The name of the time variable in the wide output data.
-}
-}
-\value{
- Dataframe in wide format.
-}
-\author{
- Johannes Ranke
-}
-\examples{
-mkin_long_to_wide(FOCUS_2006_D)
-}
-\keyword{ manip }
diff --git a/man/mkin_wide_to_long.Rd b/man/mkin_wide_to_long.Rd
deleted file mode 100644
index d3dd200..0000000
--- a/man/mkin_wide_to_long.Rd
+++ /dev/null
@@ -1,32 +0,0 @@
-\name{mkin_wide_to_long}
-\alias{mkin_wide_to_long}
-\title{
- Convert a dataframe with observations over time into long format.
-}
-\usage{
-mkin_wide_to_long(wide_data, time = "t")
-}
-\description{
- This function simply takes a dataframe with one independent variable and several
- dependent variable and converts it into the long form as required by \code{\link{modCost}}.
-}
-\arguments{
- \item{wide_data}{
- The dataframe must contain one variable with the time values specified by the
- \code{time} argument and usually more than one column of observed values.
-}
- \item{time}{
- The name of the time variable.
-}
-}
-\value{
- Dataframe in long format as needed for \code{\link{modCost}}.
-}
-\author{
- Johannes Ranke
-}
-\examples{
-wide <- data.frame(t = c(1,2,3), x = c(1,4,7), y = c(3,4,5))
-mkin_wide_to_long(wide)
-}
-\keyword{ manip }
diff --git a/man/mkinerrmin.Rd b/man/mkinerrmin.Rd
deleted file mode 100644
index c43d87a..0000000
--- a/man/mkinerrmin.Rd
+++ /dev/null
@@ -1,44 +0,0 @@
-\name{mkinerrmin}
-\Rdversion{1.1}
-\alias{mkinerrmin}
-\title{
-Calculate the minimum error to assume in order to pass the variance test
-}
-\description{
-This function uses \code{\link{optimize}} in order to iteratively find the
-smallest relative error still resulting in passing the chi-squared test
-as defined in the FOCUS kinetics report from 2006.
-}
-\usage{
-mkinerrmin(fit, alpha = 0.05)
-}
-\arguments{
- \item{fit}{
- an object of class \code{\link{mkinfit}}.
- }
- \item{alpha}{
- The confidence level chosen for the chi-squared test.
-}
-}
-\value{
- A dataframe with the following components:
- \item{err.min}{The relative error, expressed as a fraction.}
- \item{n.optim}{The number of optimised parameters attributed to the data series.}
- \item{df}{The number of remaining degrees of freedom for the chi2 error level
- calculations. Note that mean values are used for the chi2 statistic and
- therefore every time point with observed values in the series only counts
- one time.}
- The dataframe has one row for the total dataset and one further row for
- each observed state variable in the model.
-}
-\details{
- This function is used internally by \code{\link{summary.mkinfit}}.
-}
-\references{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\keyword{ manip }
diff --git a/man/mkinfit.Rd b/man/mkinfit.Rd
deleted file mode 100644
index 823ceee..0000000
--- a/man/mkinfit.Rd
+++ /dev/null
@@ -1,254 +0,0 @@
-\name{mkinfit}
-\alias{mkinfit}
-\title{
- Fit a kinetic model to data with one or more state variables.
-}
-\description{
- This function uses the Flexible Modelling Environment package
- \code{\link{FME}} to create a function calculating the model cost, i.e. the
- deviation between the kinetic model and the observed data. This model cost is
- then minimised using the Levenberg-Marquardt algorithm \code{\link{nls.lm}},
- using the specified initial or fixed parameters and starting values.
- In each step of the optimsation, the kinetic model is solved using the
- function \code{\link{mkinpredict}}. The variance of the residuals for each
- observed variable can optionally be iteratively reweighted until convergence
- using the argument \code{reweight.method = "obs"}.
-}
-\usage{
-mkinfit(mkinmod, observed,
- parms.ini = "auto",
- state.ini = c(100, rep(0, length(mkinmod$diffs) - 1)),
- fixed_parms = NULL, fixed_initials = names(mkinmod$diffs)[-1],
- solution_type = "auto",
- method.ode = "lsoda",
- method.modFit = "Marq",
- control.modFit = list(),
- transform_rates = TRUE,
- transform_fractions = TRUE,
- plot = FALSE, quiet = FALSE, err = NULL, weight = "none",
- scaleVar = FALSE,
- atol = 1e-8, rtol = 1e-10, n.outtimes = 100,
- reweight.method = NULL,
- reweight.tol = 1e-8, reweight.max.iter = 10,
- trace_parms = FALSE, ...)
-}
-\arguments{
- \item{mkinmod}{
- A list of class \code{\link{mkinmod}}, containing the kinetic model to be fitted to the data.
- }
- \item{observed}{
- The observed data. It has to be in the long format as described in
- \code{\link{modFit}}, i.e. the first column called "name" must contain the
- name of the observed variable for each data point. The second column must
- contain the times of observation, named "time". The third column must be
- named "value" and contain the observed values. Optionally, a further column
- can contain weights for each data point. If it is not named "err", its name
- must be passed as a further argument named \code{err} which is then passed
- on to \code{\link{modFit}}.
- }
- \item{parms.ini}{
- A named vector of initial values for the parameters, including parameters
- to be optimised and potentially also fixed parameters as indicated by
- \code{fixed_parms}. If set to "auto", initial values for rate constants
- are set to default values. Using parameter names that are not in the model
- gives an error.
-
- It is possible to only specify a subset of the parameters that the model
- needs. You can use the parameter lists "bparms.ode" from a previously
- fitted model, which contains the differential equation parameters from this
- model. This works nicely if the models are nested. An example is given
- below.
- }
- \item{state.ini}{
- A named vector of initial values for the state variables of the model. In
- case the observed variables are represented by more than one model
- variable, the names will differ from the names of the observed variables
- (see \code{map} component of \code{\link{mkinmod}}). The default is to set
- the initial value of the first model variable to 100 and all others to 0.
- }
- \item{fixed_parms}{
- The names of parameters that should not be optimised but rather kept at the
- values specified in \code{parms.ini}.
- }
- \item{fixed_initials}{
- The names of model variables for which the initial state at time 0 should
- be excluded from the optimisation. Defaults to all state variables except
- for the first one.
- }
- \item{solution_type}{
- If set to "eigen", the solution of the system of differential equations is
- based on the spectral decomposition of the coefficient matrix in cases that
- this is possible. If set to "deSolve", a numerical ode solver from package
- \code{\link{deSolve}} is used. If set to "analytical", an analytical
- solution of the model is used. This is only implemented for simple
- degradation experiments with only one state variable, i.e. with no
- metabolites. The default is "auto", which uses "analytical" if possible,
- otherwise "eigen" if the model can be expressed using eigenvalues and
- eigenvectors, and finally "deSolve" for the remaining models (time
- dependence of degradation rates and metabolites). This argument is passed
- on to the helper function \code{\link{mkinpredict}}.
- }
- \item{method.ode}{
- The solution method passed via \code{\link{mkinpredict}} to
- \code{\link{ode}} in case the solution type is "deSolve". The default
- "lsoda" is performant, but sometimes fails to converge.
- }
- \item{method.modFit}{
- The optimisation method passed to \code{\link{modFit}}. The default "Marq"
- is the Levenberg Marquardt algorithm \code{\link{nls.lm}} from the package
- \code{minpack.lm}. Often other methods need more iterations to find the
- same result. When using "Pseudo", "upper" and "lower" need to be
- specified for the transformed parameters.
- }
- \item{control.modFit}{
- Additional arguments passed to the optimisation method used by
- \code{\link{modFit}}.
- }
- \item{transform_rates}{
- Boolean specifying if kinetic rate constants should be transformed in the
- model specification used in the fitting for better compliance with the
- assumption of normal distribution of the estimator. If TRUE, also
- alpha and beta parameters of the FOMC model are log-transformed, as well
- as k1 and k2 rate constants for the DFOP and HS models.
- If TRUE, zero is used as a lower bound for the rates in the optimisation.
- }
- \item{transform_fractions}{
- Boolean specifying if formation fractions constants should be transformed in the
- model specification used in the fitting for better compliance with the
- assumption of normal distribution of the estimator. The default (TRUE) is
- to do transformations. The g parameter of the DFOP and HS models are also
- transformed, as they can also be seen as compositional data. The
- transformation used for these transformations is the \code{\link{ilr}}
- transformation.
- }
- \item{plot}{
- Should the observed values and the numerical solutions be plotted at each
- stage of the optimisation?
- }
- \item{quiet}{
- Suppress printing out the current model cost after each improvement?
- }
- \item{err }{either \code{NULL}, or the name of the column with the
- \emph{error} estimates, used to weigh the residuals (see details of
- \code{\link{modCost}}); if \code{NULL}, then the residuals are not weighed.
- }
- \item{weight}{
- only if \code{err}=\code{NULL}: how to weight the residuals, one of "none",
- "std", "mean", see details of \code{\link{modCost}}.
- }
- \item{scaleVar}{
- Will be passed to \code{\link{modCost}}. Default is not to scale Variables
- according to the number of observations.
- }
- \item{atol}{
- Absolute error tolerance, passed to \code{\link{ode}}. Default is 1e-8,
- lower than in \code{\link{lsoda}}.
- }
- \item{rtol}{
- Absolute error tolerance, passed to \code{\link{ode}}. Default is 1e-10,
- much lower than in \code{\link{lsoda}}.
- }
- \item{n.outtimes}{
- The length of the dataseries that is produced by the model prediction
- function \code{\link{mkinpredict}}. This impacts the accuracy of
- the numerical solver if that is used (see \code{solution_type} argument.
- The default value is 100.
- }
- \item{reweight.method}{
- The method used for iteratively reweighting residuals, also known
- as iteratively reweighted least squares (IRLS). Default is NULL,
- the other method implemented is called "obs", meaning that each
- observed variable is assumed to have its own variance, this is
- estimated from the fit and used for weighting the residuals
- in each iteration until convergence of this estimate up to
- \code{reweight.tol} or up to the maximum number of iterations
- specified by \code{reweight.max.iter}.
- }
- \item{reweight.tol}{
- Tolerance for convergence criterion for the variance components
- in IRLS fits.
- }
- \item{reweight.max.iter}{
- Maximum iterations in IRLS fits.
- }
- \item{trace_parms}{
- Should a trace of the parameter values be listed?
- }
- \item{\dots}{
- Further arguments that will be passed to \code{\link{modFit}}.
- }
-}
-\value{
- A list with "mkinfit" and "modFit" in the class attribute.
- A summary can be obtained by \code{\link{summary.mkinfit}}.
-}
-\note{
- The implementation of iteratively reweighted least squares is inspired by the
- work of the KinGUII team at Bayer Crop Science (Walter Schmitt and Zhenglei
- Gao). A similar implemention can also be found in CAKE 2.0, which is the
- other GUI derivative of mkin, sponsored by Syngenta.
-}
-\author{
- Johannes Ranke <jranke@uni-bremen.de>
-}
-\examples{
-# One parent compound, one metabolite, both single first order.
-SFO_SFO <- mkinmod(
- parent = list(type = "SFO", to = "m1", sink = TRUE),
- m1 = list(type = "SFO"))
-# Fit the model to the FOCUS example dataset D using defaults
-fit <- mkinfit(SFO_SFO, FOCUS_2006_D)
-summary(fit)
-
-# Use stepwise fitting, using optimised parameters from parent only fit, FOMC
-\dontrun{
-FOMC <- mkinmod(parent = list(type = "FOMC"))
-FOMC_SFO <- mkinmod(
- parent = list(type = "FOMC", to = "m1", sink = TRUE),
- m1 = list(type = "SFO"))
-# Fit the model to the FOCUS example dataset D using defaults
-fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D)
-# Use starting parameters from parent only FOMC fit
-fit.FOMC = mkinfit(FOMC, FOCUS_2006_D, plot=TRUE)
-fit.FOMC_SFO <- mkinfit(FOMC_SFO, FOCUS_2006_D,
- parms.ini = fit.FOMC$bparms.ode, plot=TRUE)
-
-# Use stepwise fitting, using optimised parameters from parent only fit, SFORB
-SFORB <- mkinmod(parent = list(type = "SFORB"))
-SFORB_SFO <- mkinmod(
- parent = list(type = "SFORB", to = "m1", sink = TRUE),
- m1 = list(type = "SFO"))
-# Fit the model to the FOCUS example dataset D using defaults
-fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D)
-# Use starting parameters from parent only SFORB fit (not really needed in this case)
-fit.SFORB = mkinfit(SFORB, FOCUS_2006_D)
-fit.SFORB_SFO <- mkinfit(SFORB_SFO, FOCUS_2006_D, parms.ini = fit.SFORB$bparms.ode)
-}
-
-# Weighted fits, including IRLS
-SFO_SFO.ff <- mkinmod(parent = list(type = "SFO", to = "m1"),
- m1 = list(type = "SFO"), use_of_ff = "max")
-f.noweight <- mkinfit(SFO_SFO.ff, FOCUS_2006_D)
-summary(f.noweight)
-f.irls <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, reweight.method = "obs")
-summary(f.irls)
-f.w.mean <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, weight = "mean")
-summary(f.w.mean)
-f.w.mean.irls <- mkinfit(SFO_SFO.ff, FOCUS_2006_D, weight = "mean",
- reweight.method = "obs")
-summary(f.w.mean.irls)
-
-\dontrun{
-# Manual weighting
-dw <- FOCUS_2006_D
-errors <- c(parent = 2, m1 = 1)
-dw$err.man <- errors[FOCUS_2006_D$name]
-f.w.man <- mkinfit(SFO_SFO.ff, dw, err = "err.man")
-summary(f.w.man)
-f.w.man.irls <- mkinfit(SFO_SFO.ff, dw, err = "err.man",
- reweight.method = "obs")
-summary(f.w.man.irls)
-}
-}
-\keyword{ models }
-\keyword{ optimize }
diff --git a/man/mkinmod.Rd b/man/mkinmod.Rd
deleted file mode 100644
index 76127c5..0000000
--- a/man/mkinmod.Rd
+++ /dev/null
@@ -1,63 +0,0 @@
-\name{mkinmod}
-\alias{mkinmod}
-\title{
- Function to set up a kinetic model with one or more state variables.
-}
-\description{
- The function takes a specification, consisting of a list of the observed variables
- in the data. Each observed variable is again represented by a list, specifying the
- kinetic model type and reaction or transfer to other observed compartments.
-}
-\usage{
-mkinmod(..., use_of_ff = "min", speclist = NULL)
-}
-\arguments{
- \item{...}{
- For each observed variable, a list has to be specified as an argument, containing
- at least a component \code{type}, specifying the type of kinetics to use
- for the variable. Currently, single first order kinetics "SFO" or
- single first order with reversible binding "SFORB" are implemented for all
- variables, while
- "FOMC", "DFOP" and "HS" can additionally be chosen for the first
- variable which is assumed to be the source compartment.
- Additionally, each component of the list can include a character vector \code{to},
- specifying names of variables to which a transfer is to be assumed in the
- model.
- If the argument \code{use_of_ff} is set to "min" (default) and the model for
- the compartment is "SFO" or "SFORB", an additional component of the list
- can be "sink=FALSE" effectively fixing the flux to sink to zero.
- }
- \item{use_of_ff}{
- Specification of the use of formation fractions in the model equations and, if
- applicable, the coefficient matrix. If "min", a minimum use of formation
- fractions is made in order to avoid fitting the product of formation fractions
- and rate constants. If "max", formation fractions are always used.
- }
- \item{speclist}{
- The specification of the observed variables and their submodel types and
- pathways can be given as a single list using this argument. Default is NULL.
- }
-}
-\value{
- A list of class \code{mkinmod} for use with \code{\link{mkinfit}}, containing
- \item{diffs}{ A vector of string representations of differential equations,
- one for each modelling variable. }
- \item{parms}{ A vector of parameter names occurring in the differential equations. }
- \item{map}{ A list containing named character vectors for each observed variable, specifying
- the modelling variables by which it is represented. }
- \item{use_of_ff}{ The content of \code{use_of_ff} is passed on in this list component. }
- \item{coefmat}{ The coefficient matrix, if the system of differential equations can be represented by one. }
-}
-\author{
- Johannes Ranke
-}
-\examples{
-# Specify the SFO model
-SFO <- mkinmod(parent = list(type = "SFO"))
-
-# One parent compound, one metabolite, both single first order.
-SFO_SFO <- mkinmod(
- parent = list(type = "SFO", to = "m1"),
- m1 = list(type = "SFO"))
-}
-\keyword{ models }
diff --git a/man/mkinparplot.Rd b/man/mkinparplot.Rd
deleted file mode 100644
index 60103b8..0000000
--- a/man/mkinparplot.Rd
+++ /dev/null
@@ -1,35 +0,0 @@
-\name{mkinparplot}
-\alias{mkinparplot}
-\title{
- Function to plot the confidence intervals obtained using
- \code{\link{mkinfit}}
-}
-\description{
- This function plots the confidence intervals for the parameters
- fitted using \code{\link{mkinfit}}.
-}
-\usage{
- mkinparplot(object)
-}
-\arguments{
- \item{object}{
- A fit represented in an \code{\link{mkinfit}} object.
- }
-}
-\value{
- Nothing is returned by this function, as it is called for its side effect, namely to produce a plot.
-}
-\author{
- Johannes Ranke
-}
-
-\examples{
-model <- mkinmod(
- T245 = list(type = "SFO", to = c("phenol")),
- phenol = list(type = "SFO", to = c("anisole")),
- anisole = list(type = "SFO"), use_of_ff = "max")
-fit <- mkinfit(model, subset(mccall81_245T, soil == "Commerce"),
- parms.ini = c(f_phenol_to_anisole = 1), fixed_parms = "f_phenol_to_anisole")
-\dontrun{mkinparplot(fit)}
-}
-\keyword{ hplot }
diff --git a/man/mkinplot.Rd b/man/mkinplot.Rd
deleted file mode 100644
index 4b0fef4..0000000
--- a/man/mkinplot.Rd
+++ /dev/null
@@ -1,26 +0,0 @@
-\name{mkinplot}
-\alias{mkinplot}
-\title{
- Plot the observed data and the fitted model of an mkinfit.
-}
-\description{
- Deprecated function. It now only calls the plot method \code{\link{plot.mkinfit}}.
-}
-\usage{
- mkinplot(fit, ...)
-}
-\arguments{
- \item{fit}{
- an object of class \code{\link{mkinfit}}.
- }
- \item{\dots}{
- further arguments passed to \code{\link{plot.mkinfit}}.
-}
-}
-\value{
- The function is called for its side effect.
-}
-\author{
- Johannes Ranke
-}
-\keyword{ hplot }
diff --git a/man/mkinpredict.Rd b/man/mkinpredict.Rd
deleted file mode 100644
index 97db90e..0000000
--- a/man/mkinpredict.Rd
+++ /dev/null
@@ -1,91 +0,0 @@
-\name{mkinpredict}
-\alias{mkinpredict}
-\title{
- Produce predictions from a kinetic model using specifc parameters
-}
-\description{
- This function produces a time series for all the observed variables in a
- kinetic model as specified by \code{\link{mkinmod}}, using a specific set of
- kinetic parameters and initial values for the state variables.
-}
-\usage{
- mkinpredict(mkinmod, odeparms, odeini, outtimes, solution_type = "deSolve",
- method.ode = "lsoda", atol = 1e-08, rtol = 1e-10, map_output = TRUE, ...)
-}
-\arguments{
- \item{mkinmod}{
- A kinetic model as produced by \code{\link{mkinmod}}.
- }
- \item{odeparms}{
- A numeric vector specifying the parameters used in the kinetic model, which
- is generally defined as a set of ordinary differential equations.
- }
- \item{odeini}{
- A numeric vectory containing the initial values of the state variables of
- the model. Note that the state variables can differ from the observed
- variables, for example in the case of the SFORB model.
- }
- \item{outtimes}{
- A numeric vector specifying the time points for which model predictions
- should be generated.
- }
- \item{solution_type}{
- The method that should be used for producing the predictions. This should
- generally be "analytical" if there is only one observed variable, and
- usually "deSolve" in the case of several observed variables. The third
- possibility "eigen" is faster but not applicable to some models e.g.
- using FOMC for the parent compound.
- }
- \item{method.ode}{
- The solution method passed via \code{\link{mkinpredict}} to
- \code{\link{ode}} in case the solution type is "deSolve". The default
- "lsoda" is performant, but sometimes fails to converge.
- }
- \item{atol}{
- Absolute error tolerance, passed to \code{\link{ode}}. Default is 1e-8,
- lower than in \code{\link{lsoda}}.
- }
- \item{rtol}{
- Absolute error tolerance, passed to \code{\link{ode}}. Default is 1e-10,
- much lower than in \code{\link{lsoda}}.
- }
- \item{map_output}{
- Boolean to specify if the output should list values for the observed
- variables (default) or for all state variables (if set to FALSE).
- }
- \item{\dots}{
- Further arguments passed to the ode solver in case such a solver is used.
- }
-}
-\value{
- A matrix in the same format as the output of \code{\link{ode}}.
-}
-\author{
- Johannes Ranke
-}
-\examples{
- SFO <- mkinmod(degradinol = list(type = "SFO"))
- mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20,
- solution_type = "analytical")
- mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20,
- solution_type = "eigen")
-
- mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 1:20,
- solution_type = "analytical")[20,]
- mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20,
- atol = 1e-20)[20,]
-
- # The integration method does not make a lot of difference
- mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20,
- atol = 1e-20, method = "ode45")[20,]
- mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100), 0:20,
- atol = 1e-20, method = "rk4")[20,]
-
- # The number of output times used to make a lot of difference until the
- # default for atol was adjusted
- mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100),
- seq(0, 20, by = 0.1))[201,]
- mkinpredict(SFO, c(k_degradinol_sink = 0.3), c(degradinol = 100),
- seq(0, 20, by = 0.01))[2001,]
-}
-\keyword{ manip }
diff --git a/man/mkinresplot.Rd b/man/mkinresplot.Rd
deleted file mode 100644
index 3f53dd1..0000000
--- a/man/mkinresplot.Rd
+++ /dev/null
@@ -1,67 +0,0 @@
-\name{mkinresplot}
-\alias{mkinresplot}
-\title{
- Function to plot residuals stored in an mkin object
-}
-\description{
- This function plots the residuals for the specified subset of the
- observed variables from an mkinfit object. A combined plot of the fitted
- model and the residuals can be obtained using \code{\link{plot.mkinfit}}
- using the argument \code{show_residuals = TRUE}.
-}
-\usage{
- mkinresplot(object,
- obs_vars = names(object$mkinmod$map),
- xlab = "Time", ylab = "Residual",
- maxabs = "auto", legend = TRUE, lpos = "topright", ...)
-}
-\arguments{
- \item{object}{
- A fit represented in an \code{\link{mkinfit}} object.
-}
- \item{obs_vars}{
- A character vector of names of the observed variables for which residuals
- should be plotted. Defaults to all observed variables in the model
-}
- \item{xlab}{
- Label for the x axis. Defaults to "Time [days]".
-}
- \item{ylab}{
- Label for the y axis. Defaults to "Residual [\% of applied radioactivity]".
-}
- \item{maxabs}{
- Maximum absolute value of the residuals. This is used for the scaling of
- the y axis and defaults to "auto".
-}
- \item{legend}{
- Should a legend be plotted? Defaults to "TRUE".
-}
- \item{lpos}{
- Where should the legend be placed? Default is "topright". Will be passed on to
- \code{\link{legend}}. }
- \item{\dots}{
- further arguments passed to \code{\link{plot}}.
-}
-}
-\value{
- Nothing is returned by this function, as it is called for its side effect, namely to produce a plot.
-}
-\author{
- Johannes Ranke
-}
-
-\seealso{
- \code{\link{mkinplot}}, for a way to plot the data and the fitted lines of the
- mkinfit object. }
-\examples{
-data <- mkin_wide_to_long(schaefer07_complex_case, time = "time")
-model <- mkinmod(
- parent = list(type = "SFO", to = c("A1", "B1", "C1"), sink = FALSE),
- A1 = list(type = "SFO", to = "A2"),
- B1 = list(type = "SFO"),
- C1 = list(type = "SFO"),
- A2 = list(type = "SFO"))
-\dontrun{fit <- mkinfit(model, data, plot=TRUE)}
-\dontrun{mkinresplot(fit, "A1")}
-}
-\keyword{ hplot }
diff --git a/man/plot.mkinfit.Rd b/man/plot.mkinfit.Rd
deleted file mode 100644
index 7009e7d..0000000
--- a/man/plot.mkinfit.Rd
+++ /dev/null
@@ -1,94 +0,0 @@
-\name{plot.mkinfit}
-\alias{plot.mkinfit}
-\title{
- Plot the observed data and the fitted model of an mkinfit object.
-}
-\description{
- Solves the differential equations with the optimised and fixed parameters
- from a previous successful call to \code{\link{mkinfit}} and plots
- the observed data together with the solution of the fitted model.
-}
-\usage{
-\method{plot}{mkinfit}(x, fit = x,
- obs_vars = names(fit$mkinmod$map),
- xlab = "Time", ylab = "Observed",
- xlim = range(fit$data$time),
- ylim = "default",
- col_obs = 1:length(fit$mkinmod$map), pch_obs = col_obs,
- lty_obs = rep(1, length(fit$mkinmod$map)),
- add = FALSE, legend = !add,
- show_residuals = FALSE, maxabs = "auto",
- lpos = "topright", inset = c(0.05, 0.05), \dots)
-}
-\arguments{
- \item{x}{
- Alias for fit introduced for compatibility with the generic S3 method.
- }
- \item{fit}{
- an object of class \code{\link{mkinfit}}.
- }
- \item{obs_vars}{
- A character vector of names of the observed variables for which the
- data and the model should be plotted. Defauls to all observed variables
- in the model.
- }
- \item{xlab}{
- label for the x axis.
- }
- \item{ylab}{
- label for the y axis.
- }
- \item{xlim}{
- plot range in x direction.
- }
- \item{ylim}{
- plot range in y direction.
- }
- \item{col_obs}{
- colors used for plotting the observed data and the corresponding model prediction lines.
- }
- \item{pch_obs}{
- symbols to be used for plotting the data.
- }
- \item{lty_obs}{
- line types to be used for the model predictions.
- }
- \item{add}{
- should the plot be added to an existing plot?
- }
- \item{legend}{
- should a legend be added to the plot?
- }
- \item{show_residuals}{
- should residuals be shown in the lower third of the plot?
- }
- \item{maxabs}{
- Maximum absolute value of the residuals. This is used for the scaling of
- the y axis and defaults to "auto".
- }
- \item{lpos}{
- position of the legend. Passed to \code{\link{legend}} as the first argument.
- }
- \item{inset}{
- Passed to \code{\link{legend}} if applicable.
- }
- \item{\dots}{
- further arguments passed to \code{\link{plot}}.
- }
-}
-\value{
- The function is called for its side effect.
-}
-\examples{
-# One parent compound, one metabolite, both single first order.
-SFO_SFO <- mkinmod(
- parent = list(type = "SFO", to = "m1", sink = TRUE),
- m1 = list(type = "SFO"))
-# Fit the model to the FOCUS example dataset D using defaults
-fit <- mkinfit(SFO_SFO, FOCUS_2006_D)
-\dontrun{plot(fit)}
-}
-\author{
- Johannes Ranke
-}
-\keyword{ hplot }
diff --git a/man/schaefer07_complex_case.Rd b/man/schaefer07_complex_case.Rd
deleted file mode 100644
index ed4f694..0000000
--- a/man/schaefer07_complex_case.Rd
+++ /dev/null
@@ -1,42 +0,0 @@
-\name{schaefer07_complex_case}
-\alias{schaefer07_complex_case}
-\alias{schaefer07_complex_results}
-\encoding{latin1}
-\docType{data}
-\title{
- Metabolism data set used for checking the software quality of KinGUI
-}
-\description{
- This dataset was used for a comparison of KinGUI and ModelMaker to check the
- software quality of KinGUI in the original publication (Schäfer et al., 2007).
- The results from the fitting are also included.
-}
-\usage{data(schaefer07_complex_case)}
-\format{
- The data set is a data frame with 8 observations on the following 6 variables.
- \describe{
- \item{\code{time}}{a numeric vector}
- \item{\code{parent}}{a numeric vector}
- \item{\code{A1}}{a numeric vector}
- \item{\code{B1}}{a numeric vector}
- \item{\code{C1}}{a numeric vector}
- \item{\code{A2}}{a numeric vector}
- }
- The results are a data frame with 14 results for different parameter values
-}
-\references{
- Schäfer D, Mikolasch M, Rainbird P and Harvey B (2007). KinGUI: a new kinetic
- software tool for evaluations according to FOCUS degradation kinetics. In: Del
- Re AAM, Capri E, Fragoulis G and Trevisan M (Eds.). Proceedings of the XIII
- Symposium Pesticide Chemistry, Piacenza, 2007, p. 916-923. }
-\examples{
-data <- mkin_wide_to_long(schaefer07_complex_case, time = "time")
-model <- mkinmod(
- parent = list(type = "SFO", to = c("A1", "B1", "C1"), sink = FALSE),
- A1 = list(type = "SFO", to = "A2"),
- B1 = list(type = "SFO"),
- C1 = list(type = "SFO"),
- A2 = list(type = "SFO"))
-\dontrun{mkinfit(model, data, plot=TRUE)}
-}
-\keyword{datasets}
diff --git a/man/summary.mkinfit.Rd b/man/summary.mkinfit.Rd
deleted file mode 100644
index 472b5de..0000000
--- a/man/summary.mkinfit.Rd
+++ /dev/null
@@ -1,75 +0,0 @@
-\name{summary.mkinfit}
-\alias{summary.mkinfit}
-\alias{print.summary.mkinfit}
-\title{
- Summary method for class "mkinfit".
-}
-\description{
- Lists model equations, the summary as returned by \code{\link{summary.modFit}},
- the chi2 error levels calculated according to FOCUS guidance (2006) as far
- as defined therein, and optionally the data, consisting of observed, predicted
- and residual values.
-}
-\usage{
-\method{summary}{mkinfit}(object, data = TRUE, distimes = TRUE, alpha = 0.05, ...)
-\method{print}{summary.mkinfit}(x, digits = max(3, getOption("digits") - 3), ...)
-}
-
-\arguments{
- \item{object}{
- an object of class \code{\link{mkinfit}}.
-}
- \item{x}{
- an object of class \code{summary.mkinfit}.
-}
- \item{data}{
- logical, indicating whether the data should be included in the summary.
-}
- \item{distimes}{
- logical, indicating whether DT50 and DT90 values should be included.
-}
- \item{alpha}{
- error level for confidence interval estimation from t distribution
-}
- \item{digits}{
- Number of digits to use for printing
-}
- \item{\dots}{
- optional arguments passed to methods like \code{print}.
-}
-}
-\value{
- The summary function returns a list derived from
- \code{\link{summary.modFit}}, with components, among others
- \item{version, Rversion}{The mkin and R versions used}
- \item{date.fit, date.summary}{The dates where the fit and the summary were produced}
- \item{use_of_ff}{Was maximum or minimum use made of formation fractions}
- \item{residuals, residualVariance, sigma, modVariance, df}{As in summary.modFit}
- \item{cov.unscaled, cov.scaled, info, niter, stopmess, par}{As in summary.modFit}
- \item{bpar}{Optimised and backtransformed parameters}
- \item{diffs }{The differential equations used in the model}
- \item{data }{The data (see Description above).}
- \item{start }{The starting values and bounds, if applicable, for optimised parameters.}
- \item{fixed }{The values of fixed parameters.}
- \item{errmin }{The chi2 error levels for each observed variable.}
- \item{bparms.ode }{All backtransformed ODE parameters, for use as starting parameters for
- related models.}
- \item{ff }{The estimated formation fractions derived from the fitted model.}
- \item{distimes }{The DT50 and DT90 values for each observed variable.}
- \item{SFORB}{If applicable, eigenvalues of SFORB components of the model.}
- The print method is called for its side effect, i.e. printing the summary.
-}
-\references{
- FOCUS (2006) \dQuote{Guidance Document on Estimating Persistence and
- Degradation Kinetics from Environmental Fate Studies on Pesticides in EU
- Registration} Report of the FOCUS Work Group on Degradation Kinetics,
- EC Document Reference Sanco/10058/2005 version 2.0, 434 pp,
- \url{http://focus.jrc.ec.europa.eu/dk}
-}
-\author{
- Johannes Ranke <jranke@{harlan.com,uni-bremen.de}>
-}
-\examples{
- summary(mkinfit(mkinmod(parent = list(type = "SFO")), FOCUS_2006_A))
-}
-\keyword{ utilities }
diff --git a/man/transform_odeparms.Rd b/man/transform_odeparms.Rd
deleted file mode 100644
index c52fb4f..0000000
--- a/man/transform_odeparms.Rd
+++ /dev/null
@@ -1,69 +0,0 @@
-\name{transform_odeparms}
-\alias{transform_odeparms}
-\alias{backtransform_odeparms}
-\title{
- Functions to transform and backtransform kinetic parameters for fitting
-}
-\description{
- The transformations are intended to map parameters that should only take
- on restricted values to the full scale of real numbers. For kinetic rate
- constants and other paramters that can only take on positive values, a
- simple log transformation is used. For compositional parameters, such as
- the formations fractions that should always sum up to 1 and can not be
- negative, the \code{\link{ilr}} transformation is used.
-}
-\usage{
-transform_odeparms(parms, mod_vars, transform_rates = TRUE, transform_fractions = TRUE)
-backtransform_odeparms(transparms, mod_vars,
- transform_rates = TRUE, transform_fractions = TRUE)
-}
-\arguments{
- \item{parms}{
- Parameters of kinetic models as used in the differential equations.
- }
- \item{transparms}{
- Transformed parameters of kinetic models as used in the fitting procedure.
- }
- \item{mod_vars}{
- Names of the state variables in the kinetic model. These are used for
- grouping the formation fractions before \code{\link{ilr}} transformation.
- }
- \item{transform_rates}{
- Boolean specifying if kinetic rate constants should be transformed in the
- model specification used in the fitting for better compliance with the
- assumption of normal distribution of the estimator. If TRUE, also
- alpha and beta parameters of the FOMC model are log-transformed, as well
- as k1 and k2 rate constants for the DFOP and HS models and the break point tb
- of the HS model
- }
- \item{transform_fractions}{
- Boolean specifying if formation fractions constants should be transformed in the
- model specification used in the fitting for better compliance with the
- assumption of normal distribution of the estimator. The default (TRUE) is
- to do transformations. The g parameter of the DFOP and HS models are also
- transformed, as they can also be seen as compositional data. The
- transformation used for these transformations is the \code{\link{ilr}}
- transformation.
- }
-}
-\value{
- A vector of transformed or backtransformed parameters with the same names
- as the original parameters.
-}
-\author{
- Johannes Ranke
-}
-\examples{
-SFO_SFO <- mkinmod(
- parent = list(type = "SFO", to = "m1", sink = TRUE),
- m1 = list(type = "SFO"))
-# Fit the model to the FOCUS example dataset D using defaults
-fit <- mkinfit(SFO_SFO, FOCUS_2006_D)
-summary(fit, data=FALSE) # See transformed and backtransformed parameters
-initials <- fit$start$value
-transformed <- fit$start$transformed
-names(initials) <- names(transformed) <- rownames(fit$start)
-transform_odeparms(initials, c("parent", "m1"))
-backtransform_odeparms(transformed, c("parent", "m1"))
-}
-\keyword{ manip }

Contact - Imprint