tidy.breathtestfit {breathtestcore}R Documentation

Broom-style tidying methods for breathtestfit

Description

Broom-method tidy to streamline the results of class breathttestfit as generated by nls_fit or nlme_fit. Returns the fit coefficients and half-emptying time t50 with the Maes/Ghoos method; additional parameters should be extracted with coef.

Usage

## S3 method for class 'breathtestfit'
tidy(x, ...)

Arguments

x

Object of class breathttestfit

...

other parameters passed to methods

Value

A tibble/data frame with columns

patient_id

Patient Id (character)

group

Treatment or patient group (character)

m

Fraction metabolized

k

Time constant (1/minutes)

beta

The so-called lag parameters, no dimension

t50

Emptying half time in minutes as calculated following Maes/Ghoos

See Also

tidy

Examples

library(broom)
# Generate simulated data
data = cleanup_data(simulate_breathtest_data()$data)
# Fit with the population method
fit = nlme_fit(data)
# Output coefficients
tidy(fit)
# All coefficients in the long form
coef(fit)

[Package breathtestcore version 0.8.7 Index]