kinfit: Fit kinetic models to chemical degradation data

Description Usage Arguments Details Value Author(s) References Examples

View source: R/kinfit.R

Description

A selection of kinetic models as defined in the FOCUS kinetics report from 2006 are fitted to a given dataframe of chemical degradation data.

Usage

1
2
3
4
5
6
kinfit(kindata, kinmodels = c("SFO"), parent.0.user = NA, parent.0.fixed = FALSE,
  start.SFO = list(parent.0 = NA, k = NA), 
  start.FOMC = list(parent.0 = NA, alpha = NA, beta = NA), 
  start.DFOP = list(parent.0 = NA, k1 = NA, k2 = NA, g = NA),
  start.HS = list(parent.0 = NA, k1 = NA, k2 = NA, tb = NA),
  algorithm = "default")

Arguments

kindata

A data frame containing a time variable named t and concentration data for the parent compound named parent.

kinmodels

An array of character strings which are names of the models to be fit. Possible names are SFO, FOMC, DFOP and HS.

parent.0.user

The user can give a starting estimate for parent.0 here, overriding other potential sources for starting values as specified below.

parent.0.fixed

If TRUE, the initial value for the observed value will be fixed to the value specified by parent.0.user.

start.SFO

A list of starting parameters for fitting the SFO model, containing parent.0 and k.

start.FOMC

A list of starting parameters for fitting the FOMC model, containing parent.0, alpha and beta.

start.DFOP

A list of starting parameters for fitting the DFOP model, containing parent.0, k1, k2 and g.

start.HS

A list of starting parameters for fitting the HS model, containing parent.0, k1, k2 and tb.

algorithm

The algorithm to use for the calls to nls.

Details

Per default all starting parameters are NA and the function tries to find suitable starting parameters on its own.

Value

A list of models of class nls representing the models that were fitted successfully.

Author(s)

Johannes Ranke

References

FOCUS (2006) “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, http://focus.jrc.ec.europa.eu/dk

Examples

1
2
3
4
data(FOCUS_2006_A)
(kinfits <- kinfit(FOCUS_2006_A))
data(FOCUS_2006_B)
(kinfits <- kinfit(FOCUS_2006_B, kinmodels=c("SFO","FOMC")))

Example output

$SFO
Nonlinear regression model
  model: parent ~ SFO(t, parent.0, k)
   data: kindata
 parent.0         k 
109.15313   0.03722 
 residual sum-of-squares: 221.8

Number of iterations to convergence: 7 
Achieved convergence tolerance: 6.359e-06

$SFO
Nonlinear regression model
  model: parent ~ SFO(t, parent.0, k)
   data: kindata
parent.0        k 
99.17405  0.07816 
 residual sum-of-squares: 30.66

Number of iterations to convergence: 4 
Achieved convergence tolerance: 8.531e-06

$FOMC
Nonlinear regression model
  model: parent ~ FOMC(t, parent.0, alpha, beta)
   data: kindata
parent.0    alpha     beta 
   99.67    12.81   156.11 
 residual sum-of-squares: 28.58

Number of iterations to convergence: 8 
Achieved convergence tolerance: 4.184e-06

kinfit documentation built on May 30, 2017, 4:59 a.m.