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 breathttestfit

by

When by is NULL, predictions for the original data values are returned. When by is a positive number, it is used as a step size for a sequence of minutes from 0 to the maximum value of minute in data set.

minute

When a vector is passed, this overrides settings in by, and predictions are calculated at the requested minute values.

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

augment

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]