KhmaladzeTest: Tests of Location and Location Scale Shift Hypotheses for Linear Models
Description
Tests of the hypothesis that a linear model specification
is of the location shift or location-scale shift form. The tests are based
on the Doob-Meyer Martingale transformation approach proposed by Khmaladze(1981)
for general goodness of fit problems as adapted to quantile regression by
Koenker and Xiao (2002).
Usage
KhmaladzeTest(formula, data = NULL, taus = 1:99/100, nullH = "location" ,
trim = c(0.05, 0.95), h = 1, ...)
Arguments
formula
a formula specifying the model to fit by rqProcess
data
a data frame within which to interpret the formula
taus
An equally spaced grid of points on which to evaluate the
quantile regression process, if any taus fall outside (0,1) then the full
process is computed.
nullH
a character vector indicating whether the "location" shift hypothesis
(default) or the "location-scale" shift hypothesis should be tested.
trim
a vector indicating the lower and upper bound of the quantiles to
included in the computation of the test statistics (only, not
estimates).