Description Usage Arguments Value Note Author(s) See Also Examples
View source: R/normalizeGaussian_sevaralstations.R
Converts several samples x
random variable extracted by populations represented by the columns of data
respectively or sample
to a normally-distributed samples with assinged mean and standard deviation or vice versa in case inverse
is TRUE
1 2 3 4 |
x |
value 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 |
step |
vector of values in which step discontinuities of the cumulative probability function occur. Default is |
prec |
amplitude of the neighbourhood of the step discontinuities where cumulative probability function is treated as non-continuous. |
type |
see |
extremes |
logical variable.
If \frac{N}{N+1} where N is the length of |
sample |
information on how to sample |
origin_x |
date corresponding to the first row of |
origin_data |
date corresponding to the first row of |
a matrix with the normalized variable or its inverse
It applies normalizeGaussian
for each column of x
and data
.
See the R code for further details
Emanuele Cordano, Emanuele Eccel
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 | ## Not run:
library(RMAWGEN)
set.seed(1234)
N <- 30
x <- rexp(N)
y <- x+rnorm(N)
df <- data.frame(x=x,y=y)
dfg <- normalizeGaussian_severalstations(df,data=df,extremes=TRUE,inverse=FALSE)
dfi <- normalizeGaussian_severalstations(dfg,data=df,extremes=TRUE,inverse=TRUE)
N <- 365*2
origin <- "1981-01-01"
x <- rexp(N)
y <- x+rnorm(N)
df <- data.frame(x=x,y=y)
dfgm <- normalizeGaussian_severalstations(df,data=df,extremes=TRUE,
inverse=FALSE,origin_x=origin,origin_data=origin,sample="monthly")
dfim <- normalizeGaussian_severalstations(dfg,data=df,extremes=TRUE,
inverse=TRUE,origin_x=origin,origin_data=origin,sample="monthly")
## Compatibility with 'lubridate' package
library(lubridate)
N <- 30
x <- rexp(N)
y <- x+rnorm(N)
df <- data.frame(x=x,y=y)
dfg <- normalizeGaussian_severalstations(df,data=df,extremes=TRUE,inverse=FALSE)
dfi <- normalizeGaussian_severalstations(dfg,data=df,extremes=TRUE,inverse=TRUE)
N <- 365*2
origin <- "1981-01-01"
x <- rexp(N)
y <- x+rnorm(N)
df <- data.frame(x=x,y=y)
dfgm <- normalizeGaussian_severalstations(df,data=df,extremes=TRUE,
inverse=FALSE,origin_x=origin,origin_data=origin,sample="monthly")
dfim <- normalizeGaussian_severalstations(dfg,data=df,extremes=TRUE,
inverse=TRUE,origin_x=origin,origin_data=origin,sample="monthly")
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.