Calculates sensitivity indices, parameter relations and/or the least identifiable parameters for a given variational matrix. This matrix may be parameter- and/or output-normalized.

calcSensitivityFromMatrix(
  outputs,
  df,
  vars = NULL,
  Mthresh = NULL,
  normalizeM = TRUE,
  scaleM = TRUE
)

Arguments

outputs

List of the indices and parameter relations to be determined. List of strings, where each element is one of "N", "S", "A", "R", "M", "L". They stand for null space dimension, skewing coefficient, skewing angle, parameter relations, minimal parameter relations and least identifiable parameters, respectively.

df

Data frame of variations (normalized or not), that is, with columns 't', 'i', 'y' and 'dy_d(varsj)', where variables varsj are replaced by names.

vars

Vector of names of parameters to be included in sensitivity analysis. If NULL (default) or missing, all parameters in df are used.

Mthresh

Threshold for minimal parameter relations. Parameter relations smaller than Mthresh/sqrt(k) (before scaling, see scaleM) are returned, where k is the number of parameters. The factor sqrt(k) makes Mthresh independent of dimension. If NULL (default), only the most minimal relation is returned.

normalizeM

TRUE (default) if the minimal parameter relations should be normalized, FALSE if not. This is not the same as parameter- or output-normalization of the sensitivity matrix. See the details for more information.

scaleM

TRUE (default) if norms of the minimal parameter relations should be scaled to the range 0, 1, FALSE if not. If TRUE, the norms are divided by sqrt(k), where k is the number of parameters. If FALSE they are unchanged.

Value

A list with a named element for each element of 'outputs'. Elements for "N", "S", "A" are numeric values, while elements "R", "M" contain row-named matrices with the parameter relations defined by its columns, and "L" contains a named list with one element for each parameter, in increasing order of identifiability or distance, of the form "parameter name" = "distance of this parameter to the span of the others" in observation space. Distance (near) zero indicates non-identifiability of this parameter. Element M has an attribute "norm" specifying the norms of the minimal parameter relations, where near zero values correspond to non-identifiability, and large values to identifiability. The relations are provided in order of increasing norm (if there is more than one). It also has attributes "normalized" and "scaled" containing the values of the input parameters normalizeM

and scaleM, respectively.

If df or vars is not defined correctly, then the return value is NULL

and an error message is shown. If there is a single parameter in vars, then elements S, A and L are NA.

Details

The sensitivity calculations are based on the sensitivity matrix df = dy/dp, i.e., the derivative of the model output y with respect to the parameters p. Non-trivial vectors in the null space of this matrix indicate directions in which the parameter can be changed (infinitesimally) without changing the model output. A null space of dimension > 0 therefore indicates potential non-identifiability, while a trivial null space implies identifiability.

The skewing coefficient (S) measures the extent to which the parameters are mapped parallel to each other in the observations y. The coefficient can take any non-negative value. A small coefficient indicates that the model is (close to) non-identifiable. For a single parameter the coefficient is by definition equal to 1. A disadvantage is that the value of this indicator depends on the number of parameters.

The skewing angle (A) is a dimensionless version (i.e. independent of the number of parameters) of the skewing coefficient that measures the angle (in radians) between the images of parameter vectors in the space of observations y. A small angle indicates that the model is (close to) non-identifiable. For a single parameter the angle is by definition equal to 1.

Minimal parameter relations (M) are identified as the parameter vector(s) with the smallest image (under the sensitivity matrix or a normalized version of it) in the space of observations. The image is calculated under a normalized version of the sensitivity matrix. This can be used in case of non-identifiability or identifiability (but is most useful near non-identifiability). With normalization (i.e., normalizeM = TRUE), this indicator finds the combination of parameters for which the directions of their images are closest to cancelling each other out, without taking into account the sizes of the image vectors. Without normalization, these sizes are taken into account, and the minimal parameter relation would typically point more towards the parameter that least influences the output. Both variants map the same parameter vectors to 0, if any, so they agree on the distinction between non-identifiability and identifiability, but may differ regarding what is nearly non-identifiable.

Finally, the least identifiable parameter(s) (L) can be identified as the parameters whose image in the space of observations are nearest to the span of the images of the other parameters. The images are calculated under a normalized version of the sensitivity matrix. This can be used in case of non-identifiability or identifiability (but is most useful near non-identifiability).

Author

Martijn van Noort