jgl_fit: Fit jiggle model

Description Usage Arguments Value Examples

View source: R/jgl_fit.R

Description

Multiple exponential regression of OCDR on the "jiggle", i.e. root mean square amplitude of filtered triaxial acceleration.

Usage

1
jgl_fit(prh, n_iter = 100)

Arguments

prh

PRH data frame with ocdr and rms_acc columns

n_iter

Number of iterations to try fitting the non-linear model

Value

PRH data frame with speed column. Adds an attribute, speed_model, a list with elements a, b, c1, c2, c3, and predict_speed. The first five elements are the coefficients of the model and predict_speed is a function that takes an acceleration RMS matrix and returns the predicted speed.

Examples

1
2
3
4
prh_ocdr <- jgl_ocdr(jgl_desc(prh_expl))
acc_filt <- jgl_filtacc(Araw_expl, 10, 90)
prh_rms <- jgl_accrms(prh_ocdr, acc_filt)
prh_spd <- jgl_fit(prh_rms)

FlukeAndFeather/jiggle documentation built on Oct. 30, 2019, 6:18 p.m.