Skip to contents

Main functions

Essential functionality

mkinmod() print(<mkinmod>) mkinsub()
Function to set up a kinetic model with one or more state variables
mkinfit()
Fit a kinetic model to data with one or more state variables
mmkin() print(<mmkin>)
Fit one or more kinetic models with one or more state variables to one or more datasets
mhmkin() `[`(<mhmkin>) print(<mhmkin>)
Fit nonlinear mixed-effects models built from one or more kinetic degradation models and one or more error models

Generics

Generic functions introduced by the package

parms()
Extract model parameters
status() print(<status.mmkin>) print(<status.mhmkin>)
Method to get status information for fit array objects
illparms() print(<illparms.mkinfit>) print(<illparms.mmkin>) print(<illparms.saem.mmkin>) print(<illparms.mhmkin>)
Method to get the names of ill-defined parameters
endpoints()
Function to calculate endpoints for further use from kinetic models fitted with mkinfit
aw()
Calculate Akaike weights for model averaging

Show results

Functions working with mkinfit objects

plot(<mkinfit>) plot_sep() plot_res() plot_err()
Plot the observed data and the fitted model of an mkinfit object
summary(<mkinfit>) print(<summary.mkinfit>)
Summary method for class "mkinfit"
confint(<mkinfit>)
Confidence intervals for parameters of mkinfit objects
update(<mkinfit>)
Update an mkinfit model with different arguments
lrtest(<mkinfit>) lrtest(<mmkin>)
Likelihood ratio test for mkinfit models
loftest()
Lack-of-fit test for models fitted to data with replicates
mkinerrmin()
Calculate the minimum error to assume in order to pass the variance test
CAKE_export()
Export a list of datasets format to a CAKE study file

Work with mmkin objects

Functions working with aggregated results

`[`(<mmkin>)
Subsetting method for mmkin objects
plot(<mmkin>)
Plot model fits (observed and fitted) and the residuals for a row or column of an mmkin object
AIC(<mmkin>) BIC(<mmkin>)
Calculate the AIC for a column of an mmkin object
summary(<mmkin>) print(<summary.mmkin>)
Summary method for class "mmkin"

Mixed models

Create and work with nonlinear hierarchical models

hierarchical_kinetics()
Hierarchical kinetics template
read_spreadsheet()
Read datasets and relevant meta information from a spreadsheet file
nlme(<mmkin>) print(<nlme.mmkin>) update(<nlme.mmkin>)
Create an nlme model for an mmkin row object
saem() print(<saem.mmkin>) saemix_model() saemix_data()
Fit nonlinear mixed models with SAEM
mhmkin() `[`(<mhmkin>) print(<mhmkin>)
Fit nonlinear mixed-effects models built from one or more kinetic degradation models and one or more error models
plot(<mixed.mmkin>)
Plot predictions from a fitted nonlinear mixed model obtained via an mmkin row object
summary(<nlme.mmkin>) print(<summary.nlme.mmkin>)
Summary method for class "nlme.mmkin"
summary(<saem.mmkin>) print(<summary.saem.mmkin>)
Summary method for class "saem.mmkin"
anova(<saem.mmkin>)
Anova method for saem.mmkin objects
logLik(<saem.mmkin>)
logLik method for saem.mmkin objects
nlme_function() nlme_data()
Helper functions to create nlme models from mmkin row objects
get_deg_func()
Retrieve a degradation function from the mmkin namespace
mixed() print(<mixed.mmkin>)
Create a mixed effects model from an mmkin row object
reexports intervals lrtest nlme
Objects exported from other packages
intervals(<saem.mmkin>)
Confidence intervals for parameters in saem.mmkin objects
multistart() print(<multistart>) best() which.best()
Perform a hierarchical model fit with multiple starting values
llhist()
Plot the distribution of log likelihoods from multistart objects
parplot()
Plot parameter variability of multistart objects

Datasets and known results

