PEdom.num.binom.test1Dint: A test of uniformity for 1D data based on domination number...

View source: R/PropEdge1D.R

PEdom.num.binom.test1DintR Documentation

A test of uniformity for 1D data based on domination number of Proportional Edge Proximity Catch Digraph (PE-PCD) - Binomial Approximation

Description

An object of class "htest" (i.e., hypothesis test) function which performs a hypothesis test of uniformity of Xp points in the support interval (a,b)).

The support interval (a,b) is partitioned as (b-a)*(0:nint)/nint where nint=round(sqrt(nx),0) and nx is number of Xp points, and the test is for testing the uniformity of Xp points in the interval (a,b).

The null hypothesis is uniformity of Xp points on (a,b). The alternative is deviation of distribution of Xp points from uniformity. The test is based on the (asymptotic) binomial distribution of the domination number of PE-PCD for uniform 1D data in the partition intervals based on partition of (a,b).

The function yields the test statistic, p-value for the corresponding alternative, the confidence interval, estimate and null value for the parameter of interest (which is Pr(domination number\le 1)), and method and name of the data set used.

Under the null hypothesis of uniformity of Xp points in the support interval, probability of success (i.e., Pr(domination number\le 1)) equals to its expected value) and alternative could be two-sided, or left-sided (i.e., data is accumulated around the end points of the partition intervals of the support) or right-sided (i.e., data is accumulated around the centers of the partition intervals).

PE proximity region is constructed with the expansion parameter r \ge 1 and centrality parameter c which yields M-vertex regions. More precisely M_c=a+c(b-a) for the centrality parameter c and for a given c \in (0,1), the expansion parameter r is taken to be 1/\max(c,1-c) which yields non-degenerate asymptotic distribution of the domination number.

The test statistic is based on the binomial distribution, when success is defined as domination number being less than or equal to 1 in the one interval case (i.e., number of failures is equal to number of times restricted domination number = 1 in the intervals). That is, the test statistic is based on the domination number for Xp points inside the partition intervals for the PE-PCD. For this approach to work, Xp must be large for each partition interval, but 5 or more per partition interval seems to work in practice.

Probability of success is chosen in the following way for various parameter choices. asy.bin is a logical argument for the use of asymptotic probability of success for the binomial distribution, default is asy.bin=FALSE. When asy.bin=TRUE, asymptotic probability of success for the binomial distribution is used. When asy.bin=FALSE, the finite sample probability of success for the binomial distribution is used with number of trials equals to expected number of Xp points per partition interval.

Usage

PEdom.num.binom.test1Dint(
  Xp,
  support.int,
  c = 0.5,
  asy.bin = FALSE,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95
)

Arguments

Xp

A set of 1D points which constitute the vertices of the PE-PCD.

support.int

Support interval (a,b) with a<b. Uniformity of Xp points in this interval is tested.

c

A positive real number which serves as the centrality parameter in PE proximity region; must be in (0,1) (default c=.5).

asy.bin

A logical argument for the use of asymptotic probability of success for the binomial distribution, default asy.bin=FALSE. When asy.bin=TRUE, asymptotic probability of success for the binomial distribution is used. When asy.bin=FALSE, the finite sample asymptotic probability of success for the binomial distribution is used with number of trials equals to expected number of Xp points per partition interval.

alternative

Type of the alternative hypothesis in the test, one of "two.sided", "less", "greater".

conf.level

Level of the confidence interval, default is 0.95, for the probability of success (i.e., Pr(domination number\le 1) for PE-PCD whose vertices are the 1D data set Xp.

Value

A list with the elements

statistic

Test statistic

p.value

The p-value for the hypothesis test for the corresponding alternative

conf.int

Confidence interval for Pr(domination number\le 1) at the given level conf.level and depends on the type of alternative.

estimate

A vector with two entries: first is is the estimate of the parameter, i.e., Pr(domination number\le 1) and second is the domination number

null.value

Hypothesized value for the parameter, i.e., the null value for Pr(domination number\le 1)

alternative

Type of the alternative hypothesis in the test, one of "two.sided", "less", "greater"

method

Description of the hypothesis test

data.name

Name of the data set

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

PEdom.num.binom.test, PEdom.num1D and PEdom.num1Dnondeg

Examples

## Not run: 
a<-0; b<-10; supp<-c(a,b)
c<-.4

r<-1/max(c,1-c)

#nx is number of X points (target) and ny is number of Y points (nontarget)
nx<-100; ny<-4;  #try also nx<-40; ny<-10 or nx<-1000; ny<-10;

set.seed(1)
Xp<-runif(nx,a,b)

PEdom.num.binom.test1Dint(Xp,supp,c,alt="t")
PEdom.num.binom.test1Dint(Xp,support.int = supp,c=c,alt="t")
PEdom.num.binom.test1Dint(Xp,supp,c,alt="l")
PEdom.num.binom.test1Dint(Xp,supp,c,alt="g")
PEdom.num.binom.test1Dint(Xp,supp,c,alt="t",asy.bin = TRUE)

## End(Not run)


elvanceyhan/pcds documentation built on June 29, 2023, 8:12 a.m.