Description Usage Arguments Details Value See Also Examples
This function estimates the cross K-function between two (homogenous or nonhomogeneous) point processes in time, N_{x} and N_{y}. It is evaluated in a grid of distances r and plotted. An envelope built by simulation under the hypothesis that the processes are the marginal processes of a bivariate CPSP is also plotted.
It calls the auxiliary function DepCPSPKenv, not intended for users.
1 2 | DepCPSPNHK(posx, posy, lambdaix, lambdaiy, lambdaixy, r=NULL, typeEst=1,
nsim=1000, conf=0.95,tit=NULL, cores=1,fixed.seed=NULL,...)
|
posx |
Numeric vector. Occurrence times of the points in the first point process N_{x} . |
posy |
Numeric vector. Occurrence times of the points in the second point process N_{y} . |
lambdaix |
Numeric vector. Intensity values of N_{(x)}. |
lambdaiy |
Numeric vector. Intensity values of N_{(y)}. |
lambdaixy |
Numeric vector. Intensity values of N_{(xy)}. |
r |
Optional. Numeric vector. Grid values where the K-function must be evaluated. If it is NULL, a default vector is used; see Details. |
typeEst |
Optional. Two possible values: 1 or 2. They determines which one of the two available estimators of the function K_{ij} has to be used; see Details. |
nsim |
Optional. Numeric value. Number of simulations to obtain the envelope. |
conf |
Optional. Numeric value in (0,1). Confidence level of the envelope for the K-function. |
tit |
Optional. Title to be used in the plot of the K-function. |
cores |
Optional. Number of cores of the computer to be used in the calculations. |
fixed.seed |
An integer or NULL. If it is an integer, that is the value used to set the seed in random generation processes. If it is NULL, a random seed is used. |
... |
Further arguments to be passed to the function |
This function estimates the cross K function between two (homogenous or nonhomogeneous) point processes
in time, N_{x} and N_{y}. Two different estimators
are available, see NHK
for more details.
An envelope for the cross K function is built under the hypothesis that the processes are the marginal processes of a bivariate CPSP with intensities of the indicator processes
lambdaxi
, lambdayi
and lambdaxyi
. The envelope is based on the simulation of CPSPs,
gnerated by function DepNHCPSP
.
If argument r
is NULL, the following r-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)
where T
is the length of the observed period.
A list with elements:
r |
Vector of values r where the cross K-function is estimated. |
NHKr |
Estimated values of K_{ij}(r). |
KenvL |
Lower bounds of the envelope of K_{ij}(r). |
KenvU |
Upper bounds of the envelope of K_{ij}(r). |
T |
Length of the observed period of the processes. |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 | set.seed(123)
lambdai1<-runif(500,0.005,0.01)
set.seed(124)
lambdai2<-runif(500,0.005,0.01)
set.seed(125)
lambdai12<-runif(500,0.005,0.02)
#Observed process: independent Poisson processes
posx<-simNHPc(lambda = (lambdai1+lambdai12), fixed.seed = 13)$posNH
posy<-simNHPc(lambda = (lambdai2+lambdai12), fixed.seed = 14)$posNH
aux<-DepCPSPNHK(posx=posx, posy=posy, lambdaix=lambdai1, lambdaiy=lambdai2,
lambdaixy=lambdai12, fixed.seed=123, r=c(1:10), nsim=500)
#Observed processes: dependent marginal processes of a CPSP
#pos<-DepNHCPSP(lambdaiM=cbind(lambdai1, lambdai2, lambdai12), d=2,
# fixed.seed=123, dplot=F)$posNH
#aux<-DepCPSPNHK(posx=pos$N1, posy=pos$N2, lambdaix=lambdai1,
# lambdaiy=lambdai2, lambdaixy=lambdai12, fixed.seed=125, r=c(1:10))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.