Package 'CircOutlier'

Title: Detection of Outliers in Circular-Circular Regression
Description: Detection of outliers in circular-circular regression models, modifying its and estimating of models parameters.
Authors: Azade Ghazanfarihesari, Majid Sarmad- Ferdowsi University Of Mashhad
Maintainer: Azade Ghazanfarihesari <[email protected]>
License: GPL (>= 2)
Version: 3.2.3
Built: 2024-11-14 06:32:52 UTC
Source: CRAN

Help Index


The simulated 10% and 5% points of the distribution of DMCE.

Description

The data used in here, obtained by using Monte-Carlo simulation method.

Usage

data("DMCE")

Details

A simulation study is carried out to find the percentile (cut-off) point of DMCE by using Monte- Carlo methods. Fifteen different sample sizes are used, namely n = 10, . . . , 150. For each sample size n, a set of random circular errors is generated from the von Mises distribution with mean direction 0 and various values of concentration parameter k = 1, 2, . . . , 100. Samples of von Mises distribution VM(π\pi/4, 10) with corresponding size n are generated to represent the values of X variable. The parameters of model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i (mod 2π\pi) (i=1,2,...,n) are fixed at α\alpha=0 and β\beta=1. Observed values of the response variable y are calculated based on model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i (mod 2π\pi) (i=1,2,...,n) and subsequently the fitted values Y are obtained. We then compute the value of the MCE statistic for full data set. Sequentially, we exclude the ith observation from the generated sample, where i = 1, . . . , n. We refit the reduced data using model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i (mod 2π\pi) (i=1,2,...,n) and then calculate the values of MCe. Then, we obtain the value of DMCE. The process is carried out 2000 times for each combination of sample size n and concentration parameter k.

References

A. H. Abuzaid, A. G. Hussin & I. B. Mohamed (2013) Detecting of outliers in simple circular regression models using the mean circular error statistics.


Detection of Outliers in Circular-Circular Regression

Description

This function calculates the absolute values of the difference between the values of MCE and MCe statistic. Then, it draws the scatter plot of them and estimates the concentration parameter of k. Given the sample size and the estimated value of K, cut-off point from the table DMCE in the significance level of 0.05 or 0.1 will be found. Outliers are locatedon the top of teh line corresponding to the cut-off point.

Usage

DMCEE(x, y, b)

Arguments

x

independent variable on model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i (mod 2π\pi) (i=1,2,...,n)

y

the response variable on model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i (mod 2π\pi) (i=1,2,...,n)

b

the level of significance (0.05 or 0.1)

Details

The ith observation is identified as an outlier if the absolute values of the difference between the values of MCE and MCe statistic exceeds a pre-specified cut-off point.

Author(s)

Azade Ghazanfarihesari, Majid Sarmad

References

A. H. Abuzaid, A. G. Hussin & I. B. Mohamed (2013) Detection of outliers in simple circular regression models using the mean circular error statistics

See Also

circular, CircStats

Examples

data(wind2)
DMCEE(wind2[,1], wind2[,2], .9)

Detecting Outliers in Circular Data and Modifying Its

Description

This function is used to identify outliers in circular data sets. and with do the procedure Huberized on this outliers, the results improve. Huberizing the outliers will improve the results. circular and sd.circular are mean and standard deviation of circular data.

Usage

Huberized(t)

Arguments

t

circular data set which contains suspected outliers.

Details

In this method, we progressively transform the original data by a process called winsorisation. Assume that we have initial estimates called m,s. (These coulde evaluated as mean and standard deviation.) If a value xix_i falls above m+(1.5*s) then we change it to xi=m+(1.5s)x_i=m+(1.5*s). Likewise if a value falls below m-(1.5*s) then we change it to xi=m=(1.5s)x_i=m=(1.5*s). We then calculate an improved estimate of mean as m1=mean.circular(xix_i), and of the standard deviation as s1=1.134*(sd.circular(xix_i)).(The factor 1.134 is derived from the normal distribution, given a value 1.5 for the multiplier most often used in the winsorisation process.) (see the first reference)

Value

Two plot and four number

a list containing the following values:

plot1

plot data set when exist outlier.

plot2

plot data set after modified outlier.

m

mean.circular when exist outlier.

m1

mean.circular after modified outlier.

s

sd.circular when exist outlier.

s1

sd.circular after modified outlier.

Author(s)

Azade Ghazanfarihesari, Majid Sarmad

References

