F-Test for difference between coefficients
5 ビュー (過去 30 日間)
古いコメントを表示
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
0 件のコメント
採用された回答
Alfonso Nieto-Castanon
2015 年 5 月 22 日
編集済み: Alfonso Nieto-Castanon
2015 年 5 月 22 日
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)
4 件のコメント
Alexis
2019 年 11 月 5 日
編集済み: Alexis
2019 年 11 月 5 日
This answer is very straightforward and helpful, but can anyone clarify these instructions from the ML documentation:
"If you specify the 'DummyVarCoding' name-value pair argument as 'effects' when fitting the model using fitglme, then βA + βB + βC = 0, where βA, βB, and βC correspond to suppliers A, B, and C, respectively.
βA is the effect of A minus the average effect of A, B, and C.
[...] column 5 of the contrast matrix corresponds to βC, and column 6 corresponds to βB. Therefore, the contrast matrix for this test is specified as H = [0,0,0,0,1,2]."
I specify 'DummyVarCoding','effects' when I use fitglme(). Does this mean Alfonso Nieto-Castanon's suggestion below wouldn't work for my model?
"you may wish to test whether the values in the fourth group are different from the values in any of the other three groups, so you can use a contrast [-1 0 0 1; 0 -1 0 1; 0 0 -1 1]"
In my model, I have three types of trial. In the model read out, I get
Name Estimate SE tStat DF pValue Lower
'(Intercept)' 0.03416 0.0034769 9.825 2668 2.0978e-22 0.027343
'type_1' -0.0056054 0.0010517 -5.3297 2668 1.066e-07 -0.0076677
'type_2' 0.0037668 0.0012124 3.1068 2668 0.0019112 0.0013894
... ( + the other model terms)
Given ML's documentation and my use of 'DummyVarCoding', how can I test 'type_3' against the average of 'type_1' and 'type_2'?
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で Gaussian Process Regression についてさらに検索
製品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!