piecewise_linear_fit: Compute a baseline and piecewise linear fit to data.

Description Usage Arguments Value

View source: R/piecewise_linear_fit.R

Description

piecewise_linear_fit Returns fitted and predicted values of periodically repeating data. This code first subtracts away the residual and does a segmented fit (segmented package)

Usage

1
piecewise_linear_fit(data_in, regression_formula)

Arguments

data_in

a data frame with three columns: date (a POSIX date), time (the decimal time) and the value

regression_formula

a formula for the regression that we are computing for the baseline fit

Value

A list of two things: the fitted values at a 95


jmzobitz/periodicFitting documentation built on July 25, 2021, 8:02 p.m.