README.md

POIFD

License

Overview

Software companion for the paper “Integrated Depth for Partially Observed Functiona Data” (Elías, Antonio, Jiménez, Raúl, Paganoni, Anna M. and Sangalli, Laura M., 2020).

It implements the proposed depth measures, functional boxplot and functional outliergram for partially observed functional data.

Installation

#install the package
devtools::install_github("aefdz/POIFD")

#load the package
library(POIFD)

Test usage

#Generate data
sparse_gaussian <- gaussian_PoFD(n=10, p=200, type="sparse", observability=0.5)
common_gaussian <- gaussian_PoFD(n=10, p=200, type="common", observability=0.5)
interval_gaussian <- gaussian_PoFD(n=10, p=200, type="interval", ninterval=3, observability=0.5)

#plot the data sets
plot_sparse <- plot_PoFD(sparse_gaussian$pofd)
plot_interval <- plot_PoFD(interval_gaussian$pofd)
plot_common <- plot_PoFD(common_gaussian$pofd)

plot_sparse 
## Warning: Removed 19 row(s) containing missing values (geom_path).

plot_interval
## Warning: Removed 468 row(s) containing missing values (geom_path).

plot_common
## Warning: Removed 786 row(s) containing missing values (geom_path).

Computing depths

mbd <- POIFD(common_gaussian$pofd, type = "MBD")

(median <- mbd[1])
##         9 
## 0.4299926

Functional Boxplot and magnitude outliers

data(exampleData)

fboxplot <- boxplot_PoFD(exampleData$PoFDextremes_outliers, centralRegion = 0.5, fmag = 1.5, fdom = 1)

fboxplot$magnitude
## 101 102 
## 101 102
fboxplot$domain
## 101 102 
## 101 102
fboxplot$fboxplot
## Warning: Removed 119 row(s) containing missing values (geom_path).

## Warning: Removed 27 row(s) containing missing values (geom_path).

## Warning: Removed 27 row(s) containing missing values (geom_path).

Functional Outliergram and Shape Outliers

outliergram <- outliergram_PoFD(exampleData$PoFDextremes_outliers)

outliergram$shape
## [1] 103 104
outliergram$outliergram
## Warning: Removed 22 row(s) containing missing values (geom_path).

References

Elías, Antonio, Jiménez, Raúl, Paganoni, Anna M. and Sangalli, Laura M. (2020). Integrated Depths for Partially ObservedFunctional Data. (submitted)



aefdz/depthPoFDA documentation built on Jan. 8, 2021, 10:16 p.m.