This internal function is called in gfpca_twoStep
, fpca_gauss
and bfpca
to determine the number of functional principal components
based on their share of explained variance.
determine_npc(evalues, npc_criterion)
Integer for the number of fucntional principal components
Vector of estimated variances of the FPC scores.
Either (i) a share between 0 and 1, or (ii) a vector with
two elements for the targeted explained share of variance and a cut-off scree
plot criterion, both between 0 and 1. For the latter, e.g.,
npc_criterion = c(0.9,0.02)
tries to choose a number of FPCs that
explains at least 90% of variation, but only includes FPCs that explain at
least 2% of variation (even if this means 90% explained variation is not reached).