Closed t-pollington closed 5 years ago
Dear @t-pollington,
I am very sorry for my lag to reply your messages but I have been very busy doing teaching. Nevertheless, I am very happy for your interest in my repository mvstpp connected with the paper "Mark variograms for spatio-temporal point processes". As you can see, I wrote this code some months ago and at this time it is not adapted to be installed into the new versions of R using the package devtools. This repository need some changes in the NAMESPACE file and also incorporate a other one in order to compile and connected the FORTRAN subroutines with R language. I have planned include those functions in mvstpp into stpp package as a more fast solution.
Regarding your questions about (mvstpp::gsp.R),
i) its first 2 elements are set to zero (lines 170-172) Answer: The definition of the mark variogram involve three important terms ‘sill’, ‘range’ and ‘nugget effect’ (see equations (4) and (5) in the paper and the related comments). The nugget effect reflects spatial aggregation of points close together with different marks. Indeed, a positive nugget effect indicates that points close together tend to have (significantly) different marks. If the mark variogram is positive and constant, one refers to a ‘pure nugget effect’. you can easily identify that the nugget effect is represented as the length of the vertical line for the mark variogram in the origin. For this reason, my code establish two element at zero.
ii) the length of ds is extended by two Answer: It is by the same purpose, plotting the mark variogram showing explicit the nuggets effects.
iii) its length is also extended by two (line 174) Answer: It is by the same purpose, plotting the mark variogram showing explicit the nuggets effects.
iv) the 2nd and 3rd elements of egsp are the same (lines 175-176) Answer: It is by the same purpose, plotting the mark variogram showing explicit the nuggets effects.
Regards!
Thank you very much @frajaroco for your detailed explanation. From your explanation I now understand that the variogram is annotated with additional points where the first point is [0,0], the second is [0,gsps[1]] and the third is [ds[1],gsps[1]].
I respect your work and my current analysis is founded on your Stoyan et al paper. However I don't agree with this particular method and for the benefit of open scientific debate I share my view here.
Your method of working with gspout
means if a graph was made from this data structure, it would imply that you had run the code for ds[1]=0
(and got two different results for it: the origin and nugget at the first and second points) however that is not the case as you prevent zero-separations earlier in:
if(ds[1]==0){ds <- ds[-1]
}
These additional points could therefore unintentionally mislead the reader.
I think a better way is to choose a smaller ds[1]
to better approximate the nugget and if that is not possible then choose the smallest ds
you can and state that this is an approximation in the text. In my code for a spatial mark variogram (inspired by your Stoyan et al work) I'm including zero-separated cases (so long as their time marks are different); it is acceptable to do this as Ilian et al pp345-346 allow zero separations (r=0) in their definition of the non-normalised and normalised mark correlation functions.
I would welcome your thoughts. Kind regards and respect, @t-pollington
Dear @frajaroco,
I have read your code for (
mvstpp::gsp.R
) and was wondering if you could help me understand why for theds
return value:i) its first 2 elements are set to zero (
lines 170-172
) ii) the length ofds
is extended by twoand for the
egsp
return value: iii) its length is also extended by two (line 174
) iv) the 2nd and 3rd elements ofegsp
are the same (lines 175-176)There must be a good reason as the same appears for
gte.R
(lines 87-93) but I don't quite get it!Kind regards,
@t-pollington.