[問題] 計算t values

看板Statistics作者 (Madchester)時間14年前 (2011/04/28 12:23), 編輯推噓2(2049)
留言51則, 4人參與, 最新討論串1/1
假設我現在只有smaple size跟correlation matrix這兩個資訊 我怎麼去算每個regression coefficients的t-test values? 謝謝~ -- Kraft Durch Freude~ -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.113.0.109

04/28 14:10, , 1F
你在玩CUDA R?
04/28 14:10, 1F

04/28 14:27, , 2F
google "Fisher transformation"
04/28 14:27, 2F

04/28 16:59, , 3F
Fisher transformation 只是做簡單變換, 也與 r 與迴歸係數
04/28 16:59, 3F

04/28 16:59, , 4F
的關係是兩回事.
04/28 16:59, 4F

04/28 17:01, , 5F
若只是簡單直線迴歸, r√(t-2)/√(1-r^2) 相當於檢定簡單直
04/28 17:01, 5F

04/28 17:01, , 6F
線迴歸係數之 t. 上列√(n-2) 誤植為 √(t-2).
04/28 17:01, 6F

04/28 17:02, , 7F
若是要對應到複迴歸, 則分子要代之以 partial correlation
04/28 17:02, 7F

04/28 17:03, , 8F
而分母用 multiple correlation, √(n-2) 也要做修正.
04/28 17:03, 8F

04/28 20:02, , 9F
謝謝回答! "修正"的部分我還是不太清楚 可否煩請解惑?
04/28 20:02, 9F

04/28 20:07, , 10F
@memphis: 不是耶 在玩別的東西:)
04/28 20:07, 10F

04/28 20:09, , 11F
Fisher's Z transformation test is an approximation test.
04/28 20:09, 11F

04/28 20:22, , 12F
you may use it to estimate the p value and its
04/28 20:22, 12F

04/28 20:24, , 13F
corresponding absolute value of t statistic.
04/28 20:24, 13F

04/28 20:26, , 14F
找到F. Transform了 我先來研究看看 謝謝! :)
04/28 20:26, 14F

04/28 20:37, , 15F
L大,我提的方法只是用來簡單得到p value,(我猜你想要的
04/28 20:37, 15F

04/28 20:40, , 16F
其實是p value吧)Fisher's transformation 是我做咨詢時
04/28 20:40, 16F

04/28 20:45, , 17F
拿來估樣本數的簡單計算方法,y大提供的是嚴謹的做法
04/28 20:45, 17F

04/28 20:54, , 18F
如果你在修課,那麼請先弄懂y大的方法
04/28 20:54, 18F

04/28 22:16, , 19F
樓上, 你所謂的 Fisher's transformation 難道不是
04/28 22:16, 19F

04/28 22:16, , 20F
z = (1/2)ln[(1+r)/(1-r)]?
04/28 22:16, 20F

04/28 22:17, , 21F
這明明與複迴歸不相干? 那是關於相關係數本身的推論.
04/28 22:17, 21F

04/28 22:18, , 22F
然而,我只知道簡單相關係數...偏相關係數它是否適用我不清楚
04/28 22:18, 22F

04/28 22:19, , 23F
而且, 在簡單相關情形, 它需要兩變量群體分布是雙變量常態,
04/28 22:19, 23F

04/28 22:19, , 24F
而且 n 夠大.
04/28 22:19, 24F

04/28 22:20, , 25F
它的好處是不僅論用 "相關係數為 0" 這樣的假說檢定.
04/28 22:20, 25F

04/28 22:20, , 26F
而我所提的 t-transform, 僅適用 "迴歸係數=0" 或 "相關=0"
04/28 22:20, 26F

04/28 22:22, , 27F
好處是只需迴歸模型的假設成立. 也就是說, 解釋變數不一定要
04/28 22:22, 27F

04/28 22:23, , 28F
常態. 而且 t 轉換只是一個代數上的等價轉換, 並不需要大樣
04/28 22:23, 28F

04/28 22:23, , 29F
本, 除非迴歸模型中 "誤差項為常態" 的假設不成立.
04/28 22:23, 29F

04/28 22:25, , 30F
回原問者: 例如複迴歸是 Y=α+β1*x1+β2*x2+e, 而相關矩陣
04/28 22:25, 30F

04/28 22:25, , 31F
提供了 r(y1), r(y2) 與 r(12). 考慮β1=0 與否的 t 檢定.
04/28 22:25, 31F

04/28 22:27, , 32F
首先計算偏相關 r(y1.2) = (r(y1)-r(y2)r(12))/A
04/28 22:27, 32F

04/28 22:27, , 33F
A = √[(1-r(y2)^2)(1-r(12)^2)].
04/28 22:27, 33F

04/28 22:34, , 34F
其次計算複相關係數 R(y.12) ...公式我不記得, 需再查或推導
04/28 22:34, 34F

04/28 22:35, , 35F
然後 t =r(y1.2)√(n-3)/√{1-R(y.12)^2}
04/28 22:35, 35F

04/28 22:36, , 36F
r(y1,2) 即是扮演樣本複迴歸係數角色; 而
04/28 22:36, 36F

04/28 22:37, , 37F
r(y1,2) 即是扮演樣本複迴歸係數角色; 而
04/28 22:37, 37F

04/28 22:38, , 38F
(1-R(y.12)^2)/(n-3) 扮演 MSE 角色.
04/28 22:38, 38F

04/28 22:39, , 39F
似乎還差了一點東西...
04/28 22:39, 39F

04/28 22:55, , 40F
Like I said before, Fisher's Z transformation test is an
04/28 22:55, 40F

04/28 23:00, , 41F
ad-hoc method to test the significance of association.
04/28 23:00, 41F

04/28 23:03, , 42F
It can be used to test conditional independence as well.
04/28 23:03, 42F

04/28 23:08, , 43F
The drawback is that it requires normality assumption,
04/28 23:08, 43F

04/28 23:10, , 44F
which may or may not be valid in practice.
04/28 23:10, 44F

04/28 23:43, , 45F
When I replied, I've already converted the problem into
04/28 23:43, 45F

04/28 23:45, , 46F
testing for (conditional) independence. I should be more
04/28 23:45, 46F

04/28 23:48, , 47F
I should have been more specific about the purpose.
04/28 23:48, 47F

04/28 23:59, , 48F
用 partial correlation 及 multiple correlation 的轉換太
04/28 23:59, 48F

04/29 00:00, , 49F
麻煩. 可直接由相關矩陣計算標準化迴歸係數及 t 統計量.
04/29 00:00, 49F

04/29 00:00, , 50F
請參考 telnet://bs2.twbbs.org 的 Statistics 版.
04/29 00:00, 50F

04/29 21:36, , 51F
謝謝 我得先吸收一下~
04/29 21:36, 51F
文章代碼(AID): #1DkElEjd (Statistics)