The kernel function. You can use
four types: "e" Epanechnikov, "n" Normal, "b" Biweight and
"t" Triweight. The Normal kernel is used by default.
vec_data
The data sample (earthquake magnitudes, flow levels, wind speed... ).
y
A grid or a singular value where the estimator is computed. By default,
a grid of 50 values between the minimum and the maximum of the data is
computed.
bw
The bandwidth parameter. The plug-in method of Polansky and Baker (2000) is
used by default.
lambda
The mean activity rate.
Details
The mean return period is usually calculated assuming that the occurrence
process of the events follows a Poisson one. In this case, the mean return
period of events of size c is calculated as
T(c) = frac{1}{ λ (1-F_h(c))}.
In Orlecka-Sikora (2008) or Quintela del Rio (2010) an application to earthquake
data is made.
In hydrological applications, if we work with annual maxima data, the parameter of
the Poisson variable is 1 (one maximum per year). The mean return period between
flow levels of value c is calculated as
T(c) = frac{1}{ 1-F_h(c)}.
See, for instance, Quintela del Rio (2011), for an application to data of
Salt River near Roosevelt, AZ, USA (saltriver data).
Orlecka-Sikora, B. (2008) Resampling methods for evaluating the uncertainty of the
nonparametric magnitude distribution estimation in the probabilistic seismic hazard
analysis. Tectonophysics456, 38–51.
Quintela-del-Rio, A. (2010) On non-parametric techniques for area-characteristic
seismic hazard parameters. Geophysical Journal International180,
pp. 339–346.
Quintela-del-Rio, A. (2011) On bandwidth selection for nonparametric estimation
in flood frequency analysis. Hydrological Processes25,
pp. 671–678.
Quintela-del-Rio, A. and Estevez-Perez, G. (2012)
Nonparametric Kernel Distribution Function Estimation with kerdiest:
An R Package for Bandwidth Choice and Applications,
Journal of Statistical Software50(8), pp. 1-21.
URL http://www.jstatsoft.org/v50/i08/.
Examples
# Working with earthquake data. We use the catalogue of the National
# Geographic Institute (IGN) of Spain and select the data of the Northwest
# of the Iberian Peninsula.
data(nwip)
require(chron)
require(date)
# we consider the data with magnitude greater than 3
mg<-nwip$magnitude[nwip$magnitude>3.0]
x1<-nwip$year
x2<-nwip$month
x3<-nwip$day
ys<-paste(x1,x2,x3)
earthquake_date<-as.character(ys)
y1s<-as.date(earthquake_date, order = "ymd")
# we compute the total number of years
y2s<-as.POSIXct(y1s)
z<-years(y2s)
n.years<-length(levels(z))
# the mean rate of earthquakes per year
lambda<-length(mg)/n.years
## Not run:
# we estimate the mean return period (in years) between earthquakes of
# the same magnitude
est2<-mrp(vec_data=mg, lambda=lambda)
plot(est2$grid, est2$Estimated_values, type="l",
xlab="magnitude", ylab="Mean return period (years)")
## End(Not run)
## Working with hydrological data: annual peak instantaneous flow of the
# Salt River near Roosevelt, AZ, USA, for 1924 - 2006.
data(saltriver)
peak<-saltriver$peakflow
## Not run:
year<-saltriver$year
plot(year,peak, type="l",ylab="Annual peak flow")
## End(Not run)
# mean return period for the Saltriver data
rp<-mrp(type_kernel="n", vec_data=peak, lambda=1)
## Not run:
plot(rp$grid, rp$Estimated_values, type="l",
xlab="Flow level", ylab="Years ", main="Mean return period")
## End(Not run)