Learn R Programming

parafac4microbiome (version 1.1.2)

calcVarExpPerComponent: Calculate the variance explained of a PARAFAC model, per component

Description

Calculate the variance explained of a PARAFAC model, per component

Usage

calcVarExpPerComponent(Fac, X)

Value

Vector of scalars of the percentage of variation explained per component

Arguments

Fac

Fac object output of a model

X

Input dataset

Examples

Run this code
X = array(rnorm(108*100*10), c(108,100,10))
model = parafac(X, 2)
calcVarExpPerComponent(model$Fac, X)

Run the code above in your browser using DataLab