View source: R/mixedcirc_integrate.R
mixedcirc_integrate | R Documentation |
This functions performs circadian rhythm data integration using canonical correlations.
mixedcirc_integrate(
data_input = NULL,
time = NULL,
group = NULL,
id = NULL,
period = 24,
ncomp = 2,
variables = NULL,
lm_method = c("lm", "lme", "nlme")[2],
f_test = c("multcomp_f", "multcomp_chi", "Satterthwaite", "Kenward-Roger")[3],
abs_phase = TRUE,
decompose = FALSE,
center = TRUE,
scale = FALSE,
merge = FALSE,
no_correlation = FALSE,
no_interaction = FALSE,
max.iter = max.iter,
verbose = FALSE,
...
)
data_input |
A named list of numerical matrices or data.frames (N*P) where in the rows are samples (N) and the columns are variables (P). Each element of the list is a data set |
group |
A character vector of length N. If performing differential circadian rhythm analysis, group is a factor, showing grouping of the samples. Analysis of two groups is supported at this stage! See details! |
id |
A vector of length N showing identity of each *unique* sample. See details |
period |
Period of circadian rhythm. Default: 24 |
ncomp |
Number of components. If set to 0, maximum number of possible components will be calculated (default: 2) |
variables |
A named list where in each element (one per data set) is a vector of length ncomp. Each element of the vector must be the number of variables retained on that particular component |
decompose |
decomposes the Within variation in the data set with respect to id (default: FALSE) |
center |
Centers the columns of each data set to zero |
scale |
scale each data set by dividing each column by its standard deviation |
merge |
If TRUE, the groups and the type will be merge in a single matrix for regression (default: FALSE) |
no_correlation |
If TRUE, zero covariance will be set between time and groups (default: FALSE) |
no_interaction |
If TRUE, no interaction between groups and time is assumed. (default FALSE) |
max.iter |
Maximum number of iteration of model (default: 100000) |
verbose |
Show information about different stages of the processes. Default FALSE |
... |
additionl arguments to the regression function |
This method is based on SGCCA analysis
All the data sets will be correlated together with the linearized rhythm and the group
The resulting partial or average scores can be used in mixedcirc_detect
to perform differential circadian rhythm analysis using mixed models
The loadings can be used for example to cluster the corresponding variables across different domains
The scores can be retrieved using mixedcirc_getscore
A class of mixedcirc_integration
.
library(mixedcirc)
data("circa_data")
data_input<-list(a=circa_data$data_matrix[,1:3],b=circa_data$data_matrix[,3:7])
results<-mixedcirc_integrate(data_input,time = circa_data$time,group = circa_data$group,id = circa_data$id)
data_matrix<-mixedcirc_getscore(results,type = "partial",merge = T)
fitted_data<-mixedcirc_detect(data_matrix,time = circa_data$time,group = circa_data$group,id = circa_data$id)
plot(fitted_data[1])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.