Version log DEBtoxM flavour GUTS Version 1.01 (Date 13/03/2011) - Changed the implementation of background mortality. Now it is done in one place for all calculations (in call_deri.m in the initialisation of M.S). - Added the possibility to use a Weibull factor on mortality. The Weibull mortality is exp(-(h0*t)^FWb). When the Weibull factor FWb is one, the exponential background mortality remains: exp(-ho*t), which implies a constant background hazard rate. - Repaired an error in the plot routine when setting the axis in cases where only control mortality is followed. And an error when plotting markers for disjunct sets of concentrations. - Modified the MCMC posterior calculation in calc_slice.m to also calculate quantiles (2.5 and 97.5%) of the marginal distributions, and the correlation coefficients between the parameters. - Added the file error_ellipse.m which can be used to draw 2-dimensional error ellipses for two parameters from the results of the MCMC analysis. See the file start_calc.m for an example (commented out). - Modified the action of the TYPES.POSTswitch; zero is still off, but otherwise you can enter the number of sample for the MCMC analysis. So TYPES.POSTswitch = 100; means 100 samples to draw. - Small modifications to the screen representations in calc_slice.m and calc_proflik.m. - Modified the intitial parameter estimates in the mydata_diazinon.m file for the combined SD-IT fit to get a better fit (I started from Carlo's best fit). - Modified start_calc.m to recalculate the NEC to an external concentration (calculation would go wrong if the user decides to fit the NEC, PVd or cdK on logscale). - Adapted the mydata files, calc_lik.m and plot_all.m to allow for the weight factors for survival to represent animals removed for analysis (e.g., of body residues) or missing (unknown if they are dead or not). Also allowed NaNs in the survival data. - Plot the NEC as a dotted line in the internal concentration plots. Plot the damage level (when relevant) as a dashed line. Version 1.02 (Date 24/03/2011) - Corrected an error in the plot routine (plot_all.m) for plotting corrected survival data (in case of missing/removed animals). - Modified calc_lik.m and plot_all.m to deal correctly with NaNs in the survival data set (e.g., if not all observations on survival are made at all timepoints for each concentration). However, NaNs in the survival data should not be accompanied by missing/removed animals at the same time and concentration (those missing/removed will not be accounted for in the fit and the plotting). The consistency check will give a warning when this happens. - Modified function ttd2surv.m which recalculates a matrix with time-to-death to survivors. I added the possibility to enter missing/removed animals as negative values. Version 1.03 (Date 28/04/2011) - Repaired an error in start_calc.m in the NEC to be displayed when there is saturation on the uptake, in case there are multiple studies. - Modified calc_spline.m to save the sample from the MCMC routine to a MAT-file with the name of the mydata script, followed by _MC. That way, the sample can be used without redoing the MCMC thing. Modified the call to the calc_slice in start_calc.m ... - The error ellipse is presented in a separate function calc_ellipse.m that can be called from the mydata script (if the slice sample is activated or a relevant MAT file present). - Calculation of confidence intervals on model curves with the new function calc_conf.m which can be called from the mydata file. This requires that the slice sample is activated or a relevant MAT file present. The new function plot_conf.m plots the data and model curve with 95% confidence limits. - Modified calculation of asymptotic standard errors in calc_ase.m to always do the calculation on normal scale, also for parameters that are fitted on log scale (which is just to help the optimisation; it has no relevance for the actual shape of the sampling distribution). - Modified the screen representation of the correlation matrices in calc_ase.m and calc_slice.m. - Modified profile likelihood to always plot in the correct figure window, even when you switch windows during the profiling. - Modified the profile likelihood to save better parameter sets continuously into a file profiles_newopt.out. This means that when the profiles are going to much better values you can break the analysis with ctrl-c and still have the best parameter set up to that point. Better points are always added to the file, the next time you perform a profile! - Modified output to 4 significant digits. - Corrected a "division by zero" warning in plotting survival data (modified the correction for missing/removed animals). Version 1.04 (Date 15/06/2011) - Re-arranged files over the directories "engine" and "utils", for my own convenience. All files in "utils" are now the same for all flavours, which aids version control for me. - For graded endpoints (i.e., body residues), the likelihood function was wrong when using means instead of individual data points. - In calc_lik.m I provide an alternative (commented out) likelihood calculation for graded endpoints that requires a standard deviation for the error around the model estimate. - Repaired a division-by-zero warning when all replicate data points at one time and concentration are NaN. - Don't plot ranges for replicated survival data (because the individual obervations are not of interest). Version 1.05 (Date 02/10/2011) - Modified the units structure to match the other flavours. Note that in all your mydata files, units must be specified as: TYPES.units = {'mg/L' 'd' 'cm' 'mg/kg'}. The body size unit is needed for consistency with the other flavours. - I made more files common to all flavours, and included a new directory "common" to collect the engine files that are common. The pathdefine.m is adapted to include the new directory into the search path automatically. - Corrected the PlotoverSwitch so that it works with more than one type of endpoints (all observations and model predictions for an endpoint are collected in one graph). - Changed the splining of the external concentration; start_calc now prepares a structure to be read with ppval in the derivatives, which is much faster. Furthermore, I now allow effects data to have different concentrations than specified in the external concentration data set (I inter- or extrapolate the missing concentrations, using the given concentration vector C, so that one needs to be relevant, e.g., nominal, concentrations). - Modified the plot_all.m routine: moved more code to subfunctions. This makes it easier to modify the plots for all endpoints in one go. Also improved legends. - Added the possibility to use different assumptions for the scatter structure (for graded endpoints), including a fixed error variance per data set (as second argument of lam). If not specified, defaukt is optimising the error variance for each data set seperately. - Added the possibility to assume first-order degradation for the external concentrations, and even fit a degradation rate constant on measured concentration in the exposure medium. - Fixed an error for plotting the iso-effect line for EC0 when body residues are given. Version 1.06 (Date 19/05/2012) - Changed the use of units. Instead of compound units such as mg/L and mg/kg, I now only use the single units for chemical mass, environment volume/weight, time, body length and body weight. Previous mydata files may give an error due to this change, so adapt the units to the new style. - Added units in profile likelihoods and marginal posterior densities. - Added the possibility to use the log-logistic instead of the lognormal for IT (in call_deri.m there is now a switch). The lognormal requires the statistics toolbox while the log-logistic does not (the CDF can be written in closed form). - Corrected an error message in start_calc.m when using multiple studies. - For continuous data, there was an error in the implementation of the likelihood function in transfer.m, which affected the weighting of data when fitting on means of replicates. Version 1.07 (Date 17/04/2015) - Corrected a silly error that prevented the calculation of standard errors to start when using multiple studies with a lot of common parameters. - For continuous data only: added the possibility to plot error bars as range, s.d., s.e. or 1.96 x s.e. (conf. interval) with a switch in plot_all. This can produce counter-intuitive effects when scaling the data (s.d.,s.e., and conf. interval are calculated on transformed data). Also added the possibility to shift data slightly so error bars don't overlap. - Adapted axis limits to suit error bars tightly. - Corrected an error in the use of zero-variate data with multiple studies. - Changed the calculation of fixed-tail CIs (quantiles) from the slice sample. Instead of using the sample, I now use the kernel-density estimate, which performs better for small samples. - Also allow credible intervals on fitted external concentrations. Version 1.07b (Date 06/05/2015) - The mydata files state that the log-normal distribution is the standard for IT and mixed GUTS models, but the switch was set to log-logistic in call_deri. Note that the log-normal requires the statistics toolbox, so if you do not have that one, use the log-logistic instead.