Question: Computing sensitivity from basic reproduction

Please, I am encountering error trying to run these codes for sensitivity analysis using the formula for sensitivity analysis

``

restart;

#
# Set up numerical values for all problem parameters
#
  params:=[ Lambda__p=100,         gamma__B=0.05,      gamma__B=0.05,
                 gamma__C=0.01, omega__C=0.001,  omega__B=0.001,
            sigma__B=0.0001,     sigma__C=0.01, sigma__BC=0.01,
                theta__B=0.8,     theta__C=0.5,      mu__C=1.0,
              Lambda__A=1.0,       Lambda__w=1.0,   varphi__8.33,
            mu__A=1.0, mu__w=1.0, alpha__B=0.005, alpha__C=0.005, alpha__BC=0.15, Zeta__B=0.5, Zeta__C=0.5, delta__A=0.66, delta__w=1.33
          ]:

#
# Define main function
#
  R:= (varphi^2*theta__B*Lambda__p*alpha__B*Lambda__A)/((mu__c*mu__A*N__p^2)*(mu__A*mu__c+mu__A*omega__B+mu__A*sigma__B+mu__c*delta__A+delta__A*omega__B+delta__A*sigma__B));

varphi^2*theta__B*Lambda__p*alpha__B*Lambda__A/(mu__c*mu__A*N__p^2*(mu__A*mu__c+mu__A*omega__B+mu__A*sigma__B+mu__c*delta__A+delta__A*omega__B+delta__A*sigma__B))

(1)

#
# Compute "all" derivatives and evaluate numerically.
#
# For the purposes of this calculation "all"
# derivatives, means the derivatives with respect to
# every variable returned by indets(R, name)
#
# Output a list of two element lists where each of
# the latter is
#
# [ varName,
#   eval( diff( R, varName), params )
# ]
#
 [ seq( [j, eval( diff( R, j), params )],j in indets(R, name))];

Error, invalid input: eval expects its 2nd argument, eqns, to be of type {integer, equation, set(equation)}, but received [Lambda__p = 100, gamma__B = 0.5e-1, gamma__B = 0.5e-1, gamma__C = 0.1e-1, omega__C = 0.1e-2, omega__B = 0.1e-2, sigma__B = 0.1e-3, sigma__C = 0.1e-1, sigma__BC = 0.1e-1, theta__B = .8, theta__C = .5, mu__C = 1.0, Lambda__A = 1.0, Lambda__w = 1.0, 33*varphi__8, mu__A = 1.0, mu__w = 1.0, alpha__B = 0.5e-2, alpha__C = 0.5e-2, alpha__BC = .15, Zeta__B = .5, Zeta__C = .5, delta__A = .66, delta__w = 1.33]

 

#
# Compute all "sensitivities" (where the sensitivity
# is as defined in Rouben Rostamian response to the
# OP's earlier post) and evaluate numerically.
#
# For the purposes of this calculation "all" sensitivities
# means the sensitivity with respect to every variable
# returned by indets(R, name)
#
# Output a list of two element lists where each of
# the latter is
#
# [ varName,
#   eval( varName*diff( R, varName)/R, params )
# ]
#
  seq( [j, eval( j*diff( R, j)/R, params )],j in indets(R, name));

Error, invalid input: eval expects its 2nd argument, eqns, to be of type {integer, equation, set(equation)}, but received [Lambda__p = 100, gamma__B = 0.5e-1, gamma__B = 0.5e-1, gamma__C = 0.1e-1, omega__C = 0.1e-2, omega__B = 0.1e-2, sigma__B = 0.1e-3, sigma__C = 0.1e-1, sigma__BC = 0.1e-1, theta__B = .8, theta__C = .5, mu__C = 1.0, Lambda__A = 1.0, Lambda__w = 1.0, 33*varphi__8, mu__A = 1.0, mu__w = 1.0, alpha__B = 0.5e-2, alpha__C = 0.5e-2, alpha__BC = .15, Zeta__B = .5, Zeta__C = .5, delta__A = .66, delta__w = 1.33]

 

Download Computed_Sensitivity_Analys_for_CBD.mw

Please Wait...