Description Usage Arguments Value Examples
Extract eigen-functions from smoothed correlation matrix which comes from a Gaussian latent model.
1 2 3 4 5 6 7 8 |
X |
a numeric matrix (n x p). It is supplied by user. Here n is the number of samples and p is the number of observations. |
types |
a vector of length p representing the type of each of the p variables in |
argvals |
the argument values of the function evaluations in Y, defaults to a equidistant grid from 0 to 1. |
nbasis |
number of B-spline basis functions used for estimation of the mean function and bivariate smoothing of the covariance surface. |
pve |
proportion of variance explained: used to choose the number of principal components. It should be supplied by users.The default is 0.99. (See |
npc |
the number of principal components.if it is given, this overrides pve; the default is NULL. (See |
A list with the elements
npc |
The number of principal components. If it is given, the given value. Otherwise it is calculated in the function based on given |
eigenfuncs |
A (p x npc) matrix where its colums are eigenfunction extracted from the smoothed correlation matrix. |
1 2 3 4 5 6 7 8 9 10 11 12 | #To see the difference when we have 2 different pve values.
# set.seed(53787)
#Create a matrix from Gaussian latent data
X = gaussian_copula_cor(n = 10, ntime = 30)$Y
#Example 1
output1 = fpcaCor(X = X, types = "con", argvals = NULL, nbasis = 10, pve = 0.99, npc = NULL)
## Change pve value to obtain a different number of eigen-functions.
#Example 2
output2 = fpcaCor(X = X, types = "con", argvals = NULL, nbasis = 10, pve = 0.95, npc = NULL)
#Example 3
#If pnc is supplied by user. (npc overrides pve.)
output3 = fpcaCor(X = X, types = "con", argvals = NULL, nbasis = 10, pve = 0.95, npc = 5)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.