Some details fitting the variogram from the DEM data
# some simple least squares fits to the variogram to get an estimate of
# process variance (rho) and the nugget. The nugget is essentially zero
# so using lambda=0 i.e. interpolation would be definsible
# only fit to variogram close to zero.
vgram.matrix( zR, R= 65, dx=dx, dy=dy) -> look
DD<- look$d.full
D2<- DD**2
Y<- look$vgram.full
lm( Y ~ D2)-> out0
lines( DD, predict( out0), col="red",lwd=1.5)
summary(out0) # little evidence for a nugget variance.
good<- DD <= 20
DD<- DD[good]
Y<- look$vgram.full[good]
theta<- 40
X<- (1- Wendland(DD,k=2,theta=theta,dimension=2))
lm( Y ~ X-1)-> out
lines(DD, predict( out) , col="blue", lwd=2)
xt<- seq( 0,50,,150)
lines( xt, out$coefficient[1]*(1- Wendland(xt,k=2,theta=theta,dimension=2)),
col="blue", lty=2)