ASCA_combine_terms.Rd
The function combines two or more terms of the ASCA decomposition
ASCA_combine_terms(asca, comb)
the results of `ASCA_decompose`
a vector of character stings with the names of the terms to combine
a new ASCA decomposition with updated terms and terms derived quantities. The `combined` element keep tracks of the combined factors
## load the data
data("synth_count_data")
## perform the ASCA decomposition
dec_test <- ASCA_decompose(
d = synth_count_data$design,
x = synth_count_data$counts,
f = "time + treatment + time:treatment",
glm_par = list(family = poisson())
)
## combine two terms
comb_terms <- ASCA_combine_terms(dec_test, c("treatment","time:treatment"))
## validate the combined decomposition
comb_test_val <- ASCA_permutation(comb_terms, 10)
#> Permutation # 1
#> Permutation # 2
#> Permutation # 3
#> Permutation # 4
#> Permutation # 5
#> Permutation # 6
#> Permutation # 7
#> Permutation # 8
#> Permutation # 9
#> Permutation # 10