[R-sig-Geo] Spatio Temporal Kriging in gstat

Dan Turenne DanielTurenne at hotmail.com
Tue Jun 21 04:05:29 CEST 2016


Hello R-Sig-Geo,


As part of my masters thesis I am attempting to use spatio-temporal regression kriging to make predictions with temperature data, and I was hoping that someone might be able to give some insight as to how the algorithms work in gstat.  My data consists of daily temperature observations from April 1 to July 31, 2000.  There are observations from 164 stations across these 122 days, however not all stations have observations on all days, making for a total of 19282 records.


I have tried to use an STSDF object but I have not had any success.  I created an sp object of length 164 with the station locations:


    sp = data.frame(long = stations$long, lat = stations$lat)

    coordinates(sp) = ~ long+lat


Then I created a vector of length 122 with the times the observations were recorded and a data vector of length 19282:


    beginDate = as.Date(2000/04/01)

    endDate = as.Date(2000/07/31)

    times = as.POSIXct(seq(beginDate,endDate,by="days"))


    data=data.frame(temps$residual)


And I also made an index detailing where observations are available, it looks like this with the first column representing spatial index and the second representing the time index




	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list