# Multi-variate data

Multi-variate data has one or more independent variables and more than one dependent ones. Think, for instance, of weight-at-time for females and males. The concept that predictions for the various data are coupled by sharing parameters is key to DEB theory as well as to multi-variate data.
Uni-, bi- and tri-variate
variables have one, two or three **independent** variables.
More independent variables can be included via auxiliary data.

Since AmP deals with an arbitrary number of data sets, and a collection of uni-variate data sets can have the same independent variable
and presented in a grouped plot, there is no need, other than convenience, to deal with multi-variate data with several **dependent** variables explicitly.
To present a set of uni-variate data in a grouped plot, they all must have the same units and labels.
To produce a grouped plot, the metaData as defined in a mydata-file needs to have field `metaData.grp.sets`

and, optionally,
fields `metaData.grp.title`

and `metaData.grp.subtitle`

.
A title becomes part of the produced png-file, a subtitle not and is only shown in the modal-presentation of the plot (i.e. after clicking on it).
An example of a grouped plot is given in the dog-entry.
Bi- and tri-variate data sets do not need a grouped-plot definition;
it is not possible to combine such data sets with other data sets in a grouped plot.

Yet it can be handy to specify a multi-variate data set as a matrix where the first column is treated as the independent variable and the others are dependent ones.
The specification in AmP follows the rules of those for bi-variate data, where the first element of `auxData.treat`

is 0 or 1.
See further under bi-variate data.

If a data-matrix has 3 columns, i.e. 1 independent variable and 2 dependent ones, and if the units as well as the label for that data set is a cell-string of length 3, a plot is created with 2 different y-axes. The first element of treat must then be 0 or 1, not 2, and no legend is produced. All that relates to the left yaxis is plotted in red, to the right in blue. An example of a plot with two different y-axes is given in the entries Vipera_aspis and, Sialia_mexicana (first element of treat is 1).