[R-sig-Geo] how can I add back transformation for ploting
Saman Monfared
samanmonfared1 at gmail.com
Thu Jan 12 12:24:13 CET 2012
Hi.
How can I add back a transformation in cokriging??
dd<-read.table("besss.txt",header=TRUE)
summary(dd)
*my target variable is B*
I used box-cox transformation by lambda=-.14
d<-((dd$B)^-.14-1)/-.14 then used transformed data to cross variography:
m<-vgm( 0.22493303,"Gau",78006.24,0,cutoff=100607.2, width = 100607.2/12)
g <- gstat(NULL, id = " d", form = d ~1,data=dd,fill.cross = F)
g <- gstat(g, id = "A", form = A~1,data=dd,fill.cross = F)
g <- gstat(g, id = "T", form = T~ 1,data=dd,fill.cross = F)
vm <- variogram(g,covariance=F)
plot(vm)
vm.fit <- fit.lmc(vm, g, model=m,fit.ranges =F)
nc.sids <- readShapePoly("City Boundary.shp")
pts <- spsample(nc.sids, n=3000, type="regular")
grd<-data.frame(pts)
gridded(grd)<-~x1+x2
pp<-predict(vm.fit,grd)
pp is prediction for transformed data
how can I add back the transformation for ploting by
image(pp,1) and countour(pp,1,add=T)??
Thanks.
--
Saman Monfared
Msc Student,
Department of Statistics, Shiraz University,
Shiraz 71454, Iran
Email: Samanmonfared1 at gmail.com
Tel: +98 917 5305167
More information about the R-sig-Geo
mailing list