Last data update: 2014.03.03

R: Summarize an epplabOutlier Object
summary.epplabOutlierR Documentation

Summarize an epplabOutlier Object

Description

Summarizes and prints an epplabOutlier object in an informative way.

Usage

## S3 method for class 'epplabOutlier'
summary(object, ...)

Arguments

object

Object of class epplabOutlier.

...

Additional parameters

Details

The main information provided here is a table with names of the observations which are considered outliers and in how many PP directions they are considered outliers. This function is useful if the data has been given row names.

Author(s)

Klaus Nordhausen

Examples


# creating data with 3 outliers
n <-300 
p <- 10
X <- matrix(rnorm(n*p),ncol=p)
X[1,1] <- 9
X[2,4] <- 7 
X[3,6] <- 8
# giving the data rownames, obs.1, obs.2 and obs.3 are the outliers.
rownames(X) <- paste("obs",1:n,sep=".")

PP<-EPPlab(X,PPalg="PSO",PPindex="KurtosisMax",n.simu=20, maxiter=20)
OUT<-EPPlabOutlier(PP, k = 3, location = median, scale = mad)
summary(OUT)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(REPPlab)
Loading required package: rJava
Loading required package: lattice
Loading required package: LDRTools
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/REPPlab/summary.epplabOutlier.Rd_%03d_medium.png", width=480, height=480)
> ### Name: summary.epplabOutlier
> ### Title: Summarize an epplabOutlier Object
> ### Aliases: summary,epplabOutlier-method summary.epplabOutlier
> ### Keywords: methods print
> 
> ### ** Examples
> 
> 
> # creating data with 3 outliers
> n <-300 
> p <- 10
> X <- matrix(rnorm(n*p),ncol=p)
> X[1,1] <- 9
> X[2,4] <- 7 
> X[3,6] <- 8
> # giving the data rownames, obs.1, obs.2 and obs.3 are the outliers.
> rownames(X) <- paste("obs",1:n,sep=".")
> 
> PP<-EPPlab(X,PPalg="PSO",PPindex="KurtosisMax",n.simu=20, maxiter=20)

Simulation 0... finished (I 4380.838440003 in 0.355s)
Simulation 1... finished (I 3947.966456881 in 0.347s)
Simulation 2... finished (I 3066.681397656 in 0.018s)
Simulation 3... finished (I 4810.995560357 in 0.020s)
Simulation 4... finished (I 4818.555154313 in 0.054s)
Simulation 5... finished (I 3195.234705614 in 0.014s)
Simulation 6... finished (I 4109.620393877 in 0.271s)
Simulation 7... finished (I 3145.538803083 in 0.305s)
Simulation 8... finished (I 3796.406940290 in 0.142s)
Simulation 9... finished (I 2729.765303639 in 0.017s)
Simulation 10... finished (I 5003.875643069 in 0.016s)
Simulation 11... finished (I 3418.202349285 in 0.017s)
Simulation 12... finished (I 3764.619362495 in 0.039s)
Simulation 13... finished (I 2703.114321923 in 0.015s)
Simulation 14... finished (I 3534.341300617 in 0.015s)
Simulation 15... finished (I 4508.414163838 in 0.014s)
Simulation 16... finished (I 3158.838782087 in 0.038s)
Simulation 17... finished (I 5429.782495855 in 0.205s)
Simulation 18... finished (I 3810.877229821 in 0.015s)
Simulation 19... finished (I 2922.422329625 in 0.015s)
Warning message:
In EpplabOutputConv(jepplab, maxiter) :
  There were 20 non-converged simulation runs!
> OUT<-EPPlabOutlier(PP, k = 3, location = median, scale = mad)
> summary(OUT)
REPPlab Outlier Summary
-----------------------
Index name       : KurtosisMax 
Algorithm used   : PSO 
Location used    : median 
Scale used       : mad 
k value used     : 3 
-----------------------

Number of outliers detected:
 8 

Observations considered outliers:                                                                    
OutlierID:  obs.1 obs.2 obs.3 obs.43 obs.191 obs.200 obs.289 obs.290
Frequency:  17    1     4     2      1       2       1       1      
Percentage: 85    5     20    10     5       10      5       5      

> 
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>