Description Usage Arguments Value Note Author(s) Examples
Plots the results of a sensitivity analysis carried out using sens
.
1 |
sout |
A list of data frames returned from a call to |
by |
Character string, either 'fun' or 'par'. If 'fun', the method
creates one plot for each component of the objective function. If
|
nc |
The number of columns used to arrange multiple plots. This info is
passed to the |
NULL
.
If by='fun'
, the plots can be interpreted as follows:
The value of the objective function called with default values for all parameters is plotted as a dot.
The value of the objective function called with a particular parameter at the lower limit is plotted as a blue whisker line having its origin in the dot.
The value of the objective function called with a particular parameter at the upper limit is plotted as a red whisker line having its origin in the dot.
If by='par'
, the plots can be interpreted as follows:
The normalized value of the objective function called with default values for all parameters is 1.
The normalized value of the objective function called with a particular parameter at the lower limit is plotted as a blue whisker line (having its origin at x=1).
The normalized value of the objective function called with a particular parameter at the upper limit is plotted as a red whisker line (having its origin at x=1).
David Kneis david.kneis@tu-dresden.de
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")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.