Learn R Programming

IndTestPP (version 3.0)

CountingCor: Correlation between the counting variables in two point processes

Description

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

Usage

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.

Value

ccor

Estimated correlation.

Details

This function calculates \(\rho_{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.

See Also

depchi,BinPer

Examples

Run this code
# NOT RUN {
#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)
# }

Run the code above in your browser using DataLab