# R/NHF.R In IndTestPP: Tests of Independence and Analysis of Dependence Between Point Processes in Time

#### Documented in NHF

```NHF <-
{
{ if (is.null(T)==TRUE)	stop('Argument T (length of the observation period) must be specified')
else Ptype<-'hom'	}
if (max(posD)>T) stop("There are some  occurrence points outside the observation period")

if (is.null(r))
{
r1<-max(10, floor(T/10))
r<-seq(1,r1,by=2)
if (length(r)>200) r<-seq(1,r1,length.out=200)
}
if (max(2*r+1)>T)  stop ('Some r values are too large  and they lead to
intervals longer than the observation period T')
if (is.null(L))
{
L<-seq(1, T, by=2)
if (length(L)>200) L<-seq(1,T,by = round((T - 1)/199))
}

if (Ptype=='hom')
{
NHFr<-HDFaux(punt=L, posD=posD,   r=r, T=T)
}
else
{
if (length(typeD)==1) typeD<-rep(1,length(posD))
if (length(posD)!=length(typeD)) stop("Arguments typeD and posD must have the same length")

#F(r) estimation
NHFr<-1-NHFraux
}

if (dplot==TRUE)
{	plot(r,NHFr,pch=16, ylab='F(r)', xlab='r', main=tit, cex=0.5,...)
lines(r,NHFr)
}
return(list(r=r,NHFr=NHFr, T=T, L=L))
}
```

## Try the IndTestPP package in your browser

Any scripts or data that you put into this service are public.

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