Main optimization function for bfpca
. If npc_varExplained
is specified, the function simply returns a list with elements npc
(chosen number of FPCs), evalues
(estimated variances of the first 'npc'
FPCs) and evalues_sum
(sum of the estimated variances of the first 20
FPCs, as approximation of the overall variance).
bfpca_optimization(
npc,
npc_varExplained = NULL,
Kt,
maxiter,
print.iter,
seed,
periodic,
error_thresh,
verbose,
Y,
rows,
I,
knots,
Theta_phi,
xi,
alpha_coefs
)
list with elements t_vec
, Theta_phi_mean
, alpha_coefs
,
efunctions
, evalues
, evalues_sum
, scores
,
subject_coef
, fittedVals
, error
. See documentation of
fpca_gauss
for details.
The number of functional principal components (FPCs)
has to be specified either directly as npc
or based on their explained
share of variance. In the latter case, npc_varExplained
has to be set
to a share between 0 and 1.
The number of functional principal components (FPCs)
has to be specified either directly as npc
or based on their explained
share of variance. In the latter case, npc_varExplained
has to be set
to a share between 0 and 1.
Number of B-spline basis functions used to estimate mean functions
and functional principal components. Default is 8. If npc_varExplained
is used, Kt
is set to 20.
Maximum number of iterations to perform for EM algorithm. Default is 50.
Prints current error and iteration
Set seed for reproducibility. Defaults to 1988.
If TRUE, uses periodic b-spline basis functions. Default is FALSE.
Error threshold to end iterations. Defaults to 0.0001.
Can be set to integers between 0 and 4 to control the level of detail of the printed diagnostic messages. Higher numbers lead to more detailed messages. Defaults to 1.
Internal objects created in
bfpca
.