MATLAB: F-Test for difference between coefficients

coefficientsf-testMATLABregression

Hi there,
I need to conduct F-Tests for differences in estimated regression coefficients. That is, to say: "Yes, the one coefficient is really lower/higher than the other" or "No, they are not statistically significantly different".
I believe, the equivalent stata command would be -test-. However, I can't seem to find how to do it matlab.
Any help is greatly appreciated!
Christian

Best Answer

and use a contrast H that compares the two desired coefficients (e.g. [0 1 -1] compares the second and third regression coefficients in your linear model).
Generally, for a linear model of the form:
Y = X*B + noise
coeffTest will test any hypothesis of the form:
H*B = 0
(where H can be a vector or a matrix)