View source: R/coef_breathtestfit.R
coef.breathtestfit | R Documentation |
Function coef
extracts the estimates such as t50,
tlag, from fitted 13C beta exponential models. The result is the same
as fit$coef
, but without
column stat
, which always is "estimate"
for nls_fit
and nlme_fit
.
The summary
method only extracts t50
by the Maes/Ghoos method
## S3 method for class 'breathtestfit'
coef(object, ...)
object |
of class |
... |
other parameters passed to methods |
# Generate simulated data
data = cleanup_data(simulate_breathtest_data())
# Fit with the population method
fit = nlme_fit(data)
# All coefficients in the long form
coef(fit)
# Access coefficients directly
fit$coef
# Only t50 by Maes/Ghoos
# Can also be used with stan fit (slow!)
## Not run:
if (require("breathteststan")) {
fit = stan_fit(data, iter = 300, chain = 1)
coef(fit)
# We get quantiles here in key/value format
unique(fit$coef$stat)
}
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.