params2ecdf | R Documentation |
This function computes (weighted) empirical CDFs (ECDFs) for each calibrated parameter, by using the parameter values obtained during the optimisation with hydroPSO
(with optional plot)
params2ecdf(params, ...)
## Default S3 method:
params2ecdf(params, param.names=NULL, gofs=NULL, MinMax=NULL,
beh.thr=NA, weights=NULL, byrow=FALSE, plot=TRUE, obs=NULL, main=NULL,
nrows="auto", ylab="Probability", col="blue", leg.cex=1.2,
leg.pos="topleft", cex.axis=1.2, cex.main=1.2, cex.lab=1.2,
verbose=TRUE, ..., do.png=FALSE, png.width=1500, png.height=900,
png.res=90, png.fname="Params_ECDFs.png")
## S3 method for class 'matrix'
params2ecdf(params, param.names=colnames(params), gofs=NULL,
MinMax=NULL, beh.thr=NA, weights, byrow=FALSE, plot=TRUE, obs=NULL,
main=NULL, nrows="auto", ylab="Probability", col="blue", leg.cex=1.2,
leg.pos="topleft", cex.axis=1.2, cex.main=1.2, cex.lab=1.2,
verbose=TRUE, ..., do.png=FALSE, png.width=1500, png.height=900,
png.res=90, png.fname="Params_ECDFs.png")
## S3 method for class 'data.frame'
params2ecdf(params, param.names=colnames(params), gofs=NULL,
MinMax=NULL, beh.thr=NA, weights, byrow=FALSE, plot=TRUE, obs=NULL,
main=NULL, nrows="auto", ylab="Probability", col="blue", leg.cex=1.2,
leg.pos="topleft", cex.axis=1.2, cex.main=1.2, cex.lab=1.2,
verbose=TRUE, ..., do.png=FALSE, png.width=1500, png.height=900,
png.res=90, png.fname="Params_ECDFs.png")
params |
matrix or data.frame with the parameter values, where each row represent a different parameter set and each column represent the value of a different model parameter |
param.names |
character vector, names to be used for each parameter in |
gofs |
OPTIONAL. numeric with the values of goodness-of-fit values for each parameter in |
MinMax |
OPTIONAL. character, indicates if the optimum value in |
beh.thr |
numeric, used for selecting only the behavioural parameter sets, i.e. those with a goodness-of-fit value (as given in |
weights |
numeric vector, values of the weights to be used for computing the empirical CDFs |
byrow |
logical, indicates whether the computations have to be made for each column or for each row of |
plot |
logical, indicates whether a plot with the Empirical CDF for each model's parameter has to be produced or not |
obs |
OPTIONAL. Only used when |
main |
an overall title for the plot |
nrows |
OPTIONAL. Only used when |
ylab |
OPTIONAL. Only used when |
col |
OPTIONAL. Only used when |
leg.cex |
OPTIONAL. Only used when |
leg.pos |
OPTIONAL. Only used when |
cex.axis |
OPTIONAL. Only used when |
cex.main |
OPTIONAL. Only used when |
cex.lab |
OPTIONAL. Only used when |
verbose |
logical, if TRUE, progress messages are printed |
... |
further arguments passed to the |
do.png |
logical, indicates if all the figures have to be saved into PNG files instead of the screen device |
png.width |
OPTIONAL. Only used when |
png.height |
OPTIONAL. Only used when |
png.res |
OPTIONAL. Only used when |
png.fname |
OPTIONAL. Only used when |
a list with nparam
elements, where is the number of parameters given in params
, computed as the number of columns in params
.
Each element of the list contains the (weighted) empirical CDFs (ECDFs) for each parameter in params
.
Additionally, if plot=TRUE
a maximum of nfigs different figures with the Empirical CDF for each model's parameter is produced, where the maximum number of figures to be produced is computed as nfigs=ceiling(nparam/21)
.
Mauricio Zambrano-Bigiarini, mzb.devel@gmail.com
wtd.Ecdf
, quant2ecdf
## Not run:
# Setting the user's home directory as working directory
setwd("~")
# matrix with 100 random uniform parameter sets (in rows) for 10 different model's
# parameters (in columns)
params <- matrix(rnorm(1000), ncol=10, nrow=100)
colnames(params) <- paste("Param", 1:10, sep="")
# empirical CDFs for each one of the 10 parameters in 'params', with equal weight
# for each one of the 100 parameter sets
params2ecdf(params, weights=rep(1,100))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.