3
$\begingroup$

I am working with daily precipitation measurements from nearly 1500 rain gauges. I have calculated the correlation between the measurements of each station and its 20 nearest neighbors. I also have the distances between the stations.

I am now trying to find the correlation decay distance (CDD) from the resulting correlation matrix. CDD is defined as the distance where the correlation between one station and all other stations decays below 1/e. I am following Hofstra and New's calculation of CDD:

enter image description here

Specifically, I am attempting to reproduce their Figure 2:

enter image description here

Based on this post, my first try was using SSasymp to fit a self-starting exponential decay function to my data. This is what I have so far:

library(data.table)

# load data
dat <- fread("https://www.dropbox.com/s/jgo5b91owpllbq3/cor_vs_dist.csv?dl=1", sep=",") # ~ 465 KB

# visually inspect it
plot(correl ~ dist, data=dat)

# fit a model using SSasymp
fit <- nls(correl ~ SSasymp(dist, Asym, R0, lrc), data=dat)
summary(fit)
coef(fit)
lines(dat$correl, predict(fit), col="red")

However, the fit is terribly poor:

enter image description here

So my questions are:

  1. How can I better fit a another exponential decay model to my data?
  2. Once the model is fit, how can I determine the 1/e value like in the referenced paper?

Any input highly appreciated!

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.