fpca_gauss_optimization: Internal main optimization for fpca_gauss

Description Usage Arguments Value

View source: R/fpca_gauss.R

Description

Main optimization function for fpca_gauss. 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).

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
fpca_gauss_optimization(
  npc,
  npc_varExplained = NULL,
  Kt,
  maxiter,
  print.iter,
  seed,
  periodic,
  error_thresh,
  verbose,
  Y,
  rows,
  I,
  knots,
  Theta_phi,
  alpha_coefs
)

Arguments

npc

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.

npc_varExplained

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.

Kt

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.

maxiter

Maximum number of iterations to perform for EM algorithm. Default is 50.

print.iter

Prints current error and iteration

seed

Set seed for reproducibility. Defaults to 1988.

periodic

If TRUE, uses periodic b-spline basis functions. Default is FALSE.

error_thresh

Error threshold to end iterations. Defaults to 0.0001.

verbose

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.

Y, rows, I, knots, Theta_phi, alpha_coefs

Internal objects created in fpca_gauss.

Value

list with elements t_vec, Theta_phi_mean, alpha_coefs, efunctions, evalues, evalues_sum, scores, subject_coef, fittedVals, sigma2. See documentation of fpca_gauss for details.


julia-wrobel/registr documentation built on Jan. 16, 2022, 2:51 a.m.