BLRPM.est estimates the five Bartlett-Lewis rectangular pulse model parameters lambda,gamma,beta,eta,mux
for a given time series data. At first the time series statistics at given accumulation levels acc.vals
are calculated. These statistics are given over to the parameter estimation algorithm together with
parameter starting values par. An objective function O.Fun can be specified, default is BLRPM.OF.
In addition the weights for different statistics and accumulation levels weights.mean, weights.var, weights.cov, weights.pz
can be specified. For the BLRPM objective function the user can select the measure of distance between observation
and model with OF: =1 quadratic, =2: quad extended, =3: absolute, =4: abs extended.
A scale parameter controls different cases in the objective function for differences in the scale of duration
parameters gamma and eta.
If a debugging is wished, debug can be set to TRUE and a log file is created in working directory.
Several optim parameters can be also defined. For specifics see ?optim.
BLRPM.est(RR,acc.vals,pars.in,O.Fun,
weights.mean,weights.var,weights.cov,weights.pz,OF,debug,
scale,method,lower,upper,use.log,maxit,ndeps,trace)vector of a precipitation time series
vector of different accumulation levels at which statistics are to be calculated
vector specifying starting values of lambda,gamma,beta,eta,mux for optimization
objective function to be used during optimization
value for weight for mean value at first accumulation level
vecotr of weights for variances, has to have length(acc.vals)
vecotr of weights for covariances, has to have length(acc.vals)
vecotr of weights for probability of zero rainfall, has to have length(acc.vals)
value specifying the type of objective function. 1: quadratic, 2: quad symmetrized, 3: absolute, 4: abs symmetrized
Note: quadratic symmetrized proofed to be most effective and fastest
set TRUE if debugging is wished, default FALSE. Creates a log file in working directory
value specifying the scaling between gamma and eta in the objective function
character defining the method to be used in optim, preferences are: "Nelder-Mead", "BFGS", "L-BFGS-B"e
vector specifying the lower boundary of parameters for "L-BFGS-B" method
vector specifying the upper boundary of parameters for "L-BFGS-B" method
logical, set TRUE if logarithmic parameters during optimization should be used. Advantage: zero as lower boundary for parameters
value specifying the maximum number of itereations durion optimization
vector specifying the change for each parameter during one interation step
value specifying output information of optim
$est returns vector of estimated parameters lambda,gamma,beta,eta,mux
$conv returns value of convergence of optimization, see optim for details
$mess returns character message about optimization if using "L-BFGS-B" method
$Z returns value of objective function for estimated parameters
# NOT RUN {
t.sim=240
lambda <- 4/240
gamma <- 1/10
beta <- 0.3
eta <- 2
mux <- 4
pars <- c(lambda,gamma,beta,eta,mux)
sim <- BLRPM.sim(lambda,gamma,beta,eta,mux,t.sim)
est <- BLRPM.est(sim$RR,pars.in=pars,method="BFGS",use.log=TRUE)
# }
Run the code above in your browser using DataLab