tidy.breathtestfit: Broom-style tidying methods for breathtestfit

View source: R/breathtestfit_broom.R

tidy.breathtestfitR 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)

dmenne/breathtestcore documentation built on Feb. 2, 2024, 6:12 p.m.