NHF {IndTestPP}R Documentation

Estimating the F-function

Description

This function estimates the F-function in a set of homogenous or nonhomogeneous point processes, DD. The F-function is evaluated in a grid of values rr, and it can be optionally plotted.

It calls the auxiliary functions NHFaux and other functions not intended for users.

Usage

NHF(lambdaD, T=NULL, Ptype='inhom', posD, typeD=1, r=NULL,L=NULL, dplot=TRUE,
tit='F(r)',...)

Arguments

lambdaD

A matrix of positive values. Each column is the intensity vector of one of the point process in DD. If there is only one process in DD, it can be a vector or even a numeric value if the process is homogeneous.

T

Numeric value. Length of the observed period. It only must be specified if the number of rows in lambdaC and lambdaD is 1.

Ptype

Optional. Label: "hom" or "inhom". The first one indicates that all the point processes in sets CC and DD are homogeneous.

posD

Numeric vector. Occurrence times of the points in all the point processes in DD.

typeD

Numeric vector with the same length as posD. Code of the point process in DD where the point in the same row in posD has occurred. The code must be the column number where the intensity of that process is in matrix lambdaD.

r

Numeric vector. Values where the F-function must be evaluated. If it is NULL, a default vector is used, see Details

L

Optional. Numeric vector. Values in the observed period used to calculate the F-function. If it is NULL, a default vector is used, see Details.

dplot

Optional. Logical flag. If it is true, the F-function is plotted.

tit

Optional. The title to be used in the plot of the F-function.

...

Further arguments to be passed to the function plot.

Details

The information about the processes is provided by arguments posD, the vector of all the occurrence times in the processes in CC, and typeD, the vector of the code of the point process in set DD where each point in posD has occurred.

This function estimates the F-function in a set DD of homogenous or nonhomogeneous time point processes, see Cebrian et al (2020) for details of the estimation. The F-function, also known as empty space function, is the distribution function of the distances from an arbitray point in the space to the nearest point in a process in DD. In homogeneous processes, it estimates the probability that at least one point in processes in DD occurs at a distance lower than rr of an arbitray point in the space. If the processes are nonhomogenous, the inhomogenous version of the function, adjusted for time varying intensities, is used.

If argument r is NULL, the following grid is used to evaluate the function

r1<-max(20, floor(T/20))

r<-seq(1,r1,by=2)

if (length(r)>200) r<-seq(1,r1,length.out=200)

If argument L is NULL, the following grid is used

L <- seq(1, T, by = 2) if (length(L) > 5000) L <- seq(1, T, by = round((T - 1)/199))

Value

A list with elements:

r

Vector of values rr where the F-function is estimated.

NHFr

Estimated values of FD(r)F_{D}(r).

T

Length of the observed period of the process.

L

Grid of L values to calculate the F-funtion.

References

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

See Also

NHK, NHJ, NHD

Examples


set.seed(123)
lambda1<-runif(500, 0.05, 0.1)
pos1<-simNHPc(lambda=lambda1, fixed.seed=123)$posNH

aux<-NHF(lambdaD=lambda1, posD=pos1, typeD=1)
aux$NHFr

#Set D with two processes ***
#lambda2<-runif(1000, 0.01, 0.2)
#pos2<-simNHPc(lambda=lambda2, fixed.seed=123)$posNH
#aux<-NHF(lambdaD=cbind(lambda1,lambda2), posD=c(pos1,pos2), 
#	typeD=c(rep(1, length(pos1)), rep(2, length(pos2))) )
#aux$NHFr


[Package IndTestPP version 3.0 Index]