CSarc.dens.tri: Arc density of Central Similarity Proximity Catch Digraphs...

View source: R/CentSim2D.R

CSarc.dens.triR Documentation

Arc density of Central Similarity Proximity Catch Digraphs (CS-PCDs) - one triangle case

Description

Returns the arc density of CS-PCD whose vertex set is the given 2D numerical data set, Xp, (some of its members are) in the triangle tri.

CS proximity regions is defined with respect to tri with expansion parameter t>0 and edge regions are based on center M=(m_1,m_2) in Cartesian coordinates or M=(\alpha,\beta,\gamma) in barycentric coordinates in the interior of the triangle tri; default is M=(1,1,1) i.e., the center of mass of tri. The function also provides arc density standardized by the mean and asymptotic variance of the arc density of CS-PCD for uniform data in the triangle tri only when M is the center of mass. For the number of arcs, loops are not allowed.

tri.cor is a logical argument for triangle correction (default is TRUE), if TRUE, only the points inside the triangle are considered (i.e., digraph induced by these vertices are considered) in computing the arc density, otherwise all points are considered (for the number of vertices in the denominator of arc density).

See (\insertCiteceyhan:Phd-thesis,ceyhan:arc-density-CS,ceyhan:test2014;textualpcds) for more on CS-PCDs.

Usage

CSarc.dens.tri(Xp, tri, t, M = c(1, 1, 1), tri.cor = FALSE)

Arguments

Xp

A set of 2D points which constitute the vertices of the CS-PCD.

tri

A 3 \times 2 matrix with each row representing a vertex of the triangle.

t

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

M

A 2D point in Cartesian coordinates or a 3D point in barycentric coordinates which serves as a center in the interior of the triangle tri; default is M=(1,1,1) i.e., the center of mass of tri.

tri.cor

A logical argument for computing the arc density for only the points inside the triangle, tri (default is tri.cor=FALSE), i.e., if tri.cor=TRUE only the induced digraph with the vertices inside tri are considered in the computation of arc density.

Value

A list with the elements

arc.dens

Arc density of CS-PCD whose vertices are the 2D numerical data set, Xp; CS proximity regions are defined with respect to the triangle tri and M-edge regions

std.arc.dens

Arc density standardized by the mean and asymptotic variance of the arc density of CS-PCD for uniform data in the triangle tri.This will only be returned if M is the center of mass.

Author(s)

Elvan Ceyhan

References

\insertAllCited

See Also

ASarc.dens.tri, PEarc.dens.tri, and num.arcsCStri

Examples

## Not run: 
A<-c(1,1); B<-c(2,0); C<-c(1.5,2);
Tr<-rbind(A,B,C);
n<-10  #try also n<-20

set.seed(1)
Xp<-runif.tri(n,Tr)$g

M<-as.numeric(runif.tri(1,Tr)$g)  #try also M<-c(1.6,1.0)

CSarc.dens.tri(Xp,Tr,t=.5,M)
CSarc.dens.tri(Xp,Tr,t=.5,M,tri.cor = FALSE)
#try also t=1 and t=1.5 above

## End(Not run)


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