From 48c463680b51fa767b4cd7bd62865f192d0354ac Mon Sep 17 00:00:00 2001
From: Johannes Ranke Katrin Lindenberger. Contributor.
-
contributed to mkinresplot()
René Lehmann. Contributor. -
+Eurofins Regulatory AG. Copyright holder. -
+error_model
to the mkinfit
function.error_model = "obs"
.error_model = "tc"
.NEWS.md
- Switch to a versioning scheme where the fourth version component indicates development versions
Reintroduce the interface to the current development version of saemix, in particular:
‘saemix_model’ and ‘saemix_data’: Helper functions to set up nonlinear mixed-effects models for mmkin row objects
‘saem’: generic function to fit saemix models using ‘saemix_model’ and ‘saemix_data’, with a generator ‘saem.mmkin’, summary and plot methods
‘confint.mmkin’, ‘nlme.mmkin’, ‘transform_odeparms’: Fix example code in dontrun sections that failed with current defaults
‘logLik.mkinfit’: Improve example code to avoid warnings and show convenient syntax
‘mkinresplot’: Re-add Katrin Lindenberger as coauthor who was accidentally removed long ago
Remove tests relying on non-convergence of the FOMC fit to the FOCUS A dataset as this is platform dependent (revealed by the new additional tests on CRAN, thanks!)
Increase test tolerance for some parameter comparisons that also proved to be platform dependent
‘mkinmod’ models gain arguments ‘name’ and ‘dll_dir’ which, in conjunction with a current version of the ‘inline’ package, make it possible to still use the DLL used for fast ODE solutions with ‘deSolve’ after saving and restoring the ‘mkinmod’ object.
‘mkindsg’ R6 class for groups of ‘mkinds’ datasets with metadata
‘focus_soil_moisture’ FOCUS default soil moisture data
‘update’ method for ‘mmkin’ objects
‘transform_odeparms’, ‘backtransform_odeparms’: Use logit transformation for solitary fractions like the g parameter of the DFOP model, or formation fractions for a pathway to only one target variable
‘plot.mmkin’: Add a ylab argument, making it possible to customize the y axis label of the panels on the left without affecting the residual plots. Reduce legend size and vertical distance between panels
‘plot.mkinfit’: Change default ylab from “Observed” to “Residue”. Pass xlab to residual plot if show_residuals is TRUE.
‘mixed.mmkin’ New container for mmkin objects for plotting with the ‘plot.mixed.mmkin’ method
‘plot.mixed.mmkin’ method used for ‘nlme.mmkin’ and ‘saem.mmkin’, both inheriting from ‘mixed.mmkin’ (currently virtual)
‘plot.mixed.mmkin’ method used for ‘nlme.mmkin’ inheriting from ‘mixed.mmkin’ (currently virtual)
‘plot’, ‘summary’ and ‘print’ methods for ‘nlme.mmkin’ objects
Add the current development version of the saemix package as a second, optional backend for mixed-effects models
DESCRIPTION: Additional_repositories entry pointing to my drat repository on github for a suitable saemix version
‘saemix_model’, ‘saemix_data’: Helper functions to fit nonlinear mixed-effects models for mmkin row objects.
‘saem’ generic function to fit saemix models using ‘saemix_model’ and ‘saemix_data’, with a generator ‘saem.mmkin’, summary and plot methods
‘parms’: Add a method for mmkin objects
‘endpoints’: Back-calculate DT50 value from DT90 also for the biphasic models DFOP, HS and SFORB
Increase tolerance for a platform specific test results on the Solaris test machine on CRAN
Updates and corrections (using the spelling package) to the documentation
Support SFORB with formation fractions
Improve performance by a) avoiding expensive calls in the cost function like merge() and data.frame(), and b) by implementing analytical solutions for SFO-SFO and DFOP-SFO
‘nlme.mmkin’: An nlme method for mmkin row objects and an associated S3 class with print, plot, anova and endpoint methods
‘summary.mkinfit’: Add AIC, BIC and log likelihood to the summary
‘mkinmod’: Use pkgbuild::has_compiler instead of Sys.which(‘gcc’), as the latter will often fail even if Rtools are installed
‘mkinds’: Use roxygen for documenting fields and methods of this R6 class
‘aw’: Generic function for calculating Akaike weights, methods for mkinfit objects and mmkin columns
‘confint.mkinfit’: Make the quadratic approximation the default, as the likelihood profiling takes a lot of time, especially if the fit has more than three parameters
Fix a bug introduced in 0.9.49.6 that occurred if the direct optimisation yielded a higher likelihood than the three-step optimisation in the d_3 algorithm, which caused the fitted parameters of the three-step optimisation to be returned instead of the parameters of the direct optimisation
Add a ‘nobs’ method for mkinfit objects, enabling the default ‘BIC’ method from the stats package. Also, add a ‘BIC’ method for mmkin column objects.
Implement a likelihood ratio test as a method for ‘lrtest’ from the lmtest package
Support summarizing ‘mkinfit’ objects generated with versions < 0.9.49.5
Several algorithms for minimization of the negative log-likelihood for non-constant error models (two-component and variance by variable). In the case the error model is constant variance, least squares is used as this is more stable. The default algorithm ‘d_3’ tries direct minimization and a three-step procedure, and returns the model with the highest likelihood.
Add example datasets obtained from risk assessment reports published by the European Food Safety Agency.
Add the function ‘logLik.mkinfit’ which makes it possible to calculate an AIC for mkinfit objects
‘nafta’: Add evaluations according to the NAFTA guidance
Make the two-component error model stop in cases where it is inadequate to avoid nls crashes on windows
Exclude more example code from testing on CRAN to avoid NOTES from long execution times
‘mkinfit’: Improve fitting the error model for reweight.method = ‘tc’. Add ‘manual’ to possible arguments for ‘weight’
Test that FOCUS_2006_C can be evaluated with DFOP and reweight.method = ‘tc’
‘sigma_twocomp’: Rename ‘sigma_rl’ to ‘sigma_twocomp’ as the Rocke and Lorenzato model assumes lognormal distribution for large y. Correct references to the Rocke and Lorenzato model accordingly.
‘mkinfit’: Use 1.1 as starting value for N parameter of IORE models to obtain convergence in more difficult cases. Show parameter names when ‘trace_parms’ is ‘TRUE’.
Skip some tests on CRAN and winbuilder to avoid timeouts
‘summary.mkinfit’: Show versions of mkin and R used for fitting (not the ones used for the summary) if the fit was generated with mkin >= 0.9.47.1
README.md
, vignettes/mkin.Rmd
: URLs were updated
synthetic_data_for_UBA
: Add the code used to generate the data in the interest of reproducibility
Converted the vignette FOCUS_Z from tex/pdf to markdown/html
DESCRIPTION
: Add ORCID
plot.mkinfit
: Fix scaling of residual plots for the case of separate plots for each observed variable
Documentation updates
test_FOMC_ill-defined.R
as it is too platform dependentRename twa
to max_twa_parent
to avoid conflict with twa
from my pfm
package
Switch from microbenchmark
to rbenchmark
as the former is not supported on all platforms
The number of degrees of freedom is difficult to define in the case of ilr transformation of formation fractions. Now for each source compartment the number of ilr parameters (=number of optimised parameters) is divided by the number of pathways to metabolites (=number of affected data series) which leads to fractional degrees of freedom in some cases.
The default for the initial value for the first state value is now taken from the mean of the observations at time zero, if available.
The kinetic model can alternatively be specified with a shorthand name for parent only degradation models, e.g. SFO
, or DFOP
.
The kinetic model can alternatively be specified with a shorthand name for parent only degradation models, e.g. SFO
, or DFOP
.
Optimisation method, number of model evaluations and time elapsed during optimisation are given in the summary of mkinfit objects.
The maximum number of iterations in the optimisation algorithm can be specified using the argument maxit.modFit
to the mkinfit function.
mkinfit gives a warning when the fit does not converge (does not apply to SANN method). This warning is included in the summary.
The original and the transformed parameters now have different names (e.g. k_parent
and log_k_parent
. They also differ in how many they are when we have formation fractions but no pathway to sink.
The original and the transformed parameters now have different names (e.g. k_parent
and log_k_parent
. They also differ in how many they are when we have formation fractions but no pathway to sink.
The order of some of the information blocks in print.summary.mkinfit.R()
has been ordered in a more logical way.
R/mkinresplot.R: Make it possible to specify xlim
R/endpoints.R, man/endpoints.Rd: Calculate additional (pseudo)-DT50 values for FOMC, DFOP, HS and SFORB. Avoid calculation of formation fractions from rate constants when they are directly fitted
Do not backtransform confidence intervals for formation fractions if more than one compound is formed, as such parameters only define the pathways as a set
Correct ‘isotropic’ into ‘isometric’ for the ilr transformation
Fork the GUI into a separate package gmkin
Add gmkin workspace datasets FOCUS_2006_gmkin and FOCUS_2006_Z_gmkin
Bugfix re-enabling the fixing of any combination of initial values for state variables
Backtransform fixed ODE parameters for the summary
Get rid of the optimisation step in mkinerrmin
- this was unnecessary. Thanks to KinGUII for the inspiration - actually this is equation 6-2 in FOCUS kinetics p. 91 that I had overlooked originally
Fit one or more kinetic models with one or more state variables to one or more datasets
Calculate the AIC for a column of an mmkin object
Print method for mmkin objects