normalizeGaussian_prec {RMAWGEN} | R Documentation |
Converts precipitation values to "Gaussinized" normally-distributed values taking into account the probability of no precipitation occurrences. values
or vice versa in case inverse
is TRUE
Description
Converts precipitation values to "Gaussinized" normally-distributed values taking into account the probability of no precipitation occurrences. values
or vice versa in case inverse
is TRUE
Usage
normalizeGaussian_prec(x = 0, data = x, cpf = NULL, mean = 0,
sd = 1, inverse = FALSE, type = 3, extremes = TRUE,
sample = NULL, qnull = 0, valmin = 1)
Arguments
x |
value or vector of values to be converted |
data |
a sample of data on which a non-parametric probability distribution is estimated |
cpf |
cumulative probability distribution. If |
mean |
mean (expected value) of the normalized random variable. Default is 0. |
sd |
standard deviation of the normalized random variable. Default is 1. |
inverse |
logical value. If |
type |
see |
extremes |
logical variable.
If
where |
sample |
a character string or |
qnull |
probability of no precipitation occurrence |
valmin |
minimum value of precipitation to consider a wet day |
Value
the normalized variable or its inverse
Note
In the version 1.2.5 of RMAWGEN This function is deprecated and not used.
Author(s)
Emanuele Cordano, Emanuele Eccel
See Also
Examples
library(RMAWGEN)
NDATA <- 1000
occurrence <- as.logical(runif(NDATA)>0.5)
prec <- rexp(NDATA,rate=1/3)
prec[!occurrence] <- 0
valmin <- 0.5 #0.01
x <- normalizeGaussian_prec(x=prec,valmin=valmin)
prec2 <- normalizeGaussian_prec(x=x,data=prec,valmin=valmin,inverse=TRUE)
qqplot(prec,prec2)
occurrence3 <- as.logical(runif(NDATA)>0.5)
prec3 <- rexp(NDATA,rate=1/3)
prec3[!occurrence3] <- 0
x3 <- normalizeGaussian_prec(x=prec3,valmin=valmin)
qqplot(x,x3)
abline(0,1)