This function is designed to perform the term-wise decomposition by R base `prcomp`

ASCA_svd(decomposition, ...)

Arguments

decomposition

the decomposition list produced by `ASCA_decompose`.

...

additional parameters to be passed to `prcomp`

Value

a list with the results of the SVD decomposition for each term. Each element is the output of a `prcomp` call.

Examples

## 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())
)

## Run the SVD of the terms
svd_test <- ASCA_svd(dec_test$decomposition)