Skip to content

how can I add back transformation for ploting

2 messages · Saman Monfared, Paulo Justiniano Ribeiro Jr

#
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.
#
A general approach is by using the (conditional) simulations

  - perform prediction obtaining conditional simulations
  - back transform the simulations (inverse box-cox transform)
  - obtains the summaries from the transformed values (such as the mean for 
the "kriged"map on the original scale

P.J.
On Thu, 12 Jan 2012, Saman Monfared wrote: