Description Usage Arguments Details Value Author(s) References Examples
This functions computes an estimate of the time between two values of a concrete level (size of an earthquake, flow lewel, wind speed... ).
1 2 |
type_kernel |
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. |
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).
Returns a list containing:
Estimated_values |
Vector containing the estimated function. |
grid |
The used grid. |
bw |
Value of the bandwidth. |
Graciela Estevez Perez graci@udc.es and Alejandro Quintela del Rio aquintela@udc.es
Orlecka-Sikora, B. (2008) Resampling methods for evaluating the uncertainty of the nonparametric magnitude distribution estimation in the probabilistic seismic hazard analysis. Tectonophysics 456, 38–51.
Quintela-del-Rio, A. (2010) On non-parametric techniques for area-characteristic seismic hazard parameters. Geophysical Journal International 180, pp. 339–346.
Quintela-del-Rio, A. (2011) On bandwidth selection for nonparametric estimation in flood frequency analysis. Hydrological Processes 25, 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 Software 50(8), pp. 1-21. URL http://www.jstatsoft.org/v50/i08/.
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 | # 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)
|
Loading required package: date
Loading required package: chron
Loading required package: evir
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.