[R-sig-Geo] Fw: Kriging

KABELI MEFANE kabelimefane at yahoo.co.uk
Wed Aug 26 12:10:48 CEST 2009


 





Hi all
 
Please help and correct me, to predict Z(S0) at (0.5,0.5) given Z(S1) = 3 at (0,0), Z(S2) = 5 at(0,1), Z(S3) = 6(1,0) and Z(S4) = 4(1,1). Let 
γ (h)=h^2  h<1 
       = 1     h>=1 using geo. 
  
I did this: coords<-matrix(c(0,0,1,1,0,1,0,1), nrow=4, ncol=2)
> data<-c(3,5,6,4)
> coordata<-data.frame(coords=coords,data=data)
> geo<-as.geodata(coordata)
> plot(geo$coords, xlim = c(0, 1.2), ylim = c(0,1.2),
+     xlab = "X-axis", ylab = "Y-axis")
> locations<- matrix(c(0.5, 0.5), ncol = 2)
> text(locations, as.character(0), col = "red")
> polygon(x = c(0, 1, 1, 0), y = c(0, 0, 1, 1),lty = 2)
> szero<- krige.conv(geo, locations=locations,
+         krige=krige.control(cov.pars=c(1,1))) 
  
how do i show this points, lines and values on the gragh like it was done an erview of spatial statistics by Brian Vinyard slides 40 or something similar?.

 


      
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090826/72f00547/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: kriging.doc
Type: application/octet-stream
Size: 27648 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-sig-geo/attachments/20090826/72f00547/attachment.obj>


More information about the R-sig-Geo mailing list