Description Usage Arguments Value References Examples
This function computes the three 'DepthGram' representations from a p-variate functional data set.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | depthgram(
Data,
marginal_outliers = FALSE,
boxplot_factor = 1.5,
outliergram_factor = 1.5,
ids = NULL
)
## Default S3 method:
depthgram(
Data,
marginal_outliers = FALSE,
boxplot_factor = 1.5,
outliergram_factor = 1.5,
ids = NULL
)
## S3 method for class 'fData'
depthgram(
Data,
marginal_outliers = FALSE,
boxplot_factor = 1.5,
outliergram_factor = 1.5,
ids = NULL
)
## S3 method for class 'mfData'
depthgram(
Data,
marginal_outliers = FALSE,
boxplot_factor = 1.5,
outliergram_factor = 1.5,
ids = NULL
)
|
Data |
A |
marginal_outliers |
A boolean specifying whether the function should
return shape and amplitude outliers over each dimension. Defaults to
|
boxplot_factor |
A numeric value specifying the inflation factor for
marginal functional boxplots. This is ignored if |
outliergram_factor |
A numeric value specifying the inflation factor for
marginal outliergrams. This is ignored if |
ids |
A character vector specifying labels for individual observations.
Defaults to |
An object of class depthgram
which is a list with the following
items:
mbd.mei.d
: vector MBD of the MEI dimension-wise.
mei.mbd.d
: vector MEI of the MBD dimension-wise.
mbd.mei.t
: vector MBD of the MEI time-wise.
mei.mbd.t
: vector MEI of the MEI time-wise.
mbd.mei.t2
: vector MBD of the MEI time/correlation-wise.
mei.mbd.t2
: vector MEI of the MBD time/correlation-wise.
shp.out.det
: detected shape outliers by dimension.
mag.out.det
: detected magnitude outliers by dimension.
mbd.d
: matrix n x p
of MBD dimension-wise.
mei.d
: matrix n x p
of MEI dimension-wise.
mbd.t
: matrix n x p
of MBD time-wise.
mei.t
: matrix n x p
of MEI time-wise.
mbd.t2
: matrix n x p
of MBD time/correlation-wise
mei.t2
: matrix n x p
of MBD time/correlation-wise.
Aleman-Gomez, Y., Arribas-Gil, A., Desco, M. Elias-Fernandez, A., and Romo, J. (2021). "Depthgram: Visualizing Outliers in High Dimensional Functional Data with application to Task fMRI data exploration".
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | N <- 2e2
P <- 1e3
grid <- seq(0, 1, length.out = P)
Cov <- exp_cov_function(grid, alpha = 0.3, beta = 0.4)
Data <- list()
Data[[1]] <- generate_gauss_fdata(
N,
centerline = sin(2 * pi * grid),
Cov = Cov
)
Data[[2]] <- generate_gauss_fdata(
N,
centerline = sin(2 * pi * grid),
Cov = Cov
)
names <- paste0("id_", 1:nrow(Data[[1]]))
DG1 <- depthgram(Data, marginal_outliers = TRUE, ids = names)
fD <- fData(grid, Data[[1]])
DG2 <- depthgram(fD, marginal_outliers = TRUE, ids = names)
mfD <- mfData(grid, Data)
DG3 <- depthgram(mfD, marginal_outliers = TRUE, ids = names)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.