ModelDataComp-package: Model-Data Comparison

Description Details Author(s) See Also


Metrics and plots for model-data comparison. The package provides functions to 1) compute model performance metrics, to 2) multiple fit empirical models or regressions, and to 3) make model-data comparison plots.


Package: ModelDataComp
Type: Package
Version: 1.01
Date: 2015-11-17
License: GPL-2

The package provides basic functions to compare different datasets or to compare models with data.

Model performance metrics: The function ObjFct computes several model performance metrics such as correlations, absolute and squared error metrics, bias metrics, and modelling efficiency metrics. The computed objective functions metrics can be converted to text strings with ObjFct2Text and can be plotted as barplots and scatterplots with plot.ObjFct.

Fit empirical models and regressions: The function MultiFit allows to fit multiple regression approaches between a response variable and one or several predictor variables. Currently considered regression approaches are linear regression, 2-nd and 3-rd order polynomial regression, smoothing splines, generalized additive models, random forest, and logistic functions. The function FitLogistic optimizes parameters of a regression based on additive or multiplicative logistic functions.

Plotting: The package provides several plotting functions to compare model and data. ScatterPlot produces a scatter plot (with points, density lines, or point counts as image) and adds a fitting line based on one or several regression approaches as in MultiFit. ScatterPlot also allows to colour points and to fit regression lines for different groups. The function plot.ObjFct is the plotting routine for ObjFct objects. It allows to plot barplots and scatterplots of objective function metrics for several subsets of the model-data comparison. The function TaylorPlot produces a standard Taylor diagram for model-data comparison and is actually based on the plotrix package. The function WollMilchSauPlot allows to compare distributions (based on smoothed densities), mean values, and the performance or agreement between datasets and models in a single plot. WollMilchSauPlot extends the function pirateplot from the yarrr package by a colour gradient that is based on the performance or agreement of models with data. For example, ny model performance metric from ObjFct can be plotted as colour gradient in the pirateplot.


Matthias Forkel <> [aut, cre]

Maintainer: Matthias Forkel <>

See Also

Search within the ModelDataComp package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.