View source: R/TruncationMLE.R
| trTestMLE | R Documentation |
Test between non-truncated GPD tails (light truncation) and truncated GPD tails (rough truncation).
trTestMLE(data, gamma, tau, alpha = 0.05, plot = TRUE, main = "Test for truncation", ...)
data |
Vector of |
gamma |
Vector of |
tau |
Vector of |
alpha |
The used significance level, default is |
plot |
Logical indicating if the P-values should be plotted as a function of |
main |
Title for the plot, default is |
... |
Additional arguments for the |
We want to test
H_0: X has non-truncated GPD tails vs.
H_1: X has truncated GPD tails.
Let \hat{\gamma}_k and \hat{\tau}_k be the truncated MLE estimates for \gamma and \tau.
The test statistic is then
T_{k,n}=k (1+\hat{\tau} (X_{n,n}-X_{-k,n}) )^{-1/\hat{\xi}_k}
which is asymptotically standard exponentially distributed.
We reject H_0 on level \alpha if
T_{k,n}>\ln (1/{\alpha)}. The corresponding P-value is given by
\exp(-T_{k,n}).
See Beirlant et al. (2017) for more details.
A list with following components:
k |
Vector of the values of the tail parameter |
testVal |
Corresponding test values. |
critVal |
Critical value used for the test, i.e. |
Pval |
Corresponding P-values. |
Reject |
Logical vector indicating if the null hypothesis is rejected for a certain value of |
Tom Reynkens.
Beirlant, J., Fraga Alves, M. I. and Reynkens, T. (2017). "Fitting Tails Affected by Truncation". Electronic Journal of Statistics, 11(1), 2026–2065.
trMLE, trDTMLE, trProbMLE, trEndpointMLE, trTestMLE, trTest
# Sample from GPD truncated at 99% quantile
gamma <- 0.5
sigma <- 1.5
X <- rtgpd(n=250, gamma=gamma, sigma=sigma, endpoint=qgpd(0.99, gamma=gamma, sigma=sigma))
# Truncated ML estimator
trmle <- trMLE(X, plot=TRUE, ylim=c(0,2))
# Test for truncation
trTestMLE(X, gamma=trmle$gamma, tau=trmle$tau)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.