变异函数迭代警告

时间:2017-10-31 01:50:02

标签: r kriging gstat

我想从我拥有的数据集中使用变量调用“Secchi.Disk”执行克里金法。但是,在拟合变异函数时,我得到以下加温消息

Warning message:
In fit.variogram(v, vgm(0.5, "Sph", 40, 0.5)) :
  No convergence after 200 iterations: try different initial values?

我一直在为部分窗台,范围和金块尝试不同的值;但是,我仍然收到相同的警告信息。这是我的代码

library(rgdal)     
library(ggplot2)   
library(ggmap)
library(GISTools)
library(sp)
library(spdep)
library(gstat)

all.data<-read.csv("C:/Users/Juan/Desktop/All_Data_Fall_17.csv", header=TRUE)
str(all.data)
dput(all.data)
coordinates(all.data)<- ~ Lat + Lon
class(all.data)

#Variogram
#Secchi
v <- variogram(all.data$Secchi.Disk~1, all.data)
plot(v)
v.fit <- fit.variogram(v, vgm(0.5,"Sph",40,0.5))

输出str(all.data)

Formal class 'SpatialPointsDataFrame' [package "sp"] with 5 slots
  ..@ data       :'data.frame': 12 obs. of  11 variables:
  .. ..$ Sample.ID  : Factor w/ 12 levels "CL-1","CL-10",..: 1 5 6 7 8 9 10 11 12 2 ...
  .. ..$ Temp       : num [1:12] 23 26.1 25.1 24.9 24.4 ...
  .. ..$ TDS        : num [1:12] 0.542 0.517 0.53 0.542 0.535 0.535 0.539 0.527 0.536 0.536 ...
  .. ..$ pH         : num [1:12] 8.08 8.74 8.67 8.51 8.69 8.7 8.56 8.75 8.63 8.6 ...
  .. ..$ ODOsat     : num [1:12] 60.9 216.1 156.7 112.6 114.8 ...
  .. ..$ TSS        : num [1:12] 68.3 68.8 67.5 65.4 56 ...
  .. ..$ TP         : num [1:12] 3.27 3.05 4.02 2.99 3.25 3.17 3.27 3.15 4.02 3.38 ...
  .. ..$ TN         : num [1:12] 13 12.4 12 12.4 15 12.6 12.4 12.4 12 13.6 ...
  .. ..$ NO3.N      : num [1:12] 2.71 3.02 2.71 1 2.58 1.35 1.66 1.88 4.07 4.16 ...
  .. ..$ Chloro.a   : num [1:12] 274 464 416 375 236 ...
  .. ..$ Secchi.Disk: int [1:12] 18 15 16 15 15 15 17 16 16 17 ...
  ..@ coords.nrs : int [1:2] 2 3
  ..@ coords     : num [1:12, 1:2] 334374 334381 334391 334423 334426 ...
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:12] "1" "2" "3" "4" ...
  .. .. ..$ : chr [1:2] "Lat" "Lon"
  ..@ bbox       : num [1:2, 1:2] 334374 4088924 334489 4089041
  .. ..- attr(*, "dimnames")=List of 2
  .. .. ..$ : chr [1:2] "Lat" "Lon"
  .. .. ..$ : chr [1:2] "min" "max"
  ..@ proj4string:Formal class 'CRS' [package "sp"] with 1 slot
  .. .. ..@ projargs: chr NA

有关如何解决此问题的任何想法? 谢谢

0 个答案:

没有答案