sensPlot: Plot results of sensitivity analysis

Description Usage Arguments Value Note Author(s) Examples

Description

Plots the results of a sensitivity analysis carried out using sens.

Usage

1
sensPlot(sout, by = c("fun", "par"), nc = 1)

Arguments

sout

A list of data frames returned from a call to sens.

by

Character string, either 'fun' or 'par'. If 'fun', the method creates one plot for each component of the objective function. If sens was called with a scalar-valued objective function (and thus sout is of length 1) only a single plot is created. If by is set to 'par', one plot is created for every parameter whose influence was tested. This makes sense for vector-valued objective functions only, i.e. if sout is of length > 1.

nc

The number of columns used to arrange multiple plots. This info is passed to the layout function.

Value

NULL.

Note

If by='fun', the plots can be interpreted as follows:

If by='par', the plots can be interpreted as follows:

Author(s)

David Kneis david.kneis@tu-dresden.de

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
# Sensitivity of parameters of a linear model
obs= data.frame(x=c(1,2), y=c(1,2))
model= function(p, x) { p["slope"] * x + p["intercept"] }
objfun= function(p, obs) { c(sse= sum((obs$y - model(p, obs$x))^2),
  mae= sum(abs(obs$y - model(p, obs$x)))) }
p= data.frame(
  name=c("slope","intercept"),
  default= c(1, 0.1),
  min= c(0.5, -1),
  max= c(2, 1)
)
s= sens(fn=objfun, p=p, obs=obs)
sensPlot(s, by="fun")
sensPlot(s, by="par")

dkneis/mcu documentation built on May 15, 2019, 9:12 a.m.