# BYOM package GUTS walkthrough

- Author: Tjalling Jager
- Date: September 2018
- Web support: http://www.debtox.info/byom.html

Step-by-step walk through the code of the GUTS package for the BYOM platform. This walk through is made with the 'publish' option in Matlab, which might also be very convenient to keep track of your work (as a modeller's log book).

The two example files in the standard directory of this package are a good place to start. They use the reduced GUTS model (toxicokinetics and damage dynamics combined in a single one-compartment model). These examples apply the analytical solution for the damage part of the model, which is very fast and allows you to try out the various options without very long waiting times. More complete GUTS models, including options for working with pulsed exposure, can also be found in this package.

This walk-through consists of the following files:

- byom_guts_start.m: an example script to demonstrate GUTS on a straightforward survival data set. This demo shows the profile likelihood for individual parameters and calculation of LC50s.
- byom_guts_extra.m: an example script to demonstrate more elabrate options (especially for confidence intervals). This demo shows the likelihood-region method as well as a Bayesian calculation, and how they can be used to make intervals on various types of plots.
- derivatives.m: the actual model in the form of a system of ordinary differential equations (ODEs).
- simplefun.m: the actual model in the form of a system of explicit functions (e.g., an analytical solution).
- call_deri.m: calls derivatives.m or simplefun.m to calculate the model output. Here, the model output can be transformed to match the data, if needed.
- pathdefine.m: a piece of code that searches for the engine directory, and adds it to the Matlab path. No need to make changes here, just make sure it is in every directory from which you run BYOM scripts.

Some additional examples:

- byom_gutsred_timevar_diazinon.m: an example script to demonstrate how the analytical solution for damage is applied for time-varying exposure.
- byom_guts_slowkin.m: an example script to demonstrate how to use 'slow kinetics' (which can use the analytical solution for damage also with complex exposure profiles).