[R-sig-Geo] Prediction with krigeST

Benedikt Gräler ben.graeler at uni-muenster.de
Wed Nov 6 17:16:28 CET 2013


Dear Jun,

the reason why you get a constant map for your forecast is most likely
associated with the temporal range of your model (note that krigeST
might expect a different temporal unit (typically seconds) than was used
in the variogram model definition). If you do not have any locations
within the range, the kriging estimate is the mean of the random field.
To allow for a changing mean with time, you might want to limit the
kriging prediction to few temporal slices. However, extrapolation (i.e
forecasting) is a topic with several challenges and potential pitfalls -
kriging might not be the best choice here.

Hope this helps,

 Ben

On 06.11.2013 12:45, Jun HU wrote:
> Dear Benedikt, 
> 
> Thank a lot for your reply. I found my problem which is associated with
> newdata, actually i've used same time series in newdata. After creating
> the new time series, I got the prediction results, but the values are
> all same, I thought it's the problem of my variogram model. Currently, I
> attempt to apply the spatiotemporal model in predicting mobile network
> traffic.  As i've the historical traffic data for each mobile network
> cells, I attempt to forecast the traffic in following hours.  Here is a
> snapshot of my data:
> 
> 5847 	15056 	8 	0 	121 	117
> 5807 	15065 	1 	3 	131 	131
> 5847 	15035 	22 	18 	898 	1123
> 5830 	15067 	12 	18 	197 	231
> 5861 	15036 	3 	7 	189 	185
> 5874 	15053 	6 	5 	113 	105
> 5859 	15020 	116 	49 	1270 	1493
> 
> 
> 
> First two columns are the position of mobile station (x, y), the
> following four columns are the traffic between (00:00 - 03:00), I've
> converted it into STFDF data, with (x,y) as sp, and a list of four
> columns data as data. Also I'd like to your advices on my approach to
> predict the traffic in mobile network. Thank you in advance. 
> 
> 
> 
> Sincerely, 
> 
> 
> Jun
> 
> 
> 
> 2013/11/6 Benedikt Gräler <ben.graeler at uni-muenster.de
> <mailto:ben.graeler at uni-muenster.de>>
> 
>     Dear Jun,
> 
>     that is hard to tell without knowing the structure of your "data" and
>     "newdata" objects. I was not able to reproduce your issue with our test
>     cases and would suspect some NA values to cause it. Please note that the
>     latest version of gstat (available from r-forge), does as well support
>     STSDF and STIDF allowing for non regular data sets.
> 
>     In case the problem persists in the latest version of gstat (1.0-18)
>     using a STSDF, please provide me (offlist) with some additional
>     information on your R set-up (sessionInfo()), the structure of your data
>     and a minimal example reproducing the issue.
> 
>     Best wishes,
> 
>      Ben
> 
> 
>     On 06.11.2013 10:18, Jun HU wrote:
>     > Dear all,
>     >
>     > I'm new in R and Spatiotemporal kriging,  I've a naive question, I've
>     > constructed a STFDF object with the first 4 hours historical data,
>     and want
>     > to forecast the fifth hour data. By using krigeST in R, I've
>     constructed
>     > vgm model. But after launching:
>     >
>     > pred = krigeST(formula=values~1, data=mystfdf, newdata = My_pred,
>     > modelList=myVgm)
>     >
>     > everything seems working fine, but the pred object only contains
>     historical
>     > data, without prediction data. Any idea? Thank you in advance.
>     >
>     >
>     >
>     > Sincerely,
>     >
>     >
>     > Jun
>     >
>     >       [[alternative HTML version deleted]]
>     >
>     > _______________________________________________
>     > R-sig-Geo mailing list
>     > R-sig-Geo at r-project.org <mailto:R-sig-Geo at r-project.org>
>     > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>     >
> 
>     --
>     Benedikt Gräler
> 
>     ifgi - Institute for Geoinformatics
>     University of Muenster
> 
>     http://ifgi.uni-muenster.de/graeler
> 
>     Phone: +49 251 83-33082 <tel:%2B49%20251%2083-33082>
>     Mail: ben.graeler at uni-muenster.de <mailto:ben.graeler at uni-muenster.de>
> 
> 
>     _______________________________________________
>     R-sig-Geo mailing list
>     R-sig-Geo at r-project.org <mailto:R-sig-Geo at r-project.org>
>     https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 
> 

-- 
Benedikt Gräler

ifgi - Institute for Geoinformatics
University of Muenster

http://ifgi.uni-muenster.de/graeler

Phone: +49 251 83-33082
Mail: ben.graeler at uni-muenster.de



More information about the R-sig-Geo mailing list