Description Usage Arguments Details Value Note Author(s) See Also Examples
This functions returns an approximated expectation of a
given underlying distribution on a bound interval. Specifically, the function
tackles with distribution misspecification issue by applying fhat
. The
approximation is done by Trapezoid Rule.
1 |
a |
lower bound of interval |
b |
upper bound of interval |
N |
number of observations |
fhat |
a function adjust the distribution misspecification. The default
value is |
unit |
width of subintervals. The default unit is b-a, means approximation is done in one piece. |
dist_null |
a character string giving the underlying distribution in null hypothesis. Distribution options are shown in details. |
... |
further arguments for distribution parameters. |
Trapezoid Rule
\int_{a}^{b}xf(x)dx = ∑(a-b)(f(a)+f(b))/2
For more precisely results, set small value of unit
which means
cut interval(a,b) into small piece.
As for the distribution misspecification,
f_x = f_ydy/dx
where f_y
is underlying distribution density function and dy/dx
is fhat
. Even though f_x
in unknown, it is estimable by equation
above.
The dist_null
indicates the underlying distribution class. The options
follow the distributions regular abbreviation in R, Like norm
is normal
distribution, unif
is uniform distribution, gpd
is
generalized pareto distribution.
Distributions
for more distribution options.
This function returns the approximated expectation.
To use gpd
, package POT
https://cran.r-project.org/package=POT
needs to be installed first.
Zhicong Zhao
HRR_pt_est
for fhat
estimation.
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.