- Notifications
You must be signed in to change notification settings - Fork3
A package and a Shiny web application to create simulated gastric emptying data, and to analyze experimental gastric emptying data using population fit with R and package nlme. Use the Docker image (https://hub.docker.com/u/dmenne) for easy installation. Documentation:
dmenne/gastempt
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
Dieter Menne
Menne Biomed Consulting Tübingen, Germany
https://www.menne-biomed.de
dieter.menne@menne-biomed.de{.email}
A package and aShiny web application to create simulated gastric emptying data, and to analyze gastric emptying from clinical studies using a population fit with R and packagenlme. In addition, Bayesian fits withStan to handle critical cases are implemented.
Part of the work has been supported by section GI MRT, Klinik für Gastroenterologie und Hepatologie, Universitätsspital Zürich; thanks to Werner Schwizer and Andreas Steingötter for their contributions.
The package is available fromCRAN and github (source,documentation). To install, 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):Recommended for gastric emptying curves with an initial volume overshoot from secretion. With parameter kappa > 1, there is a maximum after t=0. When all emptying curves start with a steep drop, this model can be difficult to fit.powexp, vol = v0 * exp(-(t / tempt) ^ beta):The power exponential function introduced by Elashof et. al. to fit scintigraphic emptying data; this type of data does not have an initial overshoot by design. Compared to thelinexpmodel, fittingpowexpis more reliable and rarely fails to converge in the presence of noise and outliers. The power exponential can be useful with MRI data when there is an unusual late phase in emptying.
- Population fits based on function
nlmein package Rnlme. - Stan-based fits, bothwithout andwith covariance estimation. Thanks to priors, fitting with Bayesian methods also works for single records, even if stability strongly improves with more data sets available; seestan_gastempt. Some details can be found inmy blog. The rationale for using Stan to fit non-linear curves is discussedhere for13C breath test data, but is equally valid for gastric emptying data.
- Data can be entered directly from the clipboard copied from Excel, or can be simulated using a Shiny app.
- Several preset simulations are provided in the Shiny app, with different amounts of noise and outliers
- Robustness of models can be tested by manipulating noise quality and between-subject variance.
- Fits are displayed with data.
- The coefficients of the analysis including half-emptying timet50 and the slope at timet50 can be downloaded in .csv format.
Program with simulated data (needs about 10 seconds till plot shows):
library(gastempt)dd = simulate_gastempt(n_records = 6, seed = 471)d = dd$dataret = stan_gastempt(d)print(ret$coef)print(ret$plot)- For Windows 10, you can get the installer from theDocker store. For installation details, seehere.\
- Linux users know how to install Docker anyway.
- From the command line, enter the following to start the container
docker run --name gastempt --restart unless-stopped -p 3838:3838 -d dmenne/gastempt- The first startup needs some time because 1 GB has to be downloaded. Subsequent startups require only a few seconds.
- Connect to the app with your browser via
localhost:3838.
About
A package and a Shiny web application to create simulated gastric emptying data, and to analyze experimental gastric emptying data using population fit with R and package nlme. Use the Docker image (https://hub.docker.com/u/dmenne) for easy installation. Documentation:
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
Packages0
Uh oh!
There was an error while loading.Please reload this page.
Contributors3
Uh oh!
There was an error while loading.Please reload this page.
