Keywords - Function groups - @ A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Library: metrics
See also: rqfit

Quantlet: rrstest
Description: Computes the regression rankscore test of a linear hypothesis based on the dual quantile regression process. It tests the hypothesis that b1 = 0 in the quantile regression model y = x0'b0 + x1'b1 + u. Test statistic is asymptotically Chi-squared with rank(x1) degrees of freedom.

Usage: chi = rrstest(x0,x1,y{,score})
Input:
x0 Matrix of maintained regressors. If there is an intercept term in the regression, x0 should contain a column of ones.
x1 Matrix of regressors under test.
y Response variable.
score The desired score function for test. Default value is score = 1 (Wilcoxon). Currently implemented score functions are Wilcoxon (score = 1), Normal (score = 2), and Sign (score = 3) which are asymptotically optimal for the logistic, Gaussian and Laplace error models respectively. Values from (0,1) are possible too. In this case, sign scores generalized to the quantile given by the value of score are computed.
Output:
chi Test statistic is asymptotically Chi-squared with cols(x1) degrees of freedom. // Parameter rank currently not returned // Definition vector of ranks

Example:
library("metrics")
;
; simulate data
;
randomize(101)
x = uniform(100,3)
y = x[,1] + 2*x[,2] - x[,3] + normal(100)
;
; test the hypothesis the coef of x[,3] is zero
;
rrstest(x[,1:2], x[,3], y)
;
; once more for a different model
;
y = x[,1] + 2*x[,2] + normal(100)
;
; test the hypothesis the coef of x[,3] is zero
;
rrstest(x[,1:2], x[,3], y)

Result:
Contents of chi for model y = b' * x, b = #(1,2,-1)
[1,]   21.902
Contents of chi for model y = b' * x, b = #(1,2,0)
[1,]  0.14374
While in the first case has the test statistics high value
(x[,3] is significant in the regression), in the latter case,
the test statistics is small (x[,3] is not significant).



Author: P. Cizek, 19990920 license MD*Tech
(C) MD*TECH Method and Data Technologies, 05.02.2006