outlierSIR: Check for outliers in SIR models.

Description Usage Arguments Value References Examples

View source: R/outlierSIR.R

Description

This function takes a matrix X defining the same n individuals and a vector y defining also those individuals.

Usage

1
2
3
outlierSIR(X, y, method = c("BOOT", "TTR", "MONO"), kernel = "normal",
  bandwidth = NULL, H = 5, nb.replications = 1000, pourcent = 0.1,
  plotBandwidthEst = F, NCORES = 1)

Arguments

X

A matrix nxp describinf n observations through p varaibles.

y

A vector of n observations corresponding to the n rows of X.

method

Which method to be performed. One of BOOT for bootstrap, TTR for train-test replication and MONO for mono-model testing.

kernel

The kernel to be used, one of "normal" or "box". Default is "normal". Can be abbreviated. See ksmooth.

bandwidth

A real indicating the width of the kernel. If NULL, automatic kernel width tuning is used. Default is "NULL".

H

A positive real value. The number of slices in the SIR model. Default is 5.

nb.replications

An interger giving the number of repliccations for BOOT and TTR methods. Default is "1000".

pourcent

A real between 0 and 1. The proportion of observations to keep in the test dataset. Default is "0.1".

plotBandwidthEst

An integer. Wether or not to plot the EDR direction with the kernel estimation. Default is "FALSE".

NCORES

An integer. Fiwing the number of cores to be used in the sampling computations. Only BOOT method has been parallelized due to its computation time.

Value

A list containing indices of outliers in the case of the 3 methods and also the extreme observations in the case of BOOT.

References

\insertAllCited

Examples

1
2
3
4
5
6
7
8
9
data(ozone)
# MONO method
output <- outlierSIR(ozone[,-c(1,12,13)],ozone[,1],method="MONO")
# TTR method
# output <- outlierSIR(ozone[,-c(1,12,13)],ozone[,1],method="TTR",
# plotBandwidthEst = FALSE,kernel="normal",nb.replications = 1000)
# BOOT method, using 5 cores of computation
# output <- outlierSIR(ozone[,-c(1,12,13)],ozone[,1],method="BOOT",
# plotBandwidthEst = TRUE,kernel="normal",nb.replications = 5000,NCORES=5)

hlorenzo/outlierSIR documentation built on March 10, 2020, 12:05 a.m.