Analytical Methods Committe, Robust statistics: a method coping with outliers, Royal Society of Chemistry 2001, amc technical brief.

A. H. Abuzaid, A. G. Hussin & I. B. Mohamed (2013) Detecting of outliers in simple circular regression models using the mean circular error statistics.

See Also

circular, CircStats

Examples

data(wind)
Huberized(wind)

Detection of Outliers in Circular-circular Regression

Description

Removal of the ith observation from the data set calculate mean circular error for reduced data set

Usage

MCe(u)

Arguments

u

cosine the difference between the observed value of the response variable y and fitted values Y on model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i(mod 2π\pi) (i=1,2,...,n).

Details

This function after removal of the ith observation from the data set.

Value

Number, that is mean circular error after removal of the ith observation from the data set.

Author(s)

Azade Ghazanfarihesari, Majid Sarmad

References

A. H. Abuzaid, A. G. Hussin & I. B. Mohamed (2013) Detection of outliers in simple circular regression models using the mean circular error statistics

See Also

circular, CircStats

Examples

# Generate a data set dependent of circular variables.
library(CircStats)
 x <- rvm(n = 50, 0, 2)
y <- rvm(n = 50, pi/4, 5)
# Fit a circular-circular regression model.
circ.lm <- circ.reg(x, y, order = 1)
Y <- circ.lm$fitted
MCe(cos(y - Y))

Detection of Outliers in Circular-Circular Regression

Description

Mean circular error

Usage

MCE(y,Y,n)

Arguments

y

observed values of the response variable are calculated based on model

yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i(mod 2π\pi) (i=1,2,...,n). here n is sample size. random error

having a VonMises distribution with circular mean 0 and concentration

parameter k.

Y

the estimeted value of y under model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i(mod 2π\pi) (i=1,2,...,n).

n

the sample size

Details

This function may be considered as a type of arithmetic mean which is not robust to the existence of outlier.thus it can be used to detect the possible outliers in the circular regression.

Value

Number, that is mean circular error.

Author(s)

Azade Ghazanfarihesari, Majid Sarmad

References

A. H. Abuzaid, A. G. Hussin & I. B. Mohamed (2013) Detection of outliers in simple circular regression models using the mean circular error statistics.

See Also

circular, CircStats

Examples

#Generate a data set dependent of circular variables.
library(CircStats)
n <- 50
x <- rvm(n = 50, 0, 2)
y <- rvm(n = 50, pi/4, 5)
# Fit a circular-circular regression model.
circ.lm <- circ.reg(x, y, order = 1)
Y <- circ.lm$fitted
MCE(y, Y, n)

Estimates of Parameters in Circular-Circular Regression

Description

This function calculated the maximum-likelihood estimates parameters

Usage

Predict(x, y)

Arguments

x

independent variable on model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i (mod 2π\pi) (i=1,2,...,n)

y

the response variable on model yi=α+βxi+ϵiy_i=\alpha+\beta x_i+\epsilon_i (mod 2π\pi) (i=1,2,...,n)

Details

This function uses of iterative methods for the parameter estimates in circular-circular regression model and The user can default values The desired change.

Value

Number

a list containing the following values:

alpha1

estimate of α\alpha

beta1

estimate of β\beta

.

Author(s)

Azade Ghazanfarihesari, Majid Sarmad

References

A. H. Abuzaid, A. G. Hussin & I. B. Mohamed (2013) Detection of outliers in simple circular regression models using the mean circular error statistics

See Also

circular,CircStats

Examples

# Generate a data set dependent of circular variables.
library(CircStats)
x <- rvm(n = 50, 0, 2)
y <- rvm(n = 50, pi/4, 5)
Predict(x, y)

Wind Direction

Description

The data used in here, obtained after doing some calculations on the data to be recorded of Holderness coastline(the Humberside coast of the North sea, UK).

Usage

data("wind")

References

A. H. Abuzaid, A. G. Hussin & I. B. Mohamed (2013) Detection of outliers in simple circular regression models using the mean circular error statistics.


Wind Direction

Description

The data used in here, recorded over a period of 22.7 days along the Holderness coastline(the Humberside coast of the North sea, UK) by using two different instruments: a high frequency (HF) radar system and an anchored wave buoy.

Usage

data("wind2")

References

A. H. Abuzaid, A. G. Hussin & I. B. Mohamed (2013) Detecting of outliers in simple circular regression models using the mean circular error statistics.