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

View source: R/CentSim1D.R

CSarc.dens.test.intR Documentation

A test of uniformity of 1D data in a given interval based on Central Similarity Proximity Catch Digraph (CS-PCD)

Description

An object of class "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 CS-PCD with expansion parameter t>0 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 CS-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:revstat-2016;textualpcds).

Usage

CSarc.dens.test.int(
  Xp,
  int,
  t,
  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 CS-PCD.

int

A vector of two real numbers representing an interval.

t

A positive real number which serves as the expansion parameter in CS proximity region.

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 CS-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 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

PEarc.dens.test.int

Examples


c<-.4
t<-2
a<-0; b<-10; int<-c(a,b)

n<-10
Xp<-runif(n,a,b)

num.arcsCSmid.int(Xp,int,t,c)
CSarc.dens.test.int(Xp,int,t,c)

num.arcsCSmid.int(Xp,int,t,c=.3)
CSarc.dens.test.int(Xp,int,t,c=.3)

num.arcsCSmid.int(Xp,int,t=1.5,c)
CSarc.dens.test.int(Xp,int,t=1.5,c)

Xp<-runif(n,a-1,b+1)
num.arcsCSmid.int(Xp,int,t,c)
CSarc.dens.test.int(Xp,int,t,c)

c<-.4
t<-.5
a<-0; b<-10; int<-c(a,b)
n<-10  #try also n<-20
Xp<-runif(n,a,b)

CSarc.dens.test.int(Xp,int,t,c)



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