Skip to contents

It extracts confidence and prediction bands from the nls model. It is used only for data cleaning.

Usage

predict_bands(
  .data,
  time_column = "t",
  vo2_column = "VO2",
  cleaning_level = 0.95,
  cleaning_baseline_fit = c("linear", "exponential")
)

Arguments

.data

The nornalized data retrieved from normalize_transitions().

time_column

The name (quoted) of the column containing the time. Depending on the language of your system, this column might not be "t". Therefore, you may specify it here. Default to "t".

vo2_column

The name (quoted) of the column containing the absolute oxygen uptake (VO2) data. Default to 'VO2'.

cleaning_level

A numeric scalar between 0 and 1 giving the confidence level for the intervals to be calculated.

cleaning_baseline_fit

A character indicating what kind of fit to perform for each baseline. Either 'linear' or 'exponential'.

Value

a tibble containing the following columns:

x

The provided time data.

y

The provided VO2 data.

.fitted

The predicted response for that observation.

.resid

The residual for a particular point.

lwr_conf

Lower limit of the confidence band.

upr_conf

Upper limit of the confidence band.

lwr_pred

Lower limit of the prediction band.

upr_pred

Upper limit of the prediction band.