Dieter Menne
Menne Biomed Consulting Tübingen, Germany
https://www.menne-biomed.de
dieter.menne@menne-biomed.de
A package and aShiny webapplication to create simulated gastric emptying data, and to analyzegastric emptying from clinical studies using a population fit with R andpackagenlme. In addition, Bayesian fits withStan to handle critical cases areimplemented.
Part of the work has been supported by section GI MRT, Klinik fürGastroenterologie und Hepatologie, Universitätsspital Zürich; thanks toWerner Schwizer and Andreas Steingötter for their contributions.
The package is available fromCRAN and github(source,documentation). Toinstall, use:
devtools::install_github("dmenne/gastempt")Compilation of the Stan models needs several minutes.
The web interface can be installed on your computer, or run asweb app.
Twomodels are implemented in the web interface
linexp, vol = v0 * (1 + kappa * t / tempt) * exp(-t / tempt):Recommendedfor gastric emptying curves with an initial volume overshoot fromsecretion. With parameter kappa > 1, there is a maximum after t=0.When all emptying curves start with a steep drop, this model can bedifficult to fit.powexp, vol = v0 * exp(-(t / tempt) ^ beta): The powerexponential function introduced by Elashof et. al. to fit scintigraphicemptying data; this type of data does not have an initial overshoot bydesign. Compared to thelinexp model, fittingpowexp is more reliable and rarely fails to converge in thepresence of noise and outliers. The power exponential can be useful withMRI data when there is an unusual late phase in emptying.nlme in package Rnlme.Program with simulated data (needs about 40 seconds till plotshows):
library(gastempt)dd = simulate_gastempt(n_records = 6, seed = 471)d = dd$dataret = stan_gastempt(d)print(ret$coef)print(ret$plot)
gastemptdocker run --name gastempt --restart unless-stopped -p 3838:3838 -d dmenne/gastemptlocalhost:3838.