# DoseResp walkthrough

- Author: Tjalling Jager (email: tjalling_at_debtox.info)
- Date: November 2019
- Web support: http://www.debtox.info/byom.html

Step-by-step walk through the code of the doseresp package. This package uses the BYOM engine for classic dose-response analysis, thus also allowing the fancy stuff like fixing some parameters, profile likelihood, Bayesian analysis, confidence intervals on model curves, etc. However, in general, it is a better idea to use TKTD models (GUTS or DEBtox) to analyse toxicity data, as these can accommodate the time aspect.

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). This walk through consists of the following files:

- byom_doseresp.m: an example script for fitting a log-logistic curve to reproduction data (using a normal distribution for the residuals). This is a quick calculation that only shows the basics.
- byom_doseresp_surv.m: an example script for fitting a log-logistic curve to survival data (using the binomial distribution). This example shows a more advanced feature: constructing a confidence interval around the dose-response curve.
- byom_doseresp_propazo.m: an more tricked-out example script that demonstrates how to calculate and plot ECx for a range of x-values, and to include the ECx estimates with their CI in the information boxes of the plot.
- simplefun.m: the actual model; based on the closed form of the cumulative log-logistic distribution.
- call_deri.m: calls simplefun.m to calculate the model output.
- startvals.m: estimation of starting values for ECx and the control response. This function also calculates a relevant range for plotting on log scale.