{"id":248,"date":"2022-09-18T18:50:46","date_gmt":"2022-09-18T09:50:46","guid":{"rendered":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/kendall-rank-correlation-coefficient\/"},"modified":"2024-09-05T22:18:51","modified_gmt":"2024-09-05T13:18:51","slug":"kendall-rank-correlation-coefficient","status":"publish","type":"post","link":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/kendall-rank-correlation-coefficient\/","title":{"rendered":"R \u3067\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u3092\u8a08\u7b97\u3059\u308b\u65b9\u6cd5"},"content":{"rendered":"\n<p>\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u306f\u3069\u306e\u3088\u3046\u306b\u8a08\u7b97\u3059\u308b\u304b\u7d39\u4ecb\u3059\u308b<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\">\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570<\/h2>\n\n\n\n<p>\u30b1\u30f3\u30c9\u30fc\u30eb\uff08Kendall\uff09\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570 $ \\tau $ \u306f\u3001\u9806\u4f4d\u3092\u4f7f\u308f\u306a\u3044\u76f8\u95a2\u4fc2\u6570\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u4f55\u3092\u4f7f\u3046\u304b\u3068\u3044\u3046\u3068\u3001\u5024\u306e\u5927\u5c0f\u3092\u4f7f\u3046\u3002<\/p>\n\n\n\n<p>\u5909\u6570X\u3068\u5909\u6570Y\u306e\u76f8\u95a2\u3092\u8a08\u7b97\u3059\u308b\u969b\u306b\u30012\u3064\u306eX,Y\u30da\u30a2\u3092\u53d6\u308a\u51fa\u3059\u3002<\/p>\n\n\n\n<p>\u7247\u65b9\u306e\u30da\u30a2\u304c\u3001\u3082\u3046\u7247\u65b9\u306e\u30da\u30a2\u3088\u308a\u3001X\u3082Y\u3082\u5927\u304d\u3044\u3001\u3082\u3057\u304f\u306fX\u3082Y\u3082\u5c0f\u3055\u3044\u3068\u3044\u3046\u5834\u5408\u304c\uff0b\uff11\u3068\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u305d\u3046\u3067\u306a\u3044\u5834\u5408\u3092\uff0d\uff11\u3068\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u3092\u5168\u90e8\u306e\u7d44\u307f\u5408\u308f\u305b\u306b\u3064\u3044\u3066\u884c\u3046\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5408\u8a08\u3092 S \u3068\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u5f0f\u3067\u66f8\u3051\u308b\u3002<\/p>\n\n\n\n<p>\\begin{equation} S = \\sum_{i \\lt j} (\\mathrm{sign} (x_j &#8211; x_i) \\times \\mathrm{sign} (y_j &#8211; y_i)) \\end{equation}<\/p>\n\n\n\n\n\n\n\n<p>\uff0b\uff11\u306e\u6570\u3068\uff0d\uff11\u306e\u6570\u306e\u5dee\u3092\u3001\u5168\u90e8\u306e\u7d44\u307f\u5408\u308f\u305b\u306e\u6570 $ D = \\frac{n(n &#8211; 1)}{2} $ \u3067\u5272\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u308c\u304c\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570 $ \\tau = \\frac{S}{D} $ \u3067\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u3064\u307e\u308a\u3001\u9806\u4f4d\u306f\u4f7f\u308f\u306a\u3044\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u3068\u3044\u3046\u3053\u3068\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u306e\u8a08\u7b97-\u540c\u3058\u5024\u304c\u3042\u3063\u305f\u5834\u5408\u306f\">\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u306e\u8a08\u7b97 \u540c\u3058\u5024\u304c\u3042\u3063\u305f\u5834\u5408\u306f\uff1f<\/h2>\n\n\n\n<p>2\u3064\u306eX,Y\u30da\u30a2\u3092\u53d6\u308a\u51fa\u3057\u305f\u3068\u304d\u3001X\u540c\u58eb\u3001\u53ca\u3073\/\u53c8\u306f\u3001Y\u540c\u58eb\u304c\u540c\u3058\u5024\u3067\u3042\u3063\u305f\u5834\u5408\u306f\u3069\u3046\u3059\u308b\u306e\u304b\uff1f<\/p>\n\n\n\n<p>\u5206\u6bcd\u306e\u7d44\u307f\u5408\u308f\u305b\u6570\u304b\u3089\u3001\u540c\u3058\u5024\u306e\u30da\u30a2\u6570\u3092\u5f15\u304f\u3068\u3044\u3046\u3075\u3046\u306b\u88dc\u6b63\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u8a73\u3057\u304f\u306f\u4e0b\u8a18\u53c2\u8003\u30b5\u30a4\u30c8\u306e\u5f0f\u3092\u53c2\u7167\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/bellcurve.jp\/statistics\/glossary\/1307.html\">\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570 | \u7d71\u8a08\u7528\u8a9e\u96c6 | \u7d71\u8a08WEB<\/a><\/p>\n\n\n\n<p>\u3053\u308c\u304c\u3001SPSS\u306e\u30af\u30ed\u30b9\u96c6\u8a08\u8868\u306e\u7d71\u8a08\u3067\u767b\u5834\u3059\u308b\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u30bf\u30a6\uff42\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<p><a href=\"https:\/\/www.ibm.com\/docs\/ja\/spss-statistics\/saas?topic=crosstabs-statistics\">\u30af\u30ed\u30b9\u96c6\u8a08\u8868\u306e\u7d71\u8a08<\/a><\/p>\n\n\n\n<div id=\"biost-3264692481\" class=\"biost- biost-entity-placement\"><p style=\"text-align: center;\"><span style=\"font-size: 20px;\"><strong><a href=\"https:\/\/best-biostatistics.com\/kmhl\">\uff1e\uff1e\u3082\u3046\u7d71\u8a08\u3067\u60a9\u3080\u306e\u306f\u7d42\u308f\u308a\u306b\u3057\u307e\u305b\u3093\u304b\uff1f\u00a0<\/a><\/strong><\/span><\/p>\r\n<a href=\"https:\/\/best-biostatistics.com\/kmhl\"><img class=\"aligncenter wp-image-2794 size-full\" src=\"https:\/\/best-biostatistics.com\/wp\/wp-content\/uploads\/2023\/11\/bn_r_03.png\" alt=\"\" width=\"500\" height=\"327\" \/><\/a>\r\n<p style=\"text-align: center;\"><span style=\"color: #ff0000; font-size: 20px;\"><strong><span class=\"marker2\">\u21911\u4e07\u4eba\u4ee5\u4e0a\u306e\u533b\u7642\u5f93\u4e8b\u8005\u304c\u8cfc\u8aad\u4e2d<\/span><\/strong><\/span><\/p><\/div><h2 class=\"wp-block-heading\" id=\"\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u3092\u8a08\u7b97\u3057\u3066\u307f\u308b\">\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u3092\u8a08\u7b97\u3057\u3066\u307f\u308b<\/h2>\n\n\n\n<p>R \u3067\u8a08\u7b97\u3057\u3066\u307f\u308b\u3002<\/p>\n\n\n\n<p>Kendall \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code><span class=\"synPreProc\">library<\/span><span class=\"synSpecial\">(<\/span>Kendall<span class=\"synSpecial\">)<\/span>\nx<span class=\"synStatement\">&lt;-<\/span><span class=\"synIdentifier\">c<\/span><span class=\"synSpecial\">(<\/span><span class=\"synConstant\">1.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">1.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">3<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">4<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">6<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">6<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">6<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">8<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">9.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">9.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">11<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">12<\/span><span class=\"synSpecial\">)<\/span>\ny<span class=\"synStatement\">&lt;-<\/span><span class=\"synIdentifier\">c<\/span><span class=\"synSpecial\">(<\/span><span class=\"synConstant\">2.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">2.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">7<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">4.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">1<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">4.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">6<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">11.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">11.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">8.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">8.5<\/span><span class=\"synSpecial\">,<\/span><span class=\"synConstant\">10<\/span><span class=\"synSpecial\">)<\/span>\n<\/code><\/pre>\n\n\n\n<p>x \u3068 y \u306e\u6563\u5e03\u56f3\u3092\u66f8\u3044\u3066\u307f\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"672\" height=\"672\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2022\/09\/20230204224029.png\" alt=\"\" class=\"wp-image-1451\" title=\"\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2022\/09\/20230204224029.png 672w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2022\/09\/20230204224029-300x300.png 300w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2022\/09\/20230204224029-150x150.png 150w\" sizes=\"(max-width: 672px) 100vw, 672px\" \/><\/figure>\n\n\n\n<p><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><\/span><\/p>\n\n\n\n<p>\u53f3\u80a9\u4e0a\u304c\u308a\u306a\u306e\u3067\u3001x \u3068 y \u304c\u540c\u3058\u65b9\u5411\u6027\u3067\u3042\u308b\u306e\u3067\u3001\u30d7\u30e9\u30b9\u306e\u5024\u306b\u306a\u308b\u3053\u3068\u304c\u4e88\u60f3\u3055\u308c\u308b<\/p>\n\n\n\n<p>\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u3092\u8a08\u7b97\u3059\u308b\u3068\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"760\" height=\"194\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2022\/09\/20230204224609.png\" alt=\"\" class=\"wp-image-1452\" title=\"\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2022\/09\/20230204224609.png 760w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2022\/09\/20230204224609-300x77.png 300w\" sizes=\"(max-width: 760px) 100vw, 760px\" \/><\/figure>\n\n\n\n<p><span itemscope=\"\" itemtype=\"http:\/\/schema.org\/Photograph\"><\/span><\/p>\n\n\n\n<p>$ \\tau = 0.553 $ \u306a\u306e\u3067\u3001\u307e\u305a\u307e\u305a\u306e\u76f8\u95a2\u3068\u8a00\u3048\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u307e\u3068\u3081\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u306e\u8a08\u7b97\u65b9\u6cd5\u3092\u7c21\u5358\u306b\u7d39\u4ecb\u3057\u305f\u3002<\/p>\n\n\n\n<p>\u9806\u4f4d\u306f\u4f7f\u308f\u306a\u3044\u76f8\u95a2\u4fc2\u6570\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u53c2\u8003\u306b\u306a\u308c\u3070\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u53c2\u8003\u30b5\u30a4\u30c8\">\u53c2\u8003\u30b5\u30a4\u30c8<\/h2>\n\n\n\n<p><a href=\"https:\/\/bellcurve.jp\/statistics\/glossary\/1307.html\">\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570 | \u7d71\u8a08\u7528\u8a9e\u96c6 | \u7d71\u8a08WEB<\/a><\/p>\n\n\n\n<p>\u2193\u2193\u2193\u56f3\u3068\u3057\u3066\u610f\u5473\u5408\u3044\u304c\u7406\u89e3\u3057\u305f\u3044\u4eba\u306f\u3053\u3061\u3089\u2193\u2193\u2193<\/p>\n\n\n\n<p><a href=\"http:\/\/www.tamagaki.com\/math\/Statistics610.html\">\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570 \u7d71\u8a08\u5b66\u5165\u9580<\/a><\/p>\n\n\n\n<p>\u2193\u2193\u2193SPSS\u306e\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u30bf\u30a6\uff42\u306e\u8aac\u660e\u3042\u308a\u2193\u2193\u2193<\/p>\n\n\n\n<p><a href=\"https:\/\/www.ibm.com\/docs\/ja\/spss-statistics\/saas?topic=crosstabs-statistics\">\u30af\u30ed\u30b9\u96c6\u8a08\u8868\u306e\u7d71\u8a08<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30b1\u30f3\u30c9\u30fc\u30eb\u306e\u9806\u4f4d\u76f8\u95a2\u4fc2\u6570\u306f\u3069\u306e\u3088\u3046\u306b\u8a08\u7b97\u3059\u308b\u304b\u7d39\u4ecb\u3059\u308b<\/p>\n","protected":false},"author":2,"featured_media":1451,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":false,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[5,69,36],"tags":[],"class_list":["post-248","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-r","category-69","category-36"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2022\/09\/20230204224029.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/248","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/comments?post=248"}],"version-history":[{"count":4,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/248\/revisions"}],"predecessor-version":[{"id":1457,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/248\/revisions\/1457"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media\/1451"}],"wp:attachment":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media?parent=248"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/categories?post=248"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/tags?post=248"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}