tag:blogger.com,1999:blog-1442302563171663500.post537520237784766829..comments2023-10-14T15:58:07.881+02:00Comments on R tutorial for Spatial Statistics: Spatio-Temporal Kriging in RFabio Veronesihttp://www.blogger.com/profile/07827549157455488947noreply@blogger.comBlogger30125tag:blogger.com,1999:blog-1442302563171663500.post-12525393890774689912018-09-20T03:12:51.300+02:002018-09-20T03:12:51.300+02:00hello, really great post. but I have some trouble....hello, really great post. but I have some trouble. when I run this code in R, that show like this :<br />-----<br />var <- variogramST(PPB~1,data=timeDF,tunit="hours",assumeRegular=F,na.omit=T)<br />Error in .C("sp_dists", x, y, xx, yy, n, dists, lonlat, PACKAGE = "sp") : <br /> "sp_dists" not available for .C() for package "sp"<br />----<br />anyone can help me to solve this problem ?Rauzanhttps://www.blogger.com/profile/11417610380416269954noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-81379864152138287492018-05-23T21:08:48.991+02:002018-05-23T21:08:48.991+02:00Hello! Good tutorial!
I have readed your comment a...Hello! Good tutorial!<br />I have readed your comment about this sentence:<br />var <- variogramST(PPB~1,data=timeDF,tunit="hours",assumeRegular=F,na.omit=T) <br />And really the documentation is confusing. You are saying that the variable PPB will be evaluated to compute the spatio temporal variogram, that variable is in the timeDF dataset, and the parameter 'hours' must to coincide with the time unit of the data, that is with the time unit of the slot timeDF@time... Or simply leave it as default, and unit will be catched automatically if it was specified during the construction of the spatio-temporal array (the STIDF class in this case). The idea is to compute correctly the time intervals between observations, specially in this case where the time intervals are not equals... <br />Regards!Mati Castillohttps://www.blogger.com/profile/06515924773713608668noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-72661139813355757202018-03-22T10:29:55.811+01:002018-03-22T10:29:55.811+01:00Hi Angie,
I had the same issue recently. I think t...Hi Angie,<br />I had the same issue recently. I think this function was recently updated.<br />It may be that now we need to use par<br /><br />FabioFabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-46839489722233371412018-03-21T22:56:13.650+01:002018-03-21T22:56:13.650+01:00Grazie! I am really enjoying this article!
One mor...Grazie! I am really enjoying this article!<br />One more question please: when I try to print the empirical variogram side to side with the variogram model with "plot(var,separable,map=F)" I only see the separable model. Are there any options I need to check in order to plot in the same way as you did?<br />Anonymoushttps://www.blogger.com/profile/14660365463410037508noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-71798295040753761862018-02-07T10:36:34.701+01:002018-02-07T10:36:34.701+01:00Hi Angie,
I checked the website and the dataset is...Hi Angie,<br />I checked the website and the dataset is still available. You just need to scroll down to the "data" section.<br />The direct link is: http://www.opensense.ethz.ch/trac/chrome/site/wiki_public/misc/ozon_tram1_14102011_14012012.csv<br /><br />Regards,<br />FabioFabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-49073148421106575652018-02-02T16:33:37.912+01:002018-02-02T16:33:37.912+01:00Help, does anyone have a copy of the ozone dataset...Help, does anyone have a copy of the ozone dataset?<br />It can't be downloaded anymore from the siteAnonymoushttps://www.blogger.com/profile/14660365463410037508noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-91200604664961630432017-11-21T14:00:52.535+01:002017-11-21T14:00:52.535+01:00Hi
It was a greate tutorial. I have a question abo...Hi<br />It was a greate tutorial. I have a question about assigning lower, upper and control parameters. How we should choose them?<br />Also when i select fit.method=7 in fit.stvariogram the error bellow will be appear:<br />Error in optim(extractPar(model), fitFun, ..., method = method, lower = lower, : <br /> L-BFGS-B needs finite values of 'fn'<br />Do you know what is the problem?<br />Thanks alot.Anonymoushttps://www.blogger.com/profile/03619042056503610225noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-25078904470417352462017-10-07T20:15:12.778+02:002017-10-07T20:15:12.778+02:00a great tutorial sir. i have been trying to implem...a great tutorial sir. i have been trying to implement the same on the same dataset as well as on another dataset, but the problem is that the variogramST only executes for 7 percent in some cases, or upto 93 % and stops (finishes) at the same time the var variable will be having only 225 rows and many missing values. what might be the problem . the other dataset iam using has coordinates in the form (41.99549241934282, -87.76960894532459), could it be a problem for this method. another fact about my data is that the coordinates are repeating since it is 10 year period data for each location, and monthly observations are done from may till december.Anonymoushttps://www.blogger.com/profile/05230874210761595216noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-40329736878494872072017-09-10T08:57:57.228+02:002017-09-10T08:57:57.228+02:00Hi Fabio,
Thanks for the useful tutorial! And have...Hi Fabio,<br />Thanks for the useful tutorial! And have you ever surveyed other resource online about Kiring on the roads? Because I wanna know more about value of geospatial point at different time point, like n(location)*m(timing). But I cannot find the more detailed resource, could you do me a favor?<br />Cheers,<br />ShakoAnonymoushttps://www.blogger.com/profile/15705753896526048808noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-78632729855532589502017-03-07T18:45:43.878+01:002017-03-07T18:45:43.878+01:00Hi, could i have your data set? i have some proble...Hi, could i have your data set? i have some problems, but i think it could be produced by data frame... thanksss!<br /><br />Pd: do you have some book about spatial-temporal, with repeated measures ? Anonymoushttps://www.blogger.com/profile/01039421948231082679noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-74211815296535530602016-12-13T13:04:02.700+01:002016-12-13T13:04:02.700+01:00Hi Darren,
Thank you for your comment.
I would say...Hi Darren,<br />Thank you for your comment.<br />I would say the best place to start gathering more information are the references I suggested in the post. Unfortunately, this is still a niche topic so there not much out there in terms of guidelines.<br />The only thing I can say for interpreting the spatio-temporal autocorrelation is that it is probably better to look at the 3D wireframe. This plot allows us to better observe the relation between time and variograms. With these data for example, we can observe an increase with time of the variogram sill. In other examples, e.g. http://geostat-course.org/system/files/part01.pdf, this is not the case.<br />I hope this helps you with your research.<br />Cheers,<br />FabioFabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-81229608889011029672016-12-12T19:21:54.537+01:002016-12-12T19:21:54.537+01:00Hi Fabio,
Thanks for the great tutorial. I am just...Hi Fabio,<br />Thanks for the great tutorial. I am just starting to use the packages for space -time analysis. Are you able to suggest links to help understanding the graphs produced in the section "Plotting the Variogram"? Is it possible interpret these graphs in terms of spatial temporal autocorrelation? If so, what is the interpretation for the data you present e.g. result of plot(var,map=F)?Darren Norrishttps://www.blogger.com/profile/05752320889875727031noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-51396519717370878352016-12-02T13:25:37.822+01:002016-12-02T13:25:37.822+01:00Hi,
The function projection is included in the pac...Hi,<br />The function projection is included in the package raster. However, it is just a wrapper for the function proj4string, so your approach is fine.<br />Fabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-50143648074985110332016-12-02T12:14:52.583+01:002016-12-02T12:14:52.583+01:00Hi Fabio,
Thank you for a great blog which includ...Hi Fabio,<br /><br />Thank you for a great blog which includes all the detail necessary with some good explanations that show your understanding in this. I hit a problem when running the line "projection(data)=CRS("+init=epsg:4326")" as the projection() function doesn't exist in the base library or the ones you listed above. I tried it with proj4string() from the sp library, therefore "proj4string(data)=CRS("+init=epsg:4326")" which seemed to work. Maybe sp has updated since you wrote this blog?Tim Pollingtonhttps://www.blogger.com/profile/08327057417881489803noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-41960836751157365042016-12-02T12:14:28.175+01:002016-12-02T12:14:28.175+01:00This comment has been removed by the author.Tim Pollingtonhttps://www.blogger.com/profile/08327057417881489803noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-24609739330221705382016-09-10T08:52:07.124+02:002016-09-10T08:52:07.124+02:00Hi,
The dataset I used is available on the website...Hi,<br />The dataset I used is available on the website of the OpenSense project:<br />http://www.opensense.ethz.ch/trac/wiki/WikiStart<br /><br />The direct links to 2 free datasets you can use for testing are:<br />http://www.opensense.ethz.ch/trac/chrome/site/wiki_public/misc/ozon_tram1_14102011_14012012.csv<br /><br />http://www.opensense.ethz.ch/trac/chrome/site/wiki_public/misc/pm_tram1_14102011_14012012.csv<br /><br />Best regards,<br />FabioFabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-37468441742462122982016-09-09T21:09:11.446+02:002016-09-09T21:09:11.446+02:00Great Tutorial! I was wondering if if you could at...Great Tutorial! I was wondering if if you could attach the data you used here (csv format) ? Thanks Anonymoushttps://www.blogger.com/profile/04791238995382092444noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-38195603244281986872016-05-04T21:02:11.554+02:002016-05-04T21:02:11.554+02:00Excellent tutorial. It is a new content. In my the...Excellent tutorial. It is a new content. In my thesis I will work with this content. Very good!<br />Eliashttps://www.blogger.com/profile/15769107742414191287noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-75496080916872786912015-12-10T07:44:18.228+01:002015-12-10T07:44:18.228+01:00If the time stamp is different there should not be...If the time stamp is different there should not be any problem.<br />It seems that your research is similar to Gräler (2002), which is the first image in the introduction.<br />If you need any help with the code you can contact me from my website: www.fabioveronesi.netFabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-25384871093617952402015-12-10T06:03:48.306+01:002015-12-10T06:03:48.306+01:00Dear Fabio,
Thank you for sharing this tutorial. ...Dear Fabio,<br /><br />Thank you for sharing this tutorial. I'm new to spatio-temporal kriging and have a question regarding duplicated points. My data is monthly repeated measurement at exactly same coordinate for each locations. In your post, it was said that kriging cannot handle this issue. Could you please give me any suggestion?<br /><br />Regards,<br />ZahraAnonymoushttps://www.blogger.com/profile/06078436605640603542noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-7776360602329650532015-10-28T18:59:48.273+01:002015-10-28T18:59:48.273+01:00This comment has been removed by the author.Anonymoushttps://www.blogger.com/profile/16346152085738864024noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-31953818786798708222015-10-07T11:28:19.205+02:002015-10-07T11:28:19.205+02:00Yes I guess this makes sense now. Thanks! this hel...Yes I guess this makes sense now. Thanks! this helped a lot! :)Bayanhttps://www.blogger.com/profile/12585098390176400114noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-88408964200440345402015-10-07T11:25:54.854+02:002015-10-07T11:25:54.854+02:00I think that if you have an observation every 10 m...I think that if you have an observation every 10 minutes and you compute the variogram with tunit="hours", R will aggregate the 10 minutes data for each hour in your dataset.<br />If you use tunit="minutes" it will use the actual observations, without aggregating them. That is why the process is faster. However, this may create NAs because there are space-time intervals without observations.<br />That was my personal conclusion.Fabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-39721506864230861122015-10-07T11:11:40.609+02:002015-10-07T11:11:40.609+02:00So correct me if I'm wrong, tunit = "hour...So correct me if I'm wrong, tunit = "hours" means that If I have data from 7 days, it will combine 7 measurements from each hour in each day? If this is the case then combining them into minutes would take a lot more time, contrary to what I experienced when I replaced "hours" with "mins"..and if I'm reading data of only one day, variogramST would give an error with tunit = "hours" but would work fine with "mins" and results with some NA values in varBayanhttps://www.blogger.com/profile/12585098390176400114noreply@blogger.comtag:blogger.com,1999:blog-1442302563171663500.post-49074182484243456732015-10-07T11:00:28.981+02:002015-10-07T11:00:28.981+02:00I experienced the same sort of issue when I was pr...I experienced the same sort of issue when I was preparing the code for the post.<br />I concluded that it may be caused by the tunit you are using for the variogram.<br />For example, if I used "minutes" in the variogram I had the same problem. If the variogram aggregates the data in hours this does not happen, but the variogram computation is more time-consuming.<br />Fabio Veronesihttps://www.blogger.com/profile/07827549157455488947noreply@blogger.com