| augment.breathtestfit {breathtestcore} | R Documentation |
Augmented prediction for breathtest fit
Description
Broom method augment to compute predicted values
from the results of class breathttestfit as generated by
nls_fit or nlme_fit.
Usage
## S3 method for class 'breathtestfit'
augment(x, by = NULL, minute = NULL, dose = 100, ...)
Arguments
x |
Object of class |
by |
When |
minute |
When a vector is passed, this overrides settings in |
dose |
13C acetate or octanoate dose |
... |
other parameters passed to methods |
Value
When by is NULL, returns one row for each
original observation pdr, and column fitted. If new data are given,
i.e. when one of parameter by or minute is not null,
only column fitted is added.
See Also
Examples
library(broom)
# Generate simulated data
data = cleanup_data(simulate_breathtest_data(n_records = 3)$data)
# Fit using the curves individually
fit = nls_fit(data)
# Predict values at t=60 and t=120
augment(fit, minute = c(60, 120))
[Package breathtestcore version 0.8.7 Index]