MC_logit | R Documentation |
Function simulate given number of rainfall event by Monte-Carlo method and calculate number of overflows in them based on logistic regression model. Rainfall distributions are estimated based on sample data.
MC_logit( dt, logit.model = mod, rt, n = 1000, Imp = NULL, Impu = NULL, Gk = NULL, plot = TRUE )
dt |
data frame, sample of rainfall events based on which rainfall parameters will be estimated |
logit.model |
name of logistic regression for |
rt |
numeric vector of length 2, lower and upper bound of rainfall event duration. See details |
n |
number of simulations |
Imp |
level of imperviousness of the catchment, in %. Default value |
Impu |
the level of imperviousness of the area lying below the analysed catchment, in %. Default value |
Gk |
unitary length of the main collector in the catchment per impervious area, in m/ha. Default value |
plot |
logical, choose is you want to plot CDFs |
You can choose bounds of rainfall event duration, which filter all events to particular type of rainfall (convectional, frontal or convergence zones)
MC_logit
returns number of overflows, CDFs of overflow probability and rainfall intensity for different sets of catchment area parameters
before you use this function you should fit logistic regression for Overflow
dt <- data.frame(P = rgamma(100, shape = 12, rate = 0.2), t = rlnorm(100, meanlog = 5, sdlog = 1.5)) mod <- logit(dt.logit) MC_logit(dt, mod, rt = c(0,150), n = 1000, Imp = 0.2, Impu = 0.1, Gk = 0.05) mod2 <- logit(dt.logit[, c(1:2,6)]) # no Imp, Impu, Gk MC_logit(dt, mod2, rt = c(150,630), n = 1000)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.