PEarc.dens.test.int: A test of uniformity of 1D data in a given interval based on...

View source: R/PropEdge1D.R

PEarc.dens.test.intR Documentation

A test of uniformity of 1D data in a given interval based on Proportional Edge Proximity Catch Digraph (PE-PCD)

Description

An object of class "htest". This is an "htest" (i.e., hypothesis test) function which performs a hypothesis test of uniformity of 1D data in one interval based on the normal approximation of the arc density of the PE-PCD with expansion parameter r \ge 1 and centrality parameter c \in (0,1).

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 the arc density), and method and name of the data set used.

The null hypothesis is that data is uniform in a finite interval (i.e., arc density of PE-PCD equals to its expected value under uniform distribution) and alternative could be two-sided, or left-sided (i.e., data is accumulated around the end points) or right-sided (i.e., data is accumulated around the mid point or center M_c).

See also (\insertCiteceyhan:metrika-2012,ceyhan:revstat-2016;textualpcds).

Usage

PEarc.dens.test.int(
  Xp,
  int,
  r,
  c = 0.5,
  alternative = c("two.sided", "less", "greater"),
  conf.level = 0.95
)

Arguments

Xp

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

int

A vector of two real numbers representing an interval.

r

A positive real number which serves as the expansion parameter in PE proximity region; must be \ge 1.

c

A positive real number in (0,1) parameterizing the center inside int=(a,b) with the default c=.5. For the interval, int=(a,b), the parameterized center is M_c=a+c(b-a).

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 arc density of PE-PCD based on 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 the arc density at the given confidence level conf.level and depends on the type of alternative.

estimate

Estimate of the parameter, i.e., arc density

null.value

Hypothesized value for the parameter, i.e., the null arc density, which is usually the mean arc density under uniform distribution.

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

CSarc.dens.test.int

Examples

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

n<-100  #try also n<-20, 1000
Xp<-runif(n,a,b)

PEarc.dens.test.int(Xp,int,r,c)
PEarc.dens.test.int(Xp,int,r,c,alt="g")
PEarc.dens.test.int(Xp,int,r,c,alt="l")

## End(Not run)


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