CountingCor: Correlation between the counting variables in two point...

Description Usage Arguments Details Value See Also Examples

View source: R/CountingCor.R

Description

This function calculates the correlation coefficient between the number of points in intervals of length ll, in two point processes.

Usage

1
2
CountingCor(posx, posy, ll, T,  method='spearman', lambdax=NULL, 
	lambday=NULL)

Arguments

posx

Numeric vector. Occurrence times of the points in the first point process.

posy

Numeric vector. Occurrence times of the points in the second point process.

ll

Numeric value. Lenght of the intervals where the number of points are counted.

T

Numeric value. Length of the observed period of the point processes.

method

Character string. Correlation coefficient to be calculated. One of "pearson", "kendall", or "spearman"; see cor.test for definitions.

lambdax

Numeric vector. Intensity vector of the first point process.

lambday

Numeric vector. Intensity vector of the second point process.

Details

This function calculates ρ_{xy,I_l}=Cor(X_{I_l}, Y_{I_l}), where X_{I_l} and Y_{I_l} are the number of points in an interval I_l in processes N_x and N_y, respectively.

In order to calculate the number of points in each interval in a process, the function CountP is used.

Value

ccor

Estimated correlation.

See Also

depchi,BinPer

Examples

1
2
3
4
5
#generation of two HPP
aux1<-simNHPc(lambda=rep(0.08,200),fixed.seed=123)
aux2<-simNHPc(lambda=rep(0.12,200),fixed.seed=125)

CountingCor(aux1$posNH, aux2$posNH,ll=20, method="kendall",T=200)

IndTestPP documentation built on Aug. 29, 2020, 1:06 a.m.