Skip to contents

Model and data

Functions for loading model and data and construct a mathematical model (ODE or stochastic) and corresponding code.

uqsa_example()
Loads an example model for this package
model_from_tsv()
Loads the content from a series of TSV files
as_ode()
Interprets a model as an ODE
as_cme()
Interprets the provided biological reaction model as stochastic
write_and_compile()
Writes code to a file and compiles
values()
Finds the values in a data.frame
uncertainty()
Finds the uncertainty of values in a data.frame
experiments()
Extracts measured data and simulation experiment instructions
standard_error_matrix()
Standard Error Matrix from an errors object
conservation_law_analysis()
Reduces the size of the system
kinetic_law_matrix()
Represents the kinetic laws of the model as a two column matrix
replace_powers()
Interprets caret notation of arithmetic powers for C
stoichiometry()
Returns a list of named stoichiometric vectors
stoichiometric_matrix()
Infers the stoichiometric matrix of a reaction network
unit.from.string()
Interprets a unit string
unit.id()
Converts a unit to a string that works as an identifier
unit_as_character()
Converts a unit data.frame into a printable string
units_from_table()
Finds units column in a data.frame and returns the values
yJacobian()
Calculates the Jacobian of string-math
`c_path<-`()
Adds information about the model's C code
c_path()
Retrieves information about the model's C code
generate_code()
Constructs Code
print(<cme>)
Prints a Summary about the CME model
print(<ode>)
Prints a summary about the ode
shlib()
Compiles C code to shared library
`so_path<-`()
Adds information about compiled code
so_path()
Retrieves information about compiled code
write_c_code()
Writes C code to a file

Simulations

Functions for simulating the model

simulator.c()
Creates a closure that simulates the model
simstoch()
Simulates a Stochastic Model
simfi()
Creates a closure that simulates the model, similar to simulator.c
scrnn()
Returns a closure around gsl_odeiv2_CRNN()
gsl_odeiv2_fi()
Simulates an ode model
gsl_odeiv2_CRNN()
Simulates a CRNN ode model
name_method()
Reverse look-up of method name from key

Prior

Functions for constructing priors

rNormalPrior()
Returns a random vector generator
rUniformPrior()
Returns a random vector generator
rCopulaPrior()
Returns a function that generates random values from the copula model
dNormalPrior()
Creates the density function of a multivariate normal distribution with independent components
dUniformPrior()
Creates a uniform density function
dCopulaPrior()
Creates a prior probability density function
gNormalPrior()
Creates the gradient function of a multivariate normal distribution with independent components, in log-space
fitCopula()
Makes a Probability Density Estimator from a Sample

Uncertainty quantification - likelihood based

MCMC methods for Bayesian parameter inference

mcmc()
Creates a Markov Chain Monte Carlo sampler
mcmc_init()
Initializes the Markov chain
mcmc_mpi()
Creates the MPI version of an MCMC sampler
metropolis_update()
Performs an MCMC update using the Metropolis rule
high_level_metropolis()
Determines a likely Metropolis setup based on the information in the model
smmala_update()
Performs an SMMALA update
high_level_smmala()
Determines a likely SMMALA setup based on the information in the model
logLikelihoodFunc()
Constructs a custom log-likelihood function
ll()
Default log-likelihood function
gllf()
Default gradient-log-likelihood function
fi()
Default Fisher-information function
tune_step_size()
Finds a good step-size for a given MCMC algorithm
loadSample_mpi()
Merges mpi-samples into one
gatherSample()
Collects all sample points, from all files, with the given temperature
gatherReplicas()
Collects statistical Replicas

Uncertainty quantification - ABC

Approximate Bayesian Computation (ABC) MCMC for parameter inference

makeObjective()
Creates objective functions from ingredients
abc_mcmc()
Performs Approximate Bayesian Computation Sampling of Model Parameters via Markov Chain Monte Carlo
ABCSMC()
Performs Approximate Bayesian Computation as a Particle Filter

Global Sensitivity Analysis

gsa_binning()
Performs global sensitivity analysis using the binning method
gsa_saltelli()
Outputs the global sensitivity scores SI and SIT, calculated by the Sobol-Homma-Saltelli method
saltelli_prior()
Creates prior samples for the Sobol-Homma-Saltelli global sensitivity analysis
KLD()
Kullback Leibler Divergence
exact_normal_kld()
Multivariate Normal Distribution KLD

Parameter mappings

Parameter transformations from sampling space back to model space

logParMap()
NATURAL LOG parameter mapping used by the MCMC module
logParMapJac()
NATURAL LOG parameter mapping, jacobian
log10ParMap()
LOG10 parameter mapping used by the MCMC module
log10ParMapJac()
LOG10 parameter mapping, Jacobian
log2ParMap()
LOG2 parameter mapping used by the MCMC module
log2ParMapJac()
LOG2 parameter mapping, Jacobian

Helper Functions and Operators

`%@%`
Fetches an Attribute, with checks
`%as%`
A binary operator on strings with units in them
`%has%`
Checks whether a variable has the named attributes
`%otherwise%`
Specifies default values, as fallback
determinePrefix()
Determines a prefix from a character vector str of similar contents
`modify<-`()
Modifies a value
`base<-`()
Converts values to linear space
column()
Retrieves j-th column with names
print(<experiments>)
Prints the simulation experiments
print(<mcmcVariable>)
Prints information about the mcmc variable
print(<simulation>)
Prints the simulation results
print(<unit_of_measurement>)
Prints an interpretation string of a unit
small()
Reduces the sample to its effective size

Plotting functions

highCor()
Orders index-pairs from high to low correlation
pc_dist()
Plots a sample in parallel coordinates
sensitivity.graph()
Plot the result of global sensitivity analysis
showPosterior()
Makes a pairs plot for a sample using density estimation methods

Internal functions

onlyCoefficients()
Returns a list of reaction coefficients
onlyNames()
Returns only the names in a reaction formula
CRNN()
Creates C code for a chemical reaction neural network
clear_yacas_environment()
Clears Yacas variables
defaultDistance()
Default distance function for one experiment
formulae()
Finds a column that contains some kind of mathematic expression in a data.frame
linear_scale()
Interprets a character vector as names of logarithms
parse_concise()
Reads Concise Error Notation
method()
Finds the method id given a named method
plot(<experiments>)
Plot function for experiments
`[`(<experiments>)
Subsets experiments with preserved class
`[`(<simulation>)
Subset simulations with preserved class