Description Usage Arguments Value Author(s) References See Also Examples
A function that estimates the density of the points
and then creates a valid cumulative intensity function F
for input to corrtest
.
1 |
x |
a vector of event times. |
start |
the start of the observation period: must be smaller than all elements of x. |
end |
the end of the observation period: must be greater than all elements of x. |
adjust |
parameter passed on to |
disallow.zero |
if |
A non-decreasing function that can serve as input to corrtest
.
Patrick Rubin-Delanchy <patrick.rubin-delanchy@bristol.ac.uk>
Patrick Rubin-Delanchy and Nicholas A Heard. “A test for dependence between two point processes on the real line”. arXiv:1408.3845.
1 2 3 4 5 6 7 8 9 10 | start=0; end=1
A=rbeta(100, 1, 10)
B=rbeta(100, 1, 10)
##This will be extreme because A and B are not homogeneous over [0,1]
corrtest(A,B)
##If we use an estimate of F the p-value is less aggressive
corrtest(A,B,F=mkF(c(A,B), start=0, end=1))
##But we can still find evidence of A causing B:
Bc=c(B, sample(A, 10)+abs(rnorm(10, 0,.0001))); Bc = Bc[Bc>start&Bc<end]
corrtest(A,Bc,F=mkF(c(A,Bc), start=0, end=1))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.