Learn R Programming

fast (version 0.51)

sensitivity_rep: Repeat calculation of sensitivities for lots of data

Description

This function calculates the sensitivity for a series of data, e.g. a time series.

Usage

sensitivity_rep(data, xval, direction, numberf, order=4, legend = paste("P", 1:order, sep = ""), cukier=TRUE)

Arguments

data
Array of data to use of the form todo
xval
Vector to use as x data for plotting
direction
Dimension which contains the todo
numberf
Number of parameters used
order
Order of parameter frequency independence (see Cukier1975)
legend
legend text to plot
cukier
boolean. Indicates wheter to use freq_cukier

Value

  • An array of sensitivities of the form ...

See Also

fast, sensitivity

Examples

Run this code
#The model depends on 4 parameters
#
#It produces a weighted sum of the 4 parameters and returns this sum
#
#The weights depend on an additional parameter x=1:200 
example_model2(p=c(1,3,1,1),fig=TRUE)
example_model2(p=c(1,2,2,3),fig=TRUE)
paras<-fast_parameters(min=c(0,0,0,0),max=c(1,2,2,3))
paras
model_results <- apply(paras, 1, example_model2)
model_results
sensitivity <- sensitivity_rep(data = model_results, xval=1:200, direction = 1, order=4 , numberf=4)
p.sensitivity(sen=sensitivity, xval=1:200, legend=names(paras))

Run the code above in your browser using DataLab