fpcaBasis function

Calculate a functional principal component basis representation for functional data on one-dimensional domains

Calculate a functional principal component basis representation for functional data on one-dimensional domains

This function calculates a functional principal component basis representation for functional data on one-dimensional domains. The FPCA is calculated via the PACE function, which is built on fpca.sc in the refund package.

fpcaBasis( funDataObject, nbasis = 10, pve = 0.99, npc = NULL, makePD = FALSE, cov.weight.type = "none" )

Arguments

  • funDataObject: An object of class funData

    containing the observed functional data samples and for which the FPCA is to be calculated.

  • nbasis: An integer, representing the number of B-spline basis functions used for estimation of the mean function and bivariate smoothing of the covariance surface. Defaults to 10 (cf. fpca.sc in refund ).

  • pve: A numeric value between 0 and 1, the proportion of variance explained: used to choose the number of principal components. Defaults to 0.99 (cf. fpca.sc in refund ).

  • npc: An integer, giving a prespecified value for the number of principal components. Defaults to NULL. If given, this overrides pve (cf. fpca.sc in refund ).

  • makePD: Logical: should positive definiteness be enforced for the covariance surface estimate? Defaults to FALSE (cf. fpca.sc in refund ).

  • cov.weight.type: The type of weighting used for the smooth covariance estimate in PACE. Defaults to "none", i.e. no weighting. Alternatively, "counts" (corresponds to fpca.sc in refund ) weights the pointwise estimates of the covariance function by the number of observation points.

Returns

  • scores: A matrix of scores (coefficients) with dimension N x K, reflecting the weights for each principal component in each observation, where N is the number of observations in funDataObject and K is the number of functional principal components. - ortho: Logical, set to TRUE, as basis functions are orthonormal. - functions: A functional data object, representing the functional principal component basis functions. - meanFunction: The smoothed mean function.

See Also

univDecomp, PACE