Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

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).

h

an initial bandwidth for the call to akj.

...

other arguments to be passed to summary.rq.

Value

an object of class KhmaladzeTest is returned containing:

nullH

The form of the null hypothesis.

Tn

Joint test statistic of the hypothesis that all the slope parameters of the model satisfy the hypothesis.

THn

Vector of test statistics testing whether individual slope parameters satisfy the null hypothesis.

References

Khmaladze, E. (1981) “Martingale Approach in the Theory of Goodness-of-fit Tests,” Theory of Prob. and its Apps, 26, 240–257.

Koenker, Roger and Zhijie Xiao (2002), “Inference on the Quantile Regression Process”, Econometrica, 81, 1583–1612. http://www.econ.uiuc.edu/~roger/research/inference/inference.html

Examples

data(barro)
T = KhmaladzeTest( y.net ~ lgdp2 + fse2 + gedy2 + Iy2 + gcony2, 
		data = barro, taus = seq(.05,.95,by = .01))
plot(T)

quantreg

Quantile Regression

v5.85
GPL (>= 2)
Authors
Roger Koenker [cre, aut], Stephen Portnoy [ctb] (Contributions to Censored QR code), Pin Tian Ng [ctb] (Contributions to Sparse QR code), Blaise Melly [ctb] (Contributions to preprocessing code), Achim Zeileis [ctb] (Contributions to dynrq code essentially identical to his dynlm code), Philip Grosjean [ctb] (Contributions to nlrq code), Cleve Moler [ctb] (author of several linpack routines), Yousef Saad [ctb] (author of sparskit2), Victor Chernozhukov [ctb] (contributions to extreme value inference code), Ivan Fernandez-Val [ctb] (contributions to extreme value inference code), Brian D Ripley [trl, ctb] (Initial (2001) R port from S (to my everlasting shame -- how could I have been so slow to adopt R!) and for numerous other suggestions and useful advice)
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.