% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mfsd.R
\name{mfsd}
\alias{mfsd}
\title{Perform Multivariate Spectral Principal Components Analysis on Spatial Functional Data.}
\usage{
mfsd(
  X,
  freq.res = 100,
  SM_Npc = 3,
  L = 3,
  q = NULL,
  na.ignore = TRUE,
  return.F = FALSE,
  only.filters = FALSE
)
}
\arguments{
\item{X}{a list containing the functional spatial data. Either an fd object or an array.}

\item{freq.res}{the resolution for the computation of the spectral density.}

\item{SM_Npc}{the number of multivariat spatial functional principal components to be computed.}

\item{L}{a list containing the maximum lag for the filters for each variable. An integer or vector of integers.}

\item{q}{a list containing tuning parameter for the estimation of the the spectral density
operator for each variable. An integer or vector of integers.}

\item{na.ignore}{whether to ignore missing data points in the computation of
the scores.}

\item{return.F}{a boolean indicating whether to return the spectral density.}

\item{only.filters}{a boolean indicating whether to compute only the filters,
leaving out the scores.}
}
\value{
A list with components \item{Value}{eigenvalue for each multivariate PC}
  \item{tuning.params}{a list of the used tuning parameters \code{freq.res},
  \code{q} and \code{Lmax}.} \item{filters}{the multivariate SPC filters.}
  \item{scores}{the multivariate SPC scores.} \item{vm}{the theoretical fractions of
  variance explained by each multivariate PC.} \item{ SML_Mean }{the mean of X.}
  \item{ SM_FSD }{list of univariate spatial functional principal component analysis.}
}
\description{
This function performs multivariate PCA on functional spatial data on a grid of
dimension r.
}
\details{
This function can be used to compute spectral PCA. By setting
  \code{q = 0}, it can also be used to perform static MFPCA.

  Setting a higher value for \code{freq.res} increases the runtime   significantly, but yields a more
  accurate result because of reduced integration errors.
}
\examples{
\donttest{
data("X1999")
data("X2000")
data("qlist")
data("Llist")
X = list(X1999, X2000)
q = list(qlist[,17], qlist[,18])
L = list(L1 = Llist[17], L2 = Llist[18])
mfsd(X = X, L = L, q = q, SM_Npc = 4)
}
}
\keyword{mfsd}
