Spatiotemporal autocorrelation in R

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

Spatiotemporal autocorrelation in R

Laura Cabral
Hello All,

I have been reading about spatiotemporal autocorrelation and slowly familiarizing myself with the concepts involved. I have also been combing through the CRAN spatiotemporal task view, but I can’t seem to find the appropriate package/function for my purposes.

What I want to do:
I have two series of count data each for the same times and locations. Both series have been ordered from lowest count to highest count. I would like to identify where/when in space-time the series are similar (low-low count clusters, high-high count clusters) and where they do not correspond (high-low or low-high). Really, I am looking for a Moran’s I type index which can handle spatiotemporal data. I know this type of index has been developed (see for example Shen, Li and Si, 2016 - Spatiotemporal autocorrelation measures for nonstationary series), but I am unsure whether any of it has been translated into an R package/function. I do not (yet) have the mathematical/statistical/programming knowledge to implement those myself.


What I don’t want to do:
I have seen quite a bit of discussions or packages aimed at detrending or modelling the data. I do not need these functionalities. I have also seen separate handling of spatial and temporal autocorrelation for the same dataset. I would prefer an integrated index, if that is possible.

I feel like I might be looking for the wrong keywords, so any keywords, packages, functions, tutorials, videos, etc. that you could recommend would be greatly beneficial. As I mentioned, I am still familiarizing myself with spatiotemporal autocorrelation concepts, so if I seem to be approaching this from the completely wrong angle, please let me know!

Thank you all for your help,

Laura Cabral

 

MSc Candidate in Transportation Engineering

Dept of Civil and Environmental Engineering

University of Alberta

[hidden email] <mailto:[hidden email]>
819 993-1901


The University of Alberta is located in ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ (Amiskwacîwâskahikan) on Treaty 6 territory, homeland of the Papaschase and the Métis Nation


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Spatiotemporal autocorrelation in R

mcdonnet
Hi Laura,

It sounds like you may want to explore using the cross-correlation function (ccf) to compare the two sets of data through time:
http://stat.ethz.ch/R-manual/R-devel/library/stats/html/acf.html

Todd

--
Todd McDonnell
Research Scientist, Ph.D.
E&S Environmental Chemistry
Corvallis, OR | Ph. 541-758-1330
www.esenvironmental.com

-----Original Message-----
From: R-sig-Geo [mailto:[hidden email]] On Behalf Of Laura Cabral
Sent: Thursday, June 07, 2018 11:03 AM
To: [hidden email]
Subject: [R-sig-Geo] Spatiotemporal autocorrelation in R

Hello All,

I have been reading about spatiotemporal autocorrelation and slowly familiarizing myself with the concepts involved. I have also been combing through the CRAN spatiotemporal task view, but I can’t seem to find the appropriate package/function for my purposes.

What I want to do:
I have two series of count data each for the same times and locations. Both series have been ordered from lowest count to highest count. I would like to identify where/when in space-time the series are similar (low-low count clusters, high-high count clusters) and where they do not correspond (high-low or low-high). Really, I am looking for a Moran’s I type index which can handle spatiotemporal data. I know this type of index has been developed (see for example Shen, Li and Si, 2016 - Spatiotemporal autocorrelation measures for nonstationary series), but I am unsure whether any of it has been translated into an R package/function. I do not (yet) have the mathematical/statistical/programming knowledge to implement those myself.


What I don’t want to do:
I have seen quite a bit of discussions or packages aimed at detrending or modelling the data. I do not need these functionalities. I have also seen separate handling of spatial and temporal autocorrelation for the same dataset. I would prefer an integrated index, if that is possible.

I feel like I might be looking for the wrong keywords, so any keywords, packages, functions, tutorials, videos, etc. that you could recommend would be greatly beneficial. As I mentioned, I am still familiarizing myself with spatiotemporal autocorrelation concepts, so if I seem to be approaching this from the completely wrong angle, please let me know!

Thank you all for your help,

Laura Cabral

 

MSc Candidate in Transportation Engineering

Dept of Civil and Environmental Engineering

University of Alberta

[hidden email] <mailto:[hidden email]>
819 993-1901


The University of Alberta is located in ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ (Amiskwacîwâskahikan) on Treaty 6 territory, homeland of the Papaschase and the Métis Nation


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Spatiotemporal autocorrelation in R

Laura Cabral
Hi Todd,

