This function tests whether the extreme value index of Y, gamma(x), is constant or varying across the covariate x by using the test procedure described in Section 3.4 of Wang and Li (2013).

1 2 |

`y` |
a vector of n untransformed responses |

`x` |
a n x p matrix of n observations and p predictors |

`grid.lam` |
a grid of points for power-transformation parameter |

`grid.k` |
a grid of points for k, the number of upper order statistics involved in Hill estimator |

`tau.lam` |
the quantile level used for estimating the transformation parameter |

`u.x` |
the proportion to be trimmed in the x direction |

`a` |
location shift parameter in the power transformation (introduced to avoid negative y values) |

`M` |
a constant larger than one that is used for estimating the c vector and thus K(x) function. The default is two |

`tol` |
the tolerance level for checking quantile crossing issue |

A list is returned with the following components

lam: the estimated power-transformation parameter

k: the selected tuning parameter k, the number of upper order statistics involved in Hill estimator

Tm: the proposed test statistic

scaledTm: the standardized test statistic

pval.iid: the p-value based on iid assumption, that is, assuming that K(x)=1

pval.nid: the p-value based on estimated K(x)=(X'C)^(1/EVI)

gamma.bar: the pooled EVI estimator

hat.gamma: a N-dimensional vector consisting of the estimated x-dependent EVI at x=xstar

xstar: a N x p matrix of N observations and p predictors

Wang, H. and Li, D. (2013). Estimation of conditional high quantiles through power transformation. Journal of the American Statistical Association, 108, 1062-1074.

1 2 3 4 5 6 7 8 9 10 11 12 13 | ```
library(EXRQ)
n=500
tau.e = c(0.99, 0.993, 0.995)
set.seed(12368819)
x1 = runif(n, -1, 1)
x2 = runif(n, -1, 1)
sqrty = 2 + x1 + x2 + (1+0.8*x1)*rpareto(n, 0.5)
x = as.matrix(cbind(x1, x2))
y = sqrty^2
out = testC.EVI(y, x, grid.lam=seq(-0.5, 1.5, 0.1), grid.k=50, tau.lam=0.9)
(Tval = out$scaledTm)
(pval.iid = out$pval.iid)
(pval.nid = out$pval.nid)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

All documentation is copyright its authors; we didn't write any of that.