Learn R Programming

registr (version 1.0.0)

fpca_gauss: Functional principal components analysis via variational EM

Description

Function used in the FPCA step for registering functional data, called by register_fpca when family = "gaussian". Parameters estimated based on probabilistic PCA framework originally introduced by Tipping and Bishop in 1999.

Usage

fpca_gauss(
  Y,
  npc = 1,
  Kt = 8,
  maxiter = 20,
  t_min = NULL,
  t_max = NULL,
  print.iter = FALSE,
  row_obj = NULL,
  seed = 1988,
  ...
)

Value

An object of class fpca containing:

knots

Cutpoints for B-spline basis used to rebuild alpha.

efunctions

\(D \times npc\) matrix of estimated FPC basis functions.

evalues

Estimated variance of the FPC scores.

npc

number of FPCs.

scores

\(I \times npc\) matrix of estimated FPC scores.

alpha

Estimated population-level mean.

mu

Estimated population-level mean. Same value as alpha but included for compatibility with refund.shiny package.

subject_coefs

B-spline basis coefficients used to construct subject-specific means. For use in registr() function.

Yhat

FPC approximation of subject-specific means.

Y

The observed data.

family

gaussian, for compatibility with refund.shiny package.

sigma2

Estimated error variance

Arguments

Y

Dataframe. Should have variables id, value, index.

npc

Defaults to 1. Number of principal components to calculate.

Kt

Number of B-spline basis functions used to estimate mean functions. Default is 8.

maxiter

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

t_min

Minimum value to be evaluated on the time domain.

t_max

Maximum value to be evaluated on the time domain.

print.iter

Prints current error and iteration

row_obj

If NULL, the function cleans the data and calculates row indices. Keep this NULL if you are using standalone register function.

seed

Set seed for reproducibility. Default is 1991.

...

Additional arguments passed to or from other functions

Author

Julia Wrobel jw3134@cumc.columbia.edu, Jeff Goldsmith ajg2202@cumc.columbia.edu

References

Tipping, M. E. and Bishop, C (1999). Probabilistic Principal Component Analysis. Journal of the Royal Statistical Society Series B,, 592--598.