TestIndLS: Lotwick-Silverman test of independence between point...

Description Usage Arguments Details Value References See Also Examples

View source: R/TestIndLS.R

Description

This function calculates a test based on the Lotwick-Silverman (LoS) approach to study the independence between two or three homogeneous point processes in time. The statistic is based on the close point sets of the points in the first process.

Usage

1
2
TestIndLS(posx, posy, posz=NULL, T,  alpha = 0.05, nTrans = 100, PA = FALSE, 
	cores=1,fixed.seed=NULL)

Arguments

posx

Numeric vector. Position of the occurrence points in the first process.

posy

Numeric vector. Position of the occurrence points in the second process.

posz

Numeric vector. Position of the occurrence points in the third process. Only used if there are 3 processes.

T

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

alpha

Optional. Significance level used to obtain a decision (reject-no reject) based on the test p-value.

nTrans

Optional. Positive integer. Number of translations to calculate the test.

PA

Optional. Logical flag. If it is TRUE, the close point relation is broadened by including the previous and the following points to the overlapping intervals.

cores

Optional. Number of cores of the computer to be used in the calculations.

fixed.seed

Optional. An integer or NULL. If it is an integer, that is the value used to set the seed in random generation processes. It it is NULL, a random seed is used.

Details

The underlying idea of the test is to compare, for each point in the first process, the behavior of its set of close points in the vector of observed processes (N_x, N_y, N_z), and in new vectors of independent processes with the same marginal distribution. The new independent vectors are obtained using a LoS approach, see Lotwick and Silverman (1982): the process N_x is fixed and second and third processes are obtained by shifting the original ones a random amount. This translation keeps the distribution of the homogeneous processes, but breaks any dependence between them. If the observed behavior is significantly different, independence is rejected. More details can be foun in Cebrian et al. (2020).

The test statistic is the one used in TestIndNH, but the p-value is obtained using a LoS approach, so that it does not require any assumption about the marginal distribution of the processes, not even the marginal intensities. The test TestIndNH, can be applied to study nonhomogeneous processes, but it requires a parametric model for the second process.

Value

A list with elements:

pv

P-value of the independence test.

reject

Binary variable indicating if the test is rejected (1) or not (0) at an alpha significance level.

est

Sample of the KS statistics. The first value corresponds to the observed processes and the others to the generated processes.

References

Cebrian, A.C., Abaurrea, J. and Asin, J. (2020). Testing independence between two point processes in time. Journal of Simulation and Computational Statistics.

Lotwick, H.W. and Silverman, B.W. (1982). Methods for analysing Spatial processes of several types of points. J.R. Statist. Soc. B, 44(3), pp. 406-13

See Also

TestIndNH, CondTest, DutilleulPlot, DistShift

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
#Test applied to three independent HPP

posx<-simNHPc(lambda=rep(0.1,200),fixed.seed=123)$posNH
posz<-simNHPc(lambda=rep(0.15,200),fixed.seed=124)$posNH
posy<-simNHPc(lambda=rep(0.1,200),fixed.seed=125)$posNH


aux<-TestIndLS(posx, posy, posz,T=200,
	cores=1,fixed.seed=321)
aux$pv

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