Creates plots of the model and its variations, for a given variational matrix.

plotVariations(
  df,
  outNames = NULL,
  plotModel = TRUE,
  plotFirst = TRUE,
  plotSecond = TRUE,
  plotIIV = FALSE,
  plotRes = TRUE,
  plotPoints = FALSE
)

Arguments

df

A data frame containing a variational matrix with or without second order derivatives, as produced by calcVariations, calcFirstVariations or calcVariationsFim, that is, with columns 't', 'i', 'y', 'dy_d<v1>' and optionally 'd2y_d<v1>_<v2>', where variables v1 and v2 are replaced by names.

outNames

A vector of strings containing the names of the outputs y_i in order. They are used as labels. If NULL (default), then the index i is used as label.

plotModel

If TRUE (default), the model is plotted, if FALSE then not.

plotFirst

If TRUE (default), the first variations are plotted, if FALSE then not.

plotSecond

If TRUE (default), the second variations are plotted if present, if FALSE then not.

plotIIV

If TRUE, the variations with respect to IIV variables are plotted if present, if FALSE (default) then not. This requires the attribute 'eta' to be present.

plotRes

If TRUE (default), the variations with respect to residual variables are plotted if present, if FALSE then not. This requires the attribute 'eps' to be present.

plotPoints

If FALSE (default), only lines are plotted, if TRUE also plots points.

Value

A plot. In case of error, an error message is printed and the return value is NULL.

See also

Other plotting and printing: plotAliasing(), plotFim(), plotSensitivities(), print.keepattr()

Author

Martijn van Noort