frajaroco / mvstpp

Mark variograms for spatio-temporal point processes
http://www.sciencedirect.com/science/article/pii/S2211675317300696
GNU Lesser General Public License v3.0
1 stars 1 forks source link

gspcore.f: kernel calculation #7

Closed t-pollington closed 5 years ago

t-pollington commented 5 years ago

Dear @frajaroco,

Please could you help me in understanding the application of the kernel function _kepsilon regarding the spatial and temporal mark variograms as described in equations 7 and 8 (p129) of your Mark variograms for spatio-temporal point processes paper and how it relates to your code in gspcore.f as an example?

This is my current understanding however it results in a contradiction.

1) Is the 0 < epsilon < r condition only for the edge-corrections and so only applies to the "standardised" approach, or does it also apply to the "simplified" approach too? I think it may be the latter since on line 79 you drop the first element of ds which would be set to hs. I think this is because you want to avoid the epsilon(hs)=r(ds) case.

2) for the kernel function _k_epsilon(||x_i-xj|| - r) I presume that only an argument "x"(say) greater than or equal to r ( i.e. x >= r) is possible. But on lines 31-35 you divide s(iu)-hij by hs(i.e. epsilon). But if you divide the argument x by something that has to be smaller than r (from 1 above as 0 < epsilon < r) then this will result in an argument larger than 1. So when the kernel function runs e.g. lines 90-104 then it will never run the if condition, only the else.

Kind regards,

@t-pollington.

frajaroco commented 5 years ago

Dear @t-pollington,

You questions about of reason the accommodation of the kernel function in the estimators of the spatial and temporal mark variograms can be solve if you take time to check the classical literature of the spatial point patterns. I recommend you read the following books in order to understand the geometry of the counts behind the estimators and it relationship with the kernel function and bandwints:

  1. Statistical Analysis of Spatial and Spatio-Temporal Point Patterns
  2. Spatial Point Patterns: Methodology and Applications with R
  3. Statistical Analysis and Modelling of Spatial Point Patterns

If you are interested in more details or some kind of scientific cooperation please contact with me at the email frrodriguezc@unal.edu.co.

Regards!

t-pollington commented 5 years ago

Dear @frajaroco,

Thank you for the book references.

  1. My second question is resolved! I realise that kernel functions can have negative arguments since they are symmetric.

  2. I am still puzzled by the 0<epsilon<r condition in your paper and its purpose. If anything, for the Epanechnikov kernel, one needs epsilon<0.5*(ds[i]-ds[i-1]), assuming there are evenly spread ds[i], to prevent overlap of pairs selected for adjacent ds[i-1],ds[i],ds[i+1].

Yes let's discuss more. I'll be attending Spatial Statistics 2019 and hope to discuss more with you then on topics that interest us.

Kind regards, @t-pollington.