Learn R Programming

pcds (version 0.1.8)

funsMuVarCS1D: Returning the mean and (asymptotic) variance of arc density of Central Similarity Proximity Catch Digraph (CS-PCD) for 1D data - middle interval case

Description

Two functions: muCS1D and asy.varCS1D.

muCS1D returns the mean of the (arc) density of CS-PCD and asy.varCS1D returns the (asymptotic) variance of the arc density of CS-PCD for a given centrality parameter \(c \in (0,1)\) and an expansion parameter \(t>0\) and 1D uniform data in a finite interval \((a,b)\), i.e., data from \(U(a,b)\) distribution.

See also (ceyhan:revstat-2016;textualpcds).

Usage

muCS1D(t, c)

asy.varCS1D(t, c)

Value

muCS1D returns the mean and asy.varCS1D returns the asymptotic variance of the arc density of CS-PCD for uniform data in an interval

Arguments

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)\). For the interval, int\(=(a,b)\), the parameterized center is \(M_c=a+c(b-a)\).

Author

Elvan Ceyhan

References

See Also

muPE1D and asy.varPE1D

Examples

Run this code
# \donttest{
#Examples for muCS1D
muCS1D(1.2,.4)
muCS1D(1.2,.6)

tseq<-seq(0.01,5,by=.05)
cseq<-seq(0.01,.99,by=.05)

ltseq<-length(tseq)
lcseq<-length(cseq)

mu.grid<-matrix(0,nrow=ltseq,ncol=lcseq)
for (i in 1:ltseq)
  for (j in 1:lcseq)
  {
    mu.grid[i,j]<-muCS1D(tseq[i],cseq[j])
  }

persp(tseq,cseq,mu.grid, xlab="t", ylab="c", zlab="mu(t,c)",theta = -30,
phi = 30, expand = 0.5, col = "lightblue", ltheta = 120,
shade = 0.05, ticktype = "detailed")
# }

# \donttest{
#Examples for asy.varCS1D
asy.varCS1D(1.2,.8)

tseq<-seq(0.01,5,by=.05)
cseq<-seq(0.01,.99,by=.05)

ltseq<-length(tseq)
lcseq<-length(cseq)

var.grid<-matrix(0,nrow=ltseq,ncol=lcseq)
for (i in 1:ltseq)
  for (j in 1:lcseq)
  {
    var.grid[i,j]<-asy.varCS1D(tseq[i],cseq[j])
  }

persp(tseq,cseq,var.grid, xlab="t", ylab="c", zlab="var(t,c)", theta = -30,
phi = 30, expand = 0.5, col = "lightblue", ltheta = 120,
shade = 0.05, ticktype = "detailed")
# }

Run the code above in your browser using DataLab