# MedStat Stutter

## Phantasies of a physicist fallen among physicians

### Importing SQLite data into Excel 2013

February 5, 2020, 5:13 pm

You can find many posts how to access an SQLite database from Excel. Often, the method uses VBA, or some older version of Excel, and I could not get things to work with my settings:

• Windows 10, 64 bit
• Virus Norton 360 premier
• Office 2013, 32 bit. Even Microsoft recommends to use the 32-bit ver...

Continue Reading...

### Regression Mysteries

January 16, 2020, 5:35 pm

# Regression Mysteries

Dieter Menne 15 Juli 2017

In the paper by Hoad et al. (2015), two different methods to measure gastric content volume (GCV) were compared, by MRI and by gamma scintigraphy. A regression line was computed which is the best prediction of GCV(MRI) given GCV(Scintigraphy). The s...

Continue Reading...

### Multiple indexing with Stan

January 15, 2020, 8:00 pm

## Summary

Using vectors for indexed access to ragged arrays in Stan

volume ~ normal(
v0[record] .* (1+ kappa[record] .* (minute ./ tempt[record])) .*
exp(-minute ./ tempt[record]), sigma);

## Fitting gastric emptying time series

Gastric volume times serie measured by MRI techniques can have an initial volume overshoot due to secretion. To estimate half-times and the degree of overshoot, the author of this blog has introduced the linexp function [@Fruehauf2011] with three parameters to complement the power exponential function used in earlier research [@Elashoff1982, @Elashoff1983b] with scintigraphic data.

linexp:

v = v0* (1+t*kappa/tempt)*exp(-t/t_{empt})

Continue Reading...

### 13C Breath test: Population Fit and Bayesian Models

January 15, 2020, 7:10 pm

## Summary

Time series from 13C breath test recordings are used as a surrogate indicator for gastric emptying. Gastric emptying half time t50 is computed by fitting the series with an exponential beta or a Gamma function. Often, records are too short to obtain stable estimates of the trailing par...

Continue Reading...

### Box-Cox Transformations for linexp fits

January 15, 2020, 7:09 pm

The coefficients of linexp fits to gastric emptying curves are generally used in mixed-models to analyze group and meal difference. The distribution of the extracted parameters is often highly skewed, so before using linear models or estimates of reference ranges with functions in package referenceInterval or Hmisc, a transformation might be required.

From a large corpus of gastric emptying curves analyzed with nonlinear fits of the linexp function, the following recommendations for transformation were obtained using the boxcox and the logtrans function in package MASS:

Continue Reading...