I came across your post while trying to solve a similar problem. I am trying to simulate a field of non-stationary, single variable spatial data in such a way that I can tweak various parameters and observe the effects.

Specifically, I am trying to recreate non-stationary data following a Matérn covariance structure based on equation (9) in this paper:

http://arxiv.org/pdf/1411.3174.pdf

Do you know if it would be correct to adapt your technique to the “Omega” covariates in the equation, for each specific site? And would it work to model a domain of, say, 100 x 100 points?

My apologies if this is confusing – I am confused myself! I am a geologist who has wandered into spatial statistics…

Thank you kindly,

-James

]]>The code was seriously mangled by a problem with a WordPress plugin; I have cleaned the code and it should now run. Thanks for letting me know of the problem. That line was supposed to calculate and index when total was greater than 1 or just use 1 as the index.

]]>Error: unexpected ‘,’ in:

” h = sum(frac^2)

hn = if(total > 1,”

I would appreciate if you could explain to me what is this line supposed to do: hn = if(total > 1, (h – 1/total)/(1 – 1/total), 1)

Thanks.

]]>