mFPCA | R Documentation |
This function implements the mFPCA.
mFPCA(x_fd, h_fd = NULL, k_weights = "equal", ncom = "ptv", par_ncom = 0.9)
x_fd |
An object of class fd corresponding to the registered functions. |
h_fd |
An object of class fd corresponding to the warping functions. |
k_weights |
The vector of the four constants in the inner product computation. If "equal", the choice of Centofanti et al. (2024) is used. |
ncom |
It is the way to select the number of principal components. If "ptv", it is selected considering the percentage of the total variability explained. If "kaiserrule", it is selected considering the Kaiser rule. The number of principal components may be indicated directly as an integer as well. |
par_ncom |
If |
A list containing the following arguments:
eigfun_fd
A List of functions corresponding to the functional part of the principal components.
eigvect_sc
A matrix corresponding to the scalar part of the principal components.
scores
Scores corresponding to x_fd
and h_fd
.
values
Eigenvalues corresponding to the selected principal components.
varprop
Variance proportion explained by each principal component.
k_weights
The vector of the four constants in the inner product computation.
x_fd_list
A List of two elements: the list of the registered functions and the list of the centered log-ratio transformation of
the first derivatives of the normalized warping functions.
sc_mat
Two column matrix corresponding to the scalar part of the observations used.
mean_fd_list
Mean functions of the functional part.
mean_sc_mat
Means of the scalar part.
sd_fd_list
The standard deviation of the functional part.
sd_sc_mat
Standard deviations of the scalar part.
h_fd
An object of class fd corresponding to the warping functions.
x_fd
An object of class fd corresponding to the registered functions.
ind_var
Additional parameter used in FRTM_PhaseI
.
F. Centofanti
Centofanti, F., A. Lepore, M. Kulahci, and M. P. Spooner (2024). Real-time monitoring of functional data. Accepted for publication in Journal of Quality Technology.
library(funcharts)
data <- simulate_data_FRTM(n_obs = 100)
X <- sapply(1:100, function(ii)
data$x_true[[ii]])
x_fd <-
fda::smooth.basis(y = X,
argvals = data$grid,
fda::create.bspline.basis(c(0, 1), 30))$fd
H <- sapply(1:100, function(ii)
data$h[[ii]])
h_fd <-
fda::smooth.basis(y = H,
argvals = data$grid,
fda::create.bspline.basis(c(0, 1), 30))$fd
mod_mFPCA <- mFPCA(x_fd, h_fd, ncom = "ptv", par_ncom = 0.95)
plot(mod_mFPCA)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.