i have some problems with block kriging. First I create a grid (5000*5000 m). Than i exclude stations, which are very close to each other. The next step is creating the variogram and the fit.variogram. I assign the projection and the coordinates. After that, the krige function is working for ordninary kriging.
x_2 <-as.integer(range(data$x))
y_2 <-as.integer(range(data$y))
grid_1 <-expand.grid(x=seq(from=x_2[1],to=x_2[2], by=5000),y=seq(y_2[1],to=y_2[2],by=5000))
coordinates(grid_1) <- ~x+y #Koordinaten zuweisen, Variablennamen festlegen, auf die man sich bezieht)
gridded(grid_1) =TRUE
grid.stats <- data.frame(data)[,1:2]
coordinates(grid.stats) <- ~x+y
ind.zd <- zerodist(grid.stats)
data.new <- data[-ind.zd,]
p.sill <- var(log(data.new$variable+0.1)) #0.4005127
nugget <- var(log(data.new$variable+0.1))/2 #0.2002564
vgm_data <- variogram(log(variable+0.1)~1, ~x+y, data.new)
m.fit <- fit.variogram(vgm_data, vgm(0.4, "Sph", 1000000, 0.2))
coordinates(data.new) <- ~x+y
krig_1 <- krige(log(variable+0.1)~x+y, data.new, grid_1, nmax=7, nmin=4, m=m.fit)
krig_block <- krige(log(variable+0.1)~1, data.new, grid_1, m=m.fit, block =c(5000/5000))
I try to add "block" for block kriging, but I don´t get any result. Is there somebody who knows my problem? Any help would be really useful, thanks in advance. Kind regards