sens.loc: Local sensitivities of a deterministic model

Description Usage Arguments Value Author(s)

View source: R/sens.R

Description

Calculate local sensitivity matrix of a deterministic model (matrix of partial derivatives of model results with respect to parameters), based on a simple discretization of the derivatives.

sens.loc.explicitpars is a modified version of sens.loc which calls a model with explicitly listed arguments (this is primarily for internal use when calling nls).

Usage

1
2
3
sens.loc(par,model,par.inc=0.01*par,...)

sens.loc.explicitpars(par,model.name,par.inc=0.01*par,x)

Arguments

par

named parameter vector

model

function representing the model; typically returns a vector, but could also return a matrix

model.name

function with explicit parameter arguments when using sens.loc.explicitpars

par.inc

increments of parameters used to approximate the derivatives

x

additional parameter arguments when using sens.loc.explicitpars

...

additional arguments passed to model

Value

Matrix of partial derivatives of model results (rows) with respect to parameters (columns), or 3-dimensional array of partial derivatives if model output is a matrix.

Author(s)

Peter Reichert <peter.reichert@eawag.ch>


baccione-eawag/EawagSchoolTools documentation built on Dec. 19, 2021, 6:38 a.m.