fitmodel {ConconiAnaerobicThresholdTest} | R Documentation |
Fit piecewise linear model
Description
Fit piecewise linear model
Usage
fitmodel(dat, alldata = FALSE, textsize = 5, title = "")
Arguments
dat |
data.frame output by the prepdata() function |
alldata |
If FALSE (default), only the final 5 heart rate measurements of each step are used to fit the changepoint model. If TRUE, all data are used. |
textsize |
size of the breakpoint speed & pace text printed on plot (default: 5) |
title |
title of plot (default: ”) |
Value
creates a plot showing the piecewise fit and breakpoint
Examples
# Note, files in this package are gzipped to save space. TCX files exported
# from Garmin Connect or others will not have the `.gz` extension and you
# should not use `gzfile()`.
fname = system.file(file = "extdata/2023-09-15.tcx.gz", package = "ConconiAnaerobicThresholdTest")
x1 <- prepdata(gzfile(fname), startminutes = 23.8, endminutes = 40.1,
useDeviceSpeed = FALSE)
fitmodel(x1)
[Package ConconiAnaerobicThresholdTest version 1.0.0 Index]