The goal of composits is to find outliers in compositional,
multivariate and univariate time series. It is an outlier ensemble
method that uses the packages forecast
,
tsoutliers
, anomalize
and
otsad
.
You can install the released version of composits from CRAN with:
install.packages("composits")
You can install the development version from GitHub with:
# install.packages("devtools")
::install_github("sevvandi/composits") devtools
library(composits)
set.seed(100)
<- 600
n <- sample(1:100, n, replace=TRUE)
x 320] <- 300
x[<- sample(1:100, n, replace=TRUE)
x2 <- sample(1:100, n, replace=TRUE)
x3 <- cbind.data.frame(x, x2, x3)
X <- sample(1:100, n, replace=TRUE)
x4 <- cbind.data.frame(x, x2, x3, x4)
X <- mv_tsout_ens(X)
out #> Registered S3 method overwritten by 'quantmod':
#> method from
#> as.zoo.data.frame zoo
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
#> Converting from tbl_df to tbl_time.
#> Auto-index message: index = date
#> frequency = 7 days
#> trend = 91 days
$all
out#> Indices Total_Score Num_Coords Num_Methods DOBIN PCA ICA
#> res 320 1.75 3 3 0.3144603 0.728004 0.7075357
#> forecast tsoutliers otsad anomalize
#> res 0.5 0.5 0 0.75
$outliers
out#> Indices Total_Score Num_Coords Num_Methods DOBIN PCA ICA
#> res 320 1.75 3 3 0.3144603 0.728004 0.7075357
#> forecast tsoutliers otsad anomalize
#> res 0.5 0.5 0 0.75
See our website or our paper (Kandanaarachchi et al. 2020) for more examples.