Skip to content
Prev 310614 / 398506 Next

How to generate a random field with truncated marginal distributions?

Zhenglei Gao <zhenglei.gao <at> bayer.com> writes:
As I suggested on Stack Overflow, I don't think this is a simple
question: you can pick values according to a normal distribution and
then squash them into a truncated normal distribution: something like

olddata <- GaussRF(...)
library(truncnorm)
newdata <- qtruncnorm(pnorm(olddata))

  However, this may very well modify the range; I don't know.
If I were you, I would try it and see if you can live with the 
results.  If not, ask on http://stats.stackexchange.com