<rt id="bn8ez"></rt>
<label id="bn8ez"></label>

  • <span id="bn8ez"></span>

    <label id="bn8ez"><meter id="bn8ez"></meter></label>

    人在江湖

      BlogJava :: 首頁 :: 聯(lián)系 :: 聚合  :: 管理
      82 Posts :: 10 Stories :: 169 Comments :: 0 Trackbacks

    Kendall tau是用來度量關(guān)聯(lián)關(guān)系的。

    (引自wikipedia:http://en.wikipedia.org/wiki/Kendall_tau_rank_correlation_coefficient)

    ==============================================

    Let (x1, y1), (x2, y2), …, (xn, yn) be a set of joint observations from two random variables X and Y respectively, such that all the values of (xi) and (yi) are unique. Any pair of observations (xi, yi) and (xj, yj) are said to be concordant if the ranks for both elements agree: that is, if both xi > xj and yi > yj or if both xi < xj and yi < yj. They are said to be discordant, if xi > xj and yi < yj or if xi < xj and yi > yj. If xi = xj or yi = yj, the pair is neither concordant nor discordant.

    The Kendall τ coefficient is defined as:

    \tau = \frac{(\text{number of concordant pairs}) - (\text{number of discordant pairs})}{\frac{1}{2} n (n-1) } .

    =========================================================

    同一篇文章繼續(xù)引用關(guān)于ties:

    =========================================================

    A pair {(xi, yi), (xj, yj)} is said to be tied if xi = xj or yi = yj; a tied pair is neither concordant nor discordant. When tied pairs arise in the data, the coefficient may be modified in a number of ways to keep it in the range [-1, 1]:

    Tau-b statistic, unlike tau-a, makes adjustments for ties and is suitable for square tables. Values of tau-b range from ?1 (100% negative association, or perfect inversion) to +1 (100% positive association, or perfect agreement). A value of zero indicates the absence of association.

    The Kendall tau-b coefficient is defined as:

    \tau_B = \frac{n_c-n_d}{\sqrt{(n_0-n_1)(n_0-n_2)}}

    where

    \begin{array}{ccl}
n_0 & = & n(n-1)/2\\
n_1 & = & \sum_i t_i (t_i-1)/2 \\
n_2 & = & \sum_j u_j (u_j-1)/2 \\
t_i & = & \mbox{Number of tied values in the } i^{th} \mbox{ group of ties for the first quantity} \\
u_j & = & \mbox{Number of tied values in the } j^{th} \mbox{ group of ties for the second quantity}
\end{array}

    ================================================

    靠,搞了半天才理解,上面公式中所謂nc, nd里面的c和d,指的是concordant和discordant.

    在sas中計算Kendall tau-2比較簡單,直接用proc freq就行,原來proc freq如此強(qiáng)大啊。

    sas程序舉例:

    data color;
       input Region Eyes $ Hair $ Count @@;
       label Eyes  ='Eye Color'
             Hair  ='Hair Color'
             Region='Geographic Region';
       datalines;
    1 blue  fair   23  1 blue  red     7  1 blue  medium 24
    1 blue  dark   11  1 green fair   19  1 green red     7
    1 green medium 18  1 green dark   14  1 brown fair   34
    1 brown red     5  1 brown medium 41  1 brown dark   40
    1 brown black   3  2 blue  fair   46  2 blue  red    21
    2 blue  medium 44  2 blue  dark   40  2 blue  black   6
    2 green fair   50  2 green red    31  2 green medium 37
    2 green dark   23  2 brown fair   56  2 brown red    42
    2 brown medium 53  2 brown dark   54  2 brown black  13
    ;

    proc freq data = color noprint ;                                                                                             
    tables  eyes*hair / measures  noprint ;                                                                                   
    weight count;                                                                                                     
    output out=output KENTB;                                                                                          
    test KENTB;                                                                                                            
    run;

     

    另外跟Kendall tau有點兒關(guān)聯(lián)的是Somer’s D,但是搜索了一下沒看到公式,反正Somer’s D也可以用sas proc freq直接算,方法類似。

    Somers' D(C|R) and Somers' D(R|C) are asymmetric modifications of tau-b.Somers' D differs from tau-b in that it uses a correction only for pairs that are tied on the independent variable.

    posted on 2011-08-28 15:11 人在江湖 閱讀(837) 評論(0)  編輯  收藏 所屬分類: BI
    主站蜘蛛池模板: 国产成人免费视频| 美女视频黄的免费视频网页| 思思re热免费精品视频66 | 国产成人自产拍免费视频| 国产精品公开免费视频| 亚洲AV无码一区二区三区电影| 性xxxx视频播放免费| 亚洲精品精华液一区二区| 成年人免费观看视频网站| 中文无码亚洲精品字幕| 日韩电影免费在线观看视频 | 亚洲午夜久久久精品电影院| 国产一卡二卡四卡免费| 亚洲入口无毒网址你懂的| 午夜一区二区免费视频| 美女被免费网站在线视频免费 | 国产免费一区二区三区免费视频| 一本色道久久综合亚洲精品| 91免费国产视频| 亚洲精品第五页中文字幕| 免费看国产成年无码AV片| 国产亚洲欧美日韩亚洲中文色| 亚洲第一页综合图片自拍| 国产日韩AV免费无码一区二区| 久久精品国产亚洲AV无码偷窥| 综合在线免费视频| 美女黄频免费网站| 亚洲av无码av制服另类专区| 18勿入网站免费永久| 高h视频在线免费观看| 婷婷亚洲久悠悠色悠在线播放| 99国产精品永久免费视频| 偷自拍亚洲视频在线观看| 久久国产亚洲精品麻豆| 美女网站免费福利视频| eeuss影院www天堂免费| 亚洲成a人片在线观看中文app| 国产免费卡一卡三卡乱码| 外国成人网在线观看免费视频| 亚洲乱码av中文一区二区| 亚洲性猛交XXXX|