ds_mixed ds_sfo ds_fomc ds_dfop ds_hs ds_dfop_sfo
Synthetic data for hierarchical kinetic degradation models
D24_2014
Aerobic soil degradation data on 2,4-D from the EU assessment in 2014
dimethenamid_2018
Aerobic soil degradation data on dimethenamid and dimethenamid-P from the EU assessment in 2018
FOCUS_2006_A FOCUS_2006_B FOCUS_2006_C FOCUS_2006_D FOCUS_2006_E FOCUS_2006_F
Datasets A to F from the FOCUS Kinetics report from 2006
FOCUS_2006_SFO_ref_A_to_F
Results of fitting the SFO model to Datasets A to F of FOCUS (2006)
FOCUS_2006_FOMC_ref_A_to_F
Results of fitting the FOMC model to Datasets A to F of FOCUS (2006)
FOCUS_2006_HS_ref_A_to_F
Results of fitting the HS model to Datasets A to F of FOCUS (2006)
FOCUS_2006_DFOP_ref_A_to_B
Results of fitting the DFOP model to Datasets A to B of FOCUS (2006)
NAFTA_SOP_Appendix_B NAFTA_SOP_Appendix_D
Example datasets from the NAFTA SOP published 2015
NAFTA_SOP_Attachment
Example datasets from Attachment 1 to the NAFTA SOP published 2015
mccall81_245T
Datasets on aerobic soil metabolism of 2,4,5-T in six soils
schaefer07_complex_case
Metabolism data set used for checking the software quality of KinGUI
synthetic_data_for_UBA_2014
Synthetic datasets for one parent compound with two metabolites
experimental_data_for_UBA_2019
Experimental datasets used for development and testing of error models
test_data_from_UBA_2014
Three experimental datasets from two water sediment systems and one soil
focus_soil_moisture
FOCUS default values for soil moisture contents at field capacity, MWHC and 1/3 bar
print(<mkinds>)
A dataset class for mkin
print(<mkindsg>)
A class for dataset groups for mkin

NAFTA guidance

nafta() print(<nafta>)
Evaluate parent kinetics using the NAFTA guidance
plot(<nafta>)
Plot the results of the three models used in the NAFTA scheme.

Utility functions

summary_listing() tex_listing() html_listing()
Display the output of a summary function according to the output format
f_time_norm_focus()
Normalisation factors for aerobic soil degradation according to FOCUS guidance
set_nd_nq() set_nd_nq_focus()
Set non-detects and unquantified values in residue series without replicates
max_twa_parent() max_twa_sfo() max_twa_fomc() max_twa_dfop() max_twa_hs()
Function to calculate maximum time weighted average concentrations from kinetic models fitted with mkinfit
mkin_wide_to_long()
Convert a dataframe with observations over time into long format
mkin_long_to_wide()
Convert a dataframe from long to wide format

Helper functions mainly used internally

mkinpredict()
Produce predictions from a kinetic model using specific parameters
transform_odeparms() backtransform_odeparms()
Functions to transform and backtransform kinetic parameters for fitting
ilr() invilr()
Function to perform isometric log-ratio transformation
logLik(<mkinfit>)
Calculated the log-likelihood of a fitted mkinfit object
residuals(<mkinfit>)
Extract residuals from an mkinfit model
nobs(<mkinfit>)
Number of observations on which an mkinfit object was fitted
mkinresplot()
Function to plot residuals stored in an mkin object
mkinparplot()
Function to plot the confidence intervals obtained using mkinfit
mkinerrplot()
Function to plot squared residuals and the error model for an mkin object
mean_degparms()
Calculate mean degradation parameters for an mmkin row object
create_deg_func()
Create degradation functions for known analytical solutions

Analytical solutions

Parent only model solutions

SFO.solution()
Single First-Order kinetics
FOMC.solution()
First-Order Multi-Compartment kinetics
DFOP.solution()
Double First-Order in Parallel kinetics
SFORB.solution()
Single First-Order Reversible Binding kinetics
HS.solution()
Hockey-Stick kinetics
IORE.solution()
Indeterminate order rate equation kinetics
logistic.solution()
Logistic kinetics

Generate synthetic datasets

add_err()
Add normally distributed errors to simulated kinetic degradation data
sigma_twocomp()
Two-component error model

Deprecated functions

Functions that have been superseded

mkinplot()
Plot the observed data and the fitted model of an mkinfit object