The hardware and bandwidth for this mirror is donated by METANET, the Webhosting and Full Service-Cloud Provider.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]metanet.ch.

Type: Package
Title: Graph Theoretic Randomness Tests
Version: 0.1.0
Date: 2025-08-28
Description: A collection of functions for testing randomness (or mutual independence) in linear and circular data as proposed in Gehlot and Laha (2025a) <doi:10.48550/arXiv.2506.21157> and Gehlot and Laha (2025b) <doi:10.48550/arXiv.2506.23522>, respectively.
License: GPL-3
Encoding: UTF-8
RoxygenNote: 7.3.2
Imports: stats, circular
Suggests: knitr, rmarkdown, timeSeriesDataSets
VignetteBuilder: knitr
NeedsCompilation: no
Packaged: 2025-08-28 12:49:17 UTC; gehlo
Author: Shriya Gehlot [aut, cre], Arnab Kumar Laha [aut]
Maintainer: Shriya Gehlot <phd20shriyag@iima.ac.in>
Repository: CRAN
Date/Publication: 2025-09-02 21:10:20 UTC

Theoretical CDF for RCAG for a given number of vertices.

Description

Computes the theoretical CDF for an RCAG with for a given number of vertices.

Usage

cdf.rcag(m)

Arguments

m

Number of observations.

Value

A vector representing the theoretical CDF of an RCAG with m/2 vertices.

Examples

cdf.rcag(1000) 

Theoretical CDF of RIG for a given number of vertices.

Description

Computes the theoretical CDF for RIG with for a given number of vertices.

Usage

cdf.rig(m)

Arguments

m

Number of observations.

Value

A vector representing the theoretical CDF of RIG with m/2 vertices.

Examples

cdf.rig(1000) 

Degree Calculation for Random Circular Graph

Description

Computes the degree of each vertex in a Random Circular Graph based on input arcs.

Usage

deg.rcag(theta)

Arguments

theta

A numeric vector of length m=2*nv.

Value

A vector of degrees for each vertex of RCAG obtained using theta.

Examples

x <- arima.sim(model = list(ar=0.9), 1000) ## AR(1) model
theta <- ((2*atan(x))%%(2*pi))*(180/pi) ##LAR(1) model
deg.rcag(theta)

Degree Calculation for Random Interval Graph

Description

Computes the degree of each vertex in a Random Interval Graph based on the input intervals.

Usage

deg.rig(x)

Arguments

x

A numeric vector of length m=2*nv.

Value

A vector of degrees for each vertex of RIG obtained using x.

Examples

x <- arima.sim(model = list(ar=0.7), 1000) ## AR(1) model
deg.rig(x)

Hellinger Distance Between Distributions

Description

Calculates the Hellinger distance between two probability distributions.

Usage

hellinger.dist(p, q)

Arguments

p

A probability vector.

q

Another probability vector of same length as p.

Value

Hellinger distance between p and q.


Proportion of Non-Intersecting Arc Pairs in an RCAG.

Description

Computes the proportion of non-intersecting pairs of arcs in the RCAG obtained using data.

Usage

nip.rcag(s, t, e1, e2)

Arguments

s

Start points of arcs.

t

End points of arcs.

e1

Vector of indices for the first interval in each pair.

e2

Vector of indices for the second interval in each pair.

Value

Mean proportion of non-intersecting pairs.

Examples

s <- circular::rcircularuniform(10) 
t <- circular::rcircularuniform(10)
e1 <- c(2,10,6,1,5)
e2 <- c(4,3,8,7,9)
nip.rcag(s,t,e1,e2)

Proportion of Non-Intersecting Interval Pairs in an RIG

Description

Computes the proportion of non-intersecting pairs of interval in the RIG obtained using data.

Usage

nip.rig(s, t, e1, e2)

Arguments

s

Start points of intervals.

t

End points of intervals.

e1

Vector of indices for the first interval in each pair.

e2

Vector of indices for the second interval in each pair.

Value

Mean proportion of non-intersecting pairs.

Examples

s <- runif(10,0,1) 
t <- runif(10,0,1)
e1 <- c(2,10,6,1,5)
e2 <- c(4,3,8,7,9)
nip.rig(s,t,e1,e2)

RCAG-DD Test

Description

Performs the RCAG-DD RIG-DD test of randomness for circular data.

Usage

rcagdd.test(theta)

Arguments

theta

A numeric vector representing endpoints of arcs.

Value

Vector of test statistics of RCAG-DD Test.

Examples

x <- arima.sim(model = list(ar=c(0.6,0.3)), 1000) ## AR(2) model
theta <- ((2*atan(x))%%(2*pi))*(180/pi) ##LAR(2) model
rcagdd.test(theta)

RCAG-EP Test

Description

Performs the RCAG-EP test of randomness for circular data.

Usage

rcagep.test(theta, alpha)

Arguments

theta

A numeric vector.

alpha

The level of significance

Value

Probability of non-intersection of edges, cutoff for RCAG-EP test and adjusted p-values for the RCAG-EP test.

Examples

x <- arima.sim(model = list(ar=0.9), 1000) ## AR(1) model
theta <- ((2*atan(x))%%(2*pi))*(180/pi) ##LAR(1) model
rcagep.test(theta,0.05)

RIG-DD Test

Description

Performs the RIG-DD test of randomness.

Usage

rigdd.test(x)

Arguments

x

A numeric vector corresponding to interval of an RIG.

Value

Vector of test statistics of RIG-DD Test.

Examples

x <- arima.sim(model = list(ar=c(0.7,0.2)), 1000) ## AR(2) model
rigdd.test(x)

RIG-EP Test

Description

Performs the RIG-EP test of randomness.

Usage

rigep.test(x, alpha)

Arguments

x

A numeric vector

alpha

The level of significance

Value

Probability of non-intersection of edges, cutoff for RIG-EP test and adjusted p-values for the RIG-EP test.

Examples

x <- arima.sim(model = list(ar=0.9), 1000) ## AR(1) model
rigep.test(x,0.05)

Threshold for RCAG-DD Test of randomness for circular data

Description

Calculates a threshold for RCAG-DD test using simulated data.

Usage

thrsd.rcagdd(m, n_iter, alpha)

Arguments

m

Number of observations.

n_iter

Number of simulations.

alpha

Level of significance.

Value

Threshold value for RCAG-DD test. thrsd.rcagdd(500,1000,0.05)


Threshold for RIG-DD Test of randomness

Description

Calculates a threshold for RIG-DD test using simulated data.

Usage

thrsd.rigdd(m, n_iter, alpha)

Arguments

m

Number of observations.

n_iter

Number of simulation iterations.

alpha

Level of significance.

Value

Threshold value for RIG-DD test.

Examples

thrsd.rigdd(250,1000,0.05)

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.