Skip to content
Snippets Groups Projects
Commit a92c549b authored by Otto, Dr. Saskia's avatar Otto, Dr. Saskia
Browse files

update of documentation

parent 48fba174
No related branches found
No related tags found
No related merge requests found
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
\alias{mafa} \alias{mafa}
\title{Min/Max Autocorrelation Factors Analysis (MAFA) in time (or 1D)} \title{Min/Max Autocorrelation Factors Analysis (MAFA) in time (or 1D)}
\usage{ \usage{
mafa(x, time = NULL, nreal = 1000, nmafs = 3, seed = NULL, contr_var = 15) mafa(x, time = NULL, nreal = 1000, nmafs = 3, seed = NULL, contr_var = NULL)
} }
\arguments{ \arguments{
\item{x}{matrix or data frame containing time series of multiple variables.} \item{x}{matrix or data frame containing time series of multiple variables.}
...@@ -20,16 +20,22 @@ mafa(x, time = NULL, nreal = 1000, nmafs = 3, seed = NULL, contr_var = 15) ...@@ -20,16 +20,22 @@ mafa(x, time = NULL, nreal = 1000, nmafs = 3, seed = NULL, contr_var = 15)
\item{contr_var}{integer; the number of variables with highest contribution to show in the loading plots.} \item{contr_var}{integer; the number of variables with highest contribution to show in the loading plots.}
} }
\description{ \description{
This is an example showing how to document functions to be included in the package. Min/Max Autocorrelation Factors Analysis (MAFA) in time (or 1D)
final MAFs were a median profile of the MAFs over all realizations.
} }
\details{ \details{
MAFA is a multivariate statistical method, that allows the set of initial variables to be MAFA is a multivariate statistical method, that allows the set of initial variables to be
decomposed into factors. The autocorrelation of which decreases, or the variogram increases, decomposed into factors. The autocorrelation of which decreases, or the variogram increases,
when going from the first factors to the last ones. Hence the very first factors extract when going from the first factors to the last ones. Hence the very first factors extract
the part of the variables which is the most continuous in time. the part of the variables which is the most continuous in time.
The function for this code is adopted from Wollez et al. 2009 (\url{https://doi.org/10.1051/alr/2009020})
} }
\examples{ \examples{
df <- data.frame(variable1 = 1:20, variable2= rnorm(20, 100, 30), variable3 = 1:20 + rnorm(20))
mafa(x = df, time = 1981:2000)
df <- matrix(rnorm(100), ncol = 5)
colnames(df) <- letters[1:5]
mafa(df)
} }
\seealso{ \seealso{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment