From 9a1e685a636f7632fc77c7375f9d42735be2decc Mon Sep 17 00:00:00 2001
From: Johannes Ranke The R add-on package gmkin provides a browser based graphical interface for performing kinetic evaluations of degradation data using the mkin package. While the use of gmkin should be largely self-explanatory, this manual may serve as a functionality overview and reference. For system requirements and installation instructions, please refer to the gmkin homepage. The R add-on package gmkin provides a browser based graphical interface for performing kinetic evaluations of degradation data using the mkin package. While the use of gmkin should be largely self-explanatory, this manual may serve as a functionality overview and reference. For system requirements and installation instructions, please refer to the gmkin homepage. The parameters “atol” and “rtol” are only effective if the solution type is “deSolve”. They control the precision of the iterative numerical solution of the differential equation model. The checkboxes “transform_rates” and “transform_fractions” control if the parameters are fitted as defined in the model, or if they are internally transformed during the fitting process in order to improve the estimation of standard errors and confidence intervals which are based on a linear approximation at the optimum found by the fitting algorithm. If fitting with transformed fractions leads to a suboptimal fit, doing a first run without transforming fractions may help. A final run using the optimised parameters from the previous run as starting values (see comment on “Get initials from” above) can then be performed with transformed fractions. The dropdown box “weight” specifies if and how the observed values should be weighted in the fitting process. If “manual” is chosen, the values in the “err” column of the dataset are used, which are set to unity by default. Setting these to higher values gives lower weight and vice versa. If “none” is chosen, observed values are not weighted. Please refer to the documentation of the If the “IRLS” option is set to “obs”, then we make use of iteratively reweighted least squares fitting. Please refer to the The drop down box “method.modFit” makes it possible to choose between the optimisation algorithms “Port” (the default in mkin versions > 0.9-33, a local optimisation algorithm using a model/trust region approach), “Marq” (the former default in mkin, a Levenberg-Marquardt variant from the R package Finally, the maximum number of iterations for the optimisation can be adapted using the “maxit.modFit” field. If the “error_model” option is set to “obs” or “tc”, then a suitable “error_model_algorithm” has to be selected. The recommended algorithm for these error model is “d_3”, which is the one selected by “mkin” for there error models. Please refer to the The maximum number of iterations for the optimisation can be adapted using the “maxit” field. On systems running the Windows operating system, the windows metafile (wmf) format can be additionally chosen. Changing the file format for plotting will also change the extension of the proposed filename for saving the plot. On systems running the Windows operating system, the enhanced metafile (emf) format can be additionally chosen. Changing the file format for plotting will also change the extension of the proposed filename for saving the plot. In many cases the starting parameters and the fit options do not need to be modified and the model fitting process can simply be started by pressing the “Run fit” button. In the R console, the progressive reduction in the model cost can be monitored and will be displayed in the following way: If plotting of the fitting progress was selected, a new separate graphics window should either pop up, or a graphics window previously started for this purpose will be reused. If your screen size allows for it, you can arrange the R plotting window and the R console in a way that you can see everything at the same time: For running gmkin you need a system running a recent version of R (version 3.1.0 or later), the gWidgesWWW2 package, the gmkin package and a web browser (Firefox/Iceweasel and Chrome work for me) with JavaScript enabled. It should be possible to run gmkin on most laptop or desktop computers running Linux, Mac OS X, Windows XP or Windows 7. It is frequently checked under Linux and Windows 7. It should be possible to run gmkin on most laptop or desktop computers running Linux, Mac OS X, Windows 7 or Windows 10. To view the complete set of widgets in the browser window without resizing anything, it needs a screen space of 1366x740 pixels. Financial support, feedback and suggestions by the German Federal Environmental Agency (Umweltbundesamt) in two projects in 2014 and 2015 was crucial for reaching version 0.6.3 in November 2015 and is gratefully acknowledged. In particular, Stefan Meinecke contributed with a lot of user feedback and suggestions for improvement in that time. The adaptation to mkin versions > 0.9.49.6 that can do fits using a two-component error model was supported by another project by the Umweltbundesamt in 2018/2019. This function starts a browser based GUI. Please visit the
- github page of gWidgetsWWW2
- for an explanation how this toolkit works. During development, a script name with a local working version
- of gmkin can be passed. Defaults to the location of the gmkin.R script
- shipped with the package. During development, a script name with a local working
+version of gmkin can be passed. Defaults to the location of the gmkin.R
+script shipped with the package. During development, it may be useful to see the log of the Rook apps. During development, it may be useful to see the log of the
+Rook apps. The function is called for its side effect, namely starting the GUI in a browser.
- For the curious, the desperate or the adventurous, the gmkin app (a GWidgetsApp object) is returned. The function is called for its side effect, namely starting the GUI
+ in a browser. For the curious, the desperate or the adventurous, the gmkin
+ app (a GWidgetsApp object) is returned.Manual for gmkin
Johannes Ranke
- 2019-03-14
+ 2019-07-09
gmkin_manual.Rmd
Introduction
-
@@ -216,10 +216,8 @@
modFit
function from the FME
package for the meaning of options “std” and “mean”.mkinfit
documentation for more details. IRLS fitting can be configured using the options “reweight.tol” and “reweight.max.iter”.minpack.lm
), and “SANN” (the simulated annealing method - robust but inefficient and without a convergence criterion).mkinfit
documentation for more details. IRLS fitting can be configured using the options “reweight.tol” and “reweight.max.iter”.
@@ -228,7 +226,7 @@
@@ -242,23 +240,21 @@
Fitting the model
Model cost at call 1 : 15156.12
-Model cost at call 3 : 15156.12
-Model cost at call 7 : 14220.79
-Model cost at call 8 : 14220.79
-Model cost at call 11 : 14220.79
-Model cost at call 12 : 3349.268
-Model cost at call 15 : 3349.268
-Model cost at call 17 : 788.6367
-Model cost at call 18 : 788.6366
-Model cost at call 22 : 374.0575
-Model cost at call 23 : 374.0575
-Model cost at call 27 : 371.2135
-Model cost at call 28 : 371.2135
-Model cost at call 32 : 371.2134
-Model cost at call 36 : 371.2134
-Model cost at call 37 : 371.2134
-Optimisation by method Port successfully terminated.
> Ordinary least squares optimisation
+Sum of squared residuals at call 1: 2388.077
+Sum of squared residuals at call 3: 2388.077
+Sum of squared residuals at call 4: 247.1962
+Sum of squared residuals at call 7: 200.6791
+Sum of squared residuals at call 10: 197.7231
+Sum of squared residuals at call 11: 197.0872
+Sum of squared residuals at call 14: 196.535
+Sum of squared residuals at call 15: 196.535
+Sum of squared residuals at call 16: 196.535
+Sum of squared residuals at call 17: 196.5334
+Sum of squared residuals at call 20: 196.5334
+Sum of squared residuals at call 25: 196.5334
+Negative log-likelihood at call 31: 26.64668
+Optimisation successfully terminated.
System requirements
@@ -159,6 +159,7 @@
Acknowledgements
script_name
-
+
show.log
-
+ Value
- Examples
-
@@ -185,7 +167,7 @@
diff --git a/docs/reference/gmkinws.html b/docs/reference/gmkinws.html
index d2f667f..4a264e9 100644
--- a/docs/reference/gmkinws.html
+++ b/docs/reference/gmkinws.html
@@ -63,7 +63,7 @@
@@ -157,7 +157,7 @@ by the names used in the models contained in field m