Hi all,

After CSGS realization, I like to calculate proportion of simulated values exceeding a particular thresh values.(Suppose in a prediction grid, out of ten realizations, in five realizations- simulated value exceed a target threshold value, here proportion is 0.5). I want all calculate this proportion in all by prediction grid. If some help me write the code - it will help me a lot. Here meuse data example:
Thanks


library(gstat)
data(meuse)
data(meuse.grid)
coordinates(meuse) = ~x + y
coordinates(meuse.grid) = ~x + y

# Variogram log Zn

lzn.vgm = variogram(log(zinc) ~ 1, meuse)
lzn.fit = fit.variogram(lzn.vgm, model = vgm(1, "Sph", 900, 1))

#Conditional simulation

nsim = 10
lzn.sim = krige(log(zinc) ~ 1, meuse, meuse.grid, model = lzn.fit, nmax = 30, nsim = nsim)

# target values.
###########
target.zn <- log(100)




<<attachment: zua3.vcf>>

_______________________________________________
R-sig-Geo mailing list
[email protected]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo

Reply via email to