View source: R/mixedcirc_detrend.R
mixedcirc_detrend | R Documentation |
This function removes linear trend from the fitted values of circadian rhythm.
mixedcirc_detrend(fit = NULL, per_group = FALSE, verbose = FALSE, ...)
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 |
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.
A matrix of detrended data
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.