I have a dataset like this:

      sites years Var1 Var2 
      1 1960 505 3.013833 
      1 1961 533 4.118784 
      1 1962 609 14.96386 
      1 1963 465 -3.74409 
      1 1964 837 41.70164 
      1 1965 727 29.53478 
      2 1960 493 3.269235 
      2 1961 535 5.386015 
      2 1962 608 16.26244 
      2 1963 469 -2.09736 
      2 1964 830 42.01942 
      2 1965 715 29.92867 
      3 1960 489 5.630015 
      3 1961 540 8.694733 
      3 1962 615 19.60908 
      3 1963 480 1.666236 
      3 1964 836 45.12964 
      3 1965 714 32.36178 
      4 1960 473 2.752683 
      4 1961 533 6.521744 
      4 1962 601 16.89496 
      4 1963 475 -0.2503 
      4 1964 817 41.86903 
      4 1965 686 28.54376 
      5 1960 476 4.337246 
      5 1961 540 8.601403 
      5 1962 610 18.99233 
      5 1963 479 1.336739 
      5 1964 822 43.73037 
      5 1965 692 30.30235 


Meantime, I have the spatial location (longitude, latitude) for each site. 
Among these sites, spatial autocorrelation exists. Within each site, for the 
variables ¡°Var1¡± and ¡°Var2¡±, temporal autocorrelation also exists. I want 
to calculate the correlation between Var1 and Var2 using ¡°correlation 
coefficient¡±. My question is that how can I add the information of spatial and 
temporal autocorrelation into my analysis. I know that, for only spatial 
autocorrelation, we can use ¡°modified t-test¡± to do the analysis. But I have 
no idea how to do it when considering the spatial and temporal autocorrelation 
together?

Any suggestions?

Thanks so much.

---
Jian Zhang

        [[alternative HTML version deleted]]

______________________________________________
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.

Reply via email to