scaleinvariant: Scale invariant flux sensitivity Analysis

View source: R/toolsPaul.R

scaleinvariantR Documentation

Scale invariant flux sensitivity Analysis

Description

This function performs the scale invariant flux sensitivity analysis for a simulated system. It prints a pdf-file to the working directory for each condition of the system.

Usage

scaleinvariant(
  frame,
  x,
  obstates,
  bestfit,
  time,
  p,
  bound = 0.001,
  figurename = "scaleinvariant",
  timeunit = "h",
  width = 16,
  height = 9,
  linewidth = 2
)

Arguments

frame

Reactionlist of the model

x

Xs function of the Model

obstates

The states under observation whose changes are analysed

bestfit

The parameter values which are used for the simulation

time

Array of observed timepoints

p

P function of the system

bound

Absolute value which a flux sensitive component has to reach at any point in time to be shown in the outputplots

figurename

Name of the saved pdf

timeunit

Unit of the time at the x-axis of the plots

linewidth

Linewidth of the coloured fluxes in the plots

time, width

Dimensions of the plots

Examples

#Scale invariant flux sensitivity Analysis for the SIR-Model with two different values for beta

frame <- NULL
frame <-addReaction(frame, from = "S", to = "I", rate = "beta*S*I")
frame <-addReaction(frame, from = "I", to = "R", rate = "gamma*I")
x <-Xs(odemodel(frame))

obstates = c("S", "I", "R")

par <- getParameters(x)
p <- NULL
for (i in c(0.0026, 0.0027)){
  trafo <- repar("x~x", x=par)
  trafo <- repar("x~y", x = "beta", y= i, trafo)
  parameter <- structure(trafo, names = par)
  p <- p+P(parameter, condition= paste0(i))}


time <- seq(0, 14, length.out=1000)
bestfit <- c(S = 7.637603e+02, I = 6.184001e-01, R = 8.251977e-16, gamma = 4.582934e-01)

scaleinvariant(frame, x, obstates, bestfit, time, p)

dkaschek/dMod documentation built on March 1, 2025, 9:04 p.m.