Learn R Programming

TwoRegression (version 1.1.1)

Develop and Apply Two-Regression Algorithms

Description

Facilitates development and application of two-regression algorithms for research-grade wearable devices. It provides an easy way for users to access previously-developed algorithms, and also to develop their own. Initial motivation came from Hibbing PR, LaMunion SR, Kaplan AS, & Crouter SE (2018) . However, other algorithms are now supported. Please see the associated references in the package documentation for full details of the algorithms that are supported.

Copy Link

Version

Install

install.packages('TwoRegression')

Monthly Downloads

137

Version

1.1.1

License

GPL-3

Issues

Pull Requests

Stars

Forks

Maintainer

Paul Hibbins

Last Published

November 19th, 2025

Functions in TwoRegression (1.1.1)

raw_to_collapse

Primary accelerometer data to collapse
imu_to_collapse

IMU data to collapse
smooth_2rm

Smooth two-regression estimates over specified periods
hibbing-helpers

Apply a Hibbing 2018 two-regression algorithm
plot.TwoRegression

Create summary plots for TwoRegression objects
get_lm_formula

Convert a linear model to a text representation of the prediction equation
summary.TwoRegression

Summary method for TwoRegression objects
get_cut_point

Develop a cut-point as part of the process for developing a two-regression algorithm
fit_2rm

Develop a two-regression algorithm
TwoRegression-Package

Develop and Apply Two-Regression Algorithms
predict.TwoRegression

Predict metabolic equivalents from a TwoRegression object
directions

Calculate direction changes per five seconds in sliding windows
count_data

Activity count data for demonstrating prior two-regression models
TwoRegression-Function

Apply an existing two-regression model
DualCP_LOSO

Perform leave-one-participant-out-cross-validation on a two-regression algorithm
plot_walkrun

Plot behaviors for visualizing a walk/run cut-point
get_cv

Coefficient of variation for two-regression models
all_data

Two-regression-ready data frame
plotCP

Add a cut-point to a plot
plot_sed

Plot behaviors for visualizing a sedentary cut-point
get_2rm_formula

Convert an object of class TwoRegression to a textual representation of the algorithm
raw_for_cv

Primary accelerometer data to calculate coefficient of variation per 10-s
hibbing-input-validation

Internal functions for the 2RM wrapper
imu_to_check

IMU data to check