我正在研究Temporal-spatio数据。数据采用STFDF结构。
我正处于应用变异函数的阶段,并尝试从变异函数图中确定看起来像的Nugget,Sill和Range。
plot(vario, main="Flow")
plot(vario,map=FALSE, main="Spatio-temporal correlation")
plot(vario,wireframe=T, main="Spatio-temporal correlation")
如何获得可以定义范围,窗台和金块的情节!我无法从这些图中定义我的参数。 我使用了variogramST函数,并尝试了太变差函数,但两者都无法生成我需要的情节。
vario<-variogramST(Flow~1,data=data,tunit="hours",assumeRegular=F,na.omit=T)
有没有办法定义Range,Nugget和sill ??
####### separable model, least squares fit
separableModel <- vgmST("separable",space=vgm(0.9,"Exp",100,0.1),time=vgm(0.9,"Exp",1000,0.1),sill=40)
separable_fit <- fit.StVariogram(model=separableModel,object=vario)
plot(vario,separable_fit,all=T,map=F)
attr(separable_fit,"MSE") # calculate the Mean Absolute Error
### product sum model, least squares fit
ProductSum <- vgmST("productSum",space =vgm(psill= 15000,"Exp",range= 0.07, nugget= 0),time=vgm(psill= 7500,"Exp",range= 0.07, nugget=0),k=0.000649771173341919)
ProductSum_fit <- fit.StVariogram(model=ProductSum,object=vario)
ProductSum_fit
attr(ProductSum_fit,"MSE")
plot(vario,ProductSum_fit,all=T,map=F)
plot(vario,ProductSum_fit,all=T)
plot(vario,ProductSum_fit, all=T, wireframe=T)
#### product sum model, manual fit
ProductSum_man <- vgmST("productSum",space=vgm(7500,"Exp",2e5,0,add.to=vgm(10,"Exp",9e3,0)), time=vgm(7500,"Exp",800,9.5,add.to=vgm(0,"Exp",850,0)),k=0.035)
ProductSum_man_fit <- fit.StVariogram(model=ProductSum_man,object=vario)
attr(ProductSum_man_fit,"MSE")
plot(vario,ProductSum_man_fit,all=T,map=F)
plot(vario,ProductSum_man_fit,all=T)