mixedcirc_detrend: Removes linear trend from the fitted circadian rhythm

View source: R/mixedcirc_detrend.R

mixedcirc_detrendR Documentation

Removes linear trend from the fitted circadian rhythm

Description

This function removes linear trend from the fitted values of circadian rhythm.

Usage

mixedcirc_detrend(fit = NULL, per_group = FALSE, verbose = FALSE, ...)

Arguments

fit

an object of class mixedcirc_fit or mixedcirc_fit_list

per_group

If TRUE, detrending is performed per group (default: FALSE)

verbose

Show information about different stages of the processes. Default FALSE

...

additionl arguments to the regression function

Details

This method will first calculate the fitted values of the provided model followed by fitting a regression of form x~time. The residues of this regression model will be returned as the detrended data.

Value

A matrix of detrended data

Examples

library(mixedcirc)
data("circa_data")
results<-mixedcirc_detect(data_input = circa_data$data_matrix,
                         time = circa_data$time,group = circa_data$group,id = circa_data$id,period = 24,verbose = TRUE)
detrended<-mixedcirc_detrend(results)



PayamEmami/mixedcirc documentation built on Jan. 15, 2025, 5:36 p.m.