Thank you for your suggestion. As I understand it, this takes care of the temporal aspect, but not the spatial aspect, am I right?

Thank you,
Laura Cabral

 

MSc Candidate in Transportation Engineering

Dept of Civil and Environmental Engineering

University of Alberta

[hidden email] <mailto:[hidden email]>
819 993-1901


The University of Alberta is located in ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ (Amiskwacîwâskahikan) on Treaty 6 territory, homeland of the Papaschase and the Métis Nation

> Le 7 juin 2018 à 12:42, Todd McDonnell <[hidden email]> a écrit :
>
> Hi Laura,
>
> It sounds like you may want to explore using the cross-correlation function (ccf) to compare the two sets of data through time:
> http://stat.ethz.ch/R-manual/R-devel/library/stats/html/acf.html
>
> Todd
>
> --
> Todd McDonnell
> Research Scientist, Ph.D.
> E&S Environmental Chemistry
> Corvallis, OR | Ph. 541-758-1330
> www.esenvironmental.com
>
> -----Original Message-----
> From: R-sig-Geo [mailto:[hidden email]] On Behalf Of Laura Cabral
> Sent: Thursday, June 07, 2018 11:03 AM
> To: [hidden email]
> Subject: [R-sig-Geo] Spatiotemporal autocorrelation in R
>
> Hello All,
>
> I have been reading about spatiotemporal autocorrelation and slowly familiarizing myself with the concepts involved. I have also been combing through the CRAN spatiotemporal task view, but I can’t seem to find the appropriate package/function for my purposes.
>
> What I want to do:
> I have two series of count data each for the same times and locations. Both series have been ordered from lowest count to highest count. I would like to identify where/when in space-time the series are similar (low-low count clusters, high-high count clusters) and where they do not correspond (high-low or low-high). Really, I am looking for a Moran’s I type index which can handle spatiotemporal data. I know this type of index has been developed (see for example Shen, Li and Si, 2016 - Spatiotemporal autocorrelation measures for nonstationary series), but I am unsure whether any of it has been translated into an R package/function. I do not (yet) have the mathematical/statistical/programming knowledge to implement those myself.
>
>
> What I don’t want to do:
> I have seen quite a bit of discussions or packages aimed at detrending or modelling the data. I do not need these functionalities. I have also seen separate handling of spatial and temporal autocorrelation for the same dataset. I would prefer an integrated index, if that is possible.
>
> I feel like I might be looking for the wrong keywords, so any keywords, packages, functions, tutorials, videos, etc. that you could recommend would be greatly beneficial. As I mentioned, I am still familiarizing myself with spatiotemporal autocorrelation concepts, so if I seem to be approaching this from the completely wrong angle, please let me know!
>
> Thank you all for your help,
>
> Laura Cabral
>
>
>
> MSc Candidate in Transportation Engineering
>
> Dept of Civil and Environmental Engineering
>
> University of Alberta
>
> [hidden email] <mailto:[hidden email]>
> 819 993-1901
>
>
> The University of Alberta is located in ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ (Amiskwacîwâskahikan) on Treaty 6 territory, homeland of the Papaschase and the Métis Nation
>
>
> [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Spatiotemporal autocorrelation in R

mcdonnet
The ccf can be used to compare two time-series that occur at the same location or at different locations. You could loop through all possible pairs of time-series at the same or different locations to determine which were more or less correlated. I am not sure how to do the spatial and the temporal correlations simultaneously.

Todd

On June 7, 2018 12:13:01 PM MST, Laura Cabral <[hidden email]> wrote:

>Hi Todd,
>
>Thank you for your suggestion. As I understand it, this takes care of
>the temporal aspect, but not the spatial aspect, am I right?
>
>Thank you,
>Laura Cabral
>
>
>
>MSc Candidate in Transportation Engineering
>
>Dept of Civil and Environmental Engineering
>
>University of Alberta
>
>[hidden email] <mailto:[hidden email]>
>819 993-1901
>
>
>The University of Alberta is located in ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ
>(Amiskwacîwâskahikan) on Treaty 6 territory, homeland of the Papaschase
>and the Métis Nation
>
>> Le 7 juin 2018 à 12:42, Todd McDonnell
><[hidden email]> a écrit :
>>
>> Hi Laura,
>>
>> It sounds like you may want to explore using the cross-correlation
>function (ccf) to compare the two sets of data through time:
>> http://stat.ethz.ch/R-manual/R-devel/library/stats/html/acf.html
>>
>> Todd
>>
>> --
>> Todd McDonnell
>> Research Scientist, Ph.D.
>> E&S Environmental Chemistry
>> Corvallis, OR | Ph. 541-758-1330
>> www.esenvironmental.com
>>
>> -----Original Message-----
>> From: R-sig-Geo [mailto:[hidden email]] On Behalf Of
>Laura Cabral
>> Sent: Thursday, June 07, 2018 11:03 AM
>> To: [hidden email]
>> Subject: [R-sig-Geo] Spatiotemporal autocorrelation in R
>>
>> Hello All,
>>
>> I have been reading about spatiotemporal autocorrelation and slowly
>familiarizing myself with the concepts involved. I have also been
>combing through the CRAN spatiotemporal task view, but I can’t seem to
>find the appropriate package/function for my purposes.
>>
>> What I want to do:
>> I have two series of count data each for the same times and
>locations. Both series have been ordered from lowest count to highest
>count. I would like to identify where/when in space-time the series are
>similar (low-low count clusters, high-high count clusters) and where
>they do not correspond (high-low or low-high). Really, I am looking for
>a Moran’s I type index which can handle spatiotemporal data. I know
>this type of index has been developed (see for example Shen, Li and Si,
>2016 - Spatiotemporal autocorrelation measures for nonstationary
>series), but I am unsure whether any of it has been translated into an
>R package/function. I do not (yet) have the
>mathematical/statistical/programming knowledge to implement those
>myself.
>>
>>
>> What I don’t want to do:
>> I have seen quite a bit of discussions or packages aimed at
>detrending or modelling the data. I do not need these functionalities.
>I have also seen separate handling of spatial and temporal
>autocorrelation for the same dataset. I would prefer an integrated
>index, if that is possible.
>>
>> I feel like I might be looking for the wrong keywords, so any
>keywords, packages, functions, tutorials, videos, etc. that you could
>recommend would be greatly beneficial. As I mentioned, I am still
>familiarizing myself with spatiotemporal autocorrelation concepts, so
>if I seem to be approaching this from the completely wrong angle,
>please let me know!
>>
>> Thank you all for your help,
>>
>> Laura Cabral
>>
>>
>>
>> MSc Candidate in Transportation Engineering
>>
>> Dept of Civil and Environmental Engineering
>>
>> University of Alberta
>>
>> [hidden email] <mailto:[hidden email]>
>> 819 993-1901
>>
>>
>> The University of Alberta is located in ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ
>(Amiskwacîwâskahikan) on Treaty 6 territory, homeland of the Papaschase
>and the Métis Nation
>>
>>
>> [[alternative HTML version deleted]]
>>
>> _______________________________________________
>> R-sig-Geo mailing list
>> [hidden email]
>> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Spatiotemporal autocorrelation in R

Rafael Pereira
Hi Laura,

I don't know any specific function/package that does precisely what you
want to do. A while ago, I wanted to run a bivariate spatial correlation in
R (bivariate LISA) and I couldn't find package with a function for such
task, despite being a fairly simple task. In the end, a colleague of mine
developed such function and we shared on StackOverflow and here in this
group as well. Link to SO:
https://stackoverflow.com/questions/45177590/map-of-bivariate-spatial-correlation-in-r-bivariate-lisa

Perhaps Chenhua Shen would be willing to share their code.

best,

Rafael H.M. Pereira
Transport Studies Unit (TSU)
Oxford University

On Thu, Jun 7, 2018 at 5:15 PM, Todd McDonnell <
[hidden email]> wrote:

> The ccf can be used to compare two time-series that occur at the same
> location or at different locations. You could loop through all possible
> pairs of time-series at the same or different locations to determine which
> were more or less correlated. I am not sure how to do the spatial and the
> temporal correlations simultaneously.
>
> Todd
>
> On June 7, 2018 12:13:01 PM MST, Laura Cabral <[hidden email]> wrote:
> >Hi Todd,
> >
> >Thank you for your suggestion. As I understand it, this takes care of
> >the temporal aspect, but not the spatial aspect, am I right?
> >
> >Thank you,
> >Laura Cabral
> >
> >
> >
> >MSc Candidate in Transportation Engineering
> >
> >Dept of Civil and Environmental Engineering
> >
> >University of Alberta
> >
> >[hidden email] <mailto:[hidden email]>
> >819 993-1901
> >
> >
> >The University of Alberta is located in ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ
> >(Amiskwacîwâskahikan) on Treaty 6 territory, homeland of the Papaschase
> >and the Métis Nation
> >
> >> Le 7 juin 2018 à 12:42, Todd McDonnell
> ><[hidden email]> a écrit :
> >>
> >> Hi Laura,
> >>
> >> It sounds like you may want to explore using the cross-correlation
> >function (ccf) to compare the two sets of data through time:
> >> http://stat.ethz.ch/R-manual/R-devel/library/stats/html/acf.html
> >>
> >> Todd
> >>
> >> --
> >> Todd McDonnell
> >> Research Scientist, Ph.D.
> >> E&S Environmental Chemistry
> >> Corvallis, OR | Ph. 541-758-1330
> >> www.esenvironmental.com
> >>
> >> -----Original Message-----
> >> From: R-sig-Geo [mailto:[hidden email]] On Behalf Of
> >Laura Cabral
> >> Sent: Thursday, June 07, 2018 11:03 AM
> >> To: [hidden email]
> >> Subject: [R-sig-Geo] Spatiotemporal autocorrelation in R
> >>
> >> Hello All,
> >>
> >> I have been reading about spatiotemporal autocorrelation and slowly
> >familiarizing myself with the concepts involved. I have also been
> >combing through the CRAN spatiotemporal task view, but I can’t seem to
> >find the appropriate package/function for my purposes.
> >>
> >> What I want to do:
> >> I have two series of count data each for the same times and
> >locations. Both series have been ordered from lowest count to highest
> >count. I would like to identify where/when in space-time the series are
> >similar (low-low count clusters, high-high count clusters) and where
> >they do not correspond (high-low or low-high). Really, I am looking for
> >a Moran’s I type index which can handle spatiotemporal data. I know
> >this type of index has been developed (see for example Shen, Li and Si,
> >2016 - Spatiotemporal autocorrelation measures for nonstationary
> >series), but I am unsure whether any of it has been translated into an
> >R package/function. I do not (yet) have the
> >mathematical/statistical/programming knowledge to implement those
> >myself.
> >>
> >>
> >> What I don’t want to do:
> >> I have seen quite a bit of discussions or packages aimed at
> >detrending or modelling the data. I do not need these functionalities.
> >I have also seen separate handling of spatial and temporal
> >autocorrelation for the same dataset. I would prefer an integrated
> >index, if that is possible.
> >>
> >> I feel like I might be looking for the wrong keywords, so any
> >keywords, packages, functions, tutorials, videos, etc. that you could
> >recommend would be greatly beneficial. As I mentioned, I am still
> >familiarizing myself with spatiotemporal autocorrelation concepts, so
> >if I seem to be approaching this from the completely wrong angle,
> >please let me know!
> >>
> >> Thank you all for your help,
> >>
> >> Laura Cabral
> >>
> >>
> >>
> >> MSc Candidate in Transportation Engineering
> >>
> >> Dept of Civil and Environmental Engineering
> >>
> >> University of Alberta
> >>
> >> [hidden email] <mailto:[hidden email]>
> >> 819 993-1901
> >>
> >>
> >> The University of Alberta is located in ᐊᒥᐢᑿᒌᐚᐢᑲᐦᐃᑲᐣ
> >(Amiskwacîwâskahikan) on Treaty 6 territory, homeland of the Papaschase
> >and the Métis Nation
> >>
> >>
> >>      [[alternative HTML version deleted]]
> >>
> >> _______________________________________________
> >> R-sig-Geo mailing list
> >> [hidden email]
> >> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> >>
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Reply | Threaded
Open this post in threaded view
|

Re: Spatiotemporal autocorrelation in R

R-sig-geo mailing list
In reply to this post by Laura Cabral
There are a couple software packages you might want to check out.  I believe Geoda (Luc Anselin) has bivariate LISA functions and LISTA-Viz has spatiotemporal autocorrelation functions as well.



Nathen M. Harp
Transportation - GIS Analyst
NYSDOT-Policy & Planning Division
Demographic Analysis & Forecasting
Fl 6 - Ave E - 10th St
50 Wolf Rd.
Albany, NY 12232
Ph: 518-485-0968
Fx: 518-485-8276
Email: [hidden email]


        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo