Hi!
I was actually able to solve this using the spacetime and gstat packages in
R. thanks for your help.

regards,
Jonesmus.


On Wed, Feb 13, 2013 at 4:31 PM, Hodgess, Erin <hodge...@uhd.edu> wrote:

> Hi!
>
> When you make your shift from the first data set to the second, set it up
> such the the X1 - X4 are time series.
>
> For instance, if your data frame is called d1.df,
> d1.df$X1 <- ts(d1.df$X1,start=1981,freq=12)
> (for monthly data)
>
> Hope this helps!
>
> Sincerely,
> Erin
>
> ________________________________________
> From: r-sig-geo-boun...@r-project.org [r-sig-geo-boun...@r-project.org]
> on behalf of Jonesmus Wambua [jonesmus.mu...@gmail.com]
> Sent: Wednesday, February 13, 2013 3:25 AM
> To: r-sig-geo@r-project.org
> Subject: [R-sig-Geo] Fwd: spatio temporal variogram
>
> Hi everyone,
> am trying to do temporal and cross correlation and also fit a
> spatio-temporal variogram with data in this format.
>
>  |           ID year   y  X_COORD  Y_COORD
>         1   1  1981   60  36.98203  2.042057
>         2   2  1982   40  37.12720  2.016312
>         3   2  1983   20  37.12720  2.016312
>         4   3  1980  165  35.38416  1.714100
>         5   3  1981   26  35.38416  1.714100
>         6   3  1982   50  35.38416  1.714100|
>
> My challenge is getting the data in the right format. my years are only 5
> but with over 500 cluster points. I have summarized the data by adding the
> data for each cluster per year so that my data now looks like below
>
>  year X1 X2 X3 X4
> 1 1980 NA NA  3 NA
> 2 1981  1 NA  2  5
> 3 1982 NA  0  0 NA
> 4 1983 NA  0 NA NA
> 5 1984 NA NA NA NA
>
>
> where X1 are my clusters. when i tried to do a autocorrelation using the
> following code,
> acf(na.omit(som)) it works, but for cross-autocorrelation as follows
>
> acf(na.omit(som), "xts") , it gives the following error
>
> Error in ts(x) : 'ts' object must have one or more observations
>
>
> can anyone help?
> thanks
>
>         [[alternative HTML version deleted]]
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo@r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

        [[alternative HTML version deleted]]

_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@r-project.org
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to