{"id":3241,"date":"2023-09-15T17:12:53","date_gmt":"2023-09-15T08:12:53","guid":{"rendered":"https:\/\/plaza.umin.ac.jp\/~OIO\/?p=3241"},"modified":"2023-09-15T17:26:25","modified_gmt":"2023-09-15T08:26:25","slug":"r%e3%81%a7%e3%82%b5%e3%83%b3%e3%83%97%e3%83%ab%e3%82%b5%e3%82%a4%e3%82%ba%e3%81%82%e3%82%8b%e3%81%84%e3%81%af%e3%83%91%e3%83%af%e3%83%bc%e3%82%92%e8%a8%88%e7%ae%97","status":"publish","type":"post","link":"https:\/\/plaza.umin.ac.jp\/~OIO\/?p=3241","title":{"rendered":"R\u3067\u30b5\u30f3\u30d7\u30eb\u30b5\u30a4\u30ba\u3042\u308b\u3044\u306f\u30d1\u30ef\u30fc\u3092\u8a08\u7b97"},"content":{"rendered":"<h2>\u306f\u3058\u3081\u306b<\/h2>\n<p>\u81e8\u5e8a\u7814\u7a76\u3092\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30c8\u30b3\u30fc\u30eb\u306b\u66f8\u304f\u3088\u3046\u306a\u3001\u53b3\u5bc6\u6027\u306e\u3042\u308b\u898b\u7a4d\u3082\u308a\u306f\u7d71\u8a08\u306e\u5c02\u9580\u5bb6\u306b\u76f8\u8ac7\u3057\u3066\u9032\u3081\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u5c02\u9580\u5bb6\u306b\u4f9d\u983c\u3059\u308b\u3068\u305d\u308c\u306a\u308a\u306b\u524d\u63d0\u3092\u6574\u7406\u3057\u3066\u304a\u81b3\u7acb\u3066\u3057\u3066\u304b\u3089\u304a\u9858\u3044\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u5c02\u9580\u5bb6\u306b\u304d\u3061\u3093\u3068\u691c\u8a0e\u3057\u3066\u3082\u3089\u3046\u306b\u306f\u6642\u9593\u3082\u5fc5\u8981\u3067\u3059\u3002\u3057\u304b\u3057\u305d\u3053\u306b\u81f3\u308b\u524d\u306e\u6bb5\u968e\u3067\u3001\u6bb5\u53d6\u308a\u3092\u7d44\u307f\u7acb\u3066\u3066\u884c\u304f\u305f\u3081\u306b\u3001\u53b3\u5bc6\u6027\u3092\u72a0\u7272\u306b\u3057\u3066\u5927\u307e\u304b\u306a\u898b\u7a4d\u3082\u308a\u304c\u6b32\u3057\u3044\u3068\u3044\u3046\u5834\u9762\u3082\u5c11\u306a\u304b\u3089\u305a\u3042\u308a\u307e\u3059\u3002\uff08\u7d30\u304b\u3044\u524d\u63d0\u3092\u3059\u3063\u98db\u3070\u3059\u306e\u3067\u96d1\u3067\u3059\u3001\u3059\u307f\u307e\u305b\u3093\uff09<\/p>\n<h2>\u30b3\u30fc\u30c9\u3067\u3059<\/h2>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">setwd(\"c:\/\/Documents\/R\/hogehoge\/\")\r\nlibrary(pwr)\r\n\r\n#  i) \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7fa4\u306750%, \u5b9f\u85ac\u7fa4\u306725%\u3000\uff08\u3068\u85ac\u52b9\u3084\u30a4\u30d9\u30f3\u30c8\u3092\u60f3\u5b9a\uff09\r\n#  \u691c\u51fa\u529b power \u306f80%, p=0.005 (\u3053\u308c\u306f\u610f\u56f3\u7684\u306b\u6c4e\u7528\u3055\u308c\u3066\u3044\u308bP=0.05\u30840.01\u3088\u308a\u5c0f\u3055\u304f\u3057\u307e\u3057\u305f\uff09\r\nout_i &lt;- pwr.2p.test(h = ES.h(p1 = 0.50, p2 = 0.25),\r\n           sig.level = 0.005,\r\n           power = 0.80,\r\n           alternative = \"two.sided\")\r\nplot(out_i, main = \"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7fa4\u306750%, \u5b9f\u85ac\u7fa4\u306725%\")\r\n\r\n# ii) \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7fa4\u306750%, \u5b9f\u85ac\u7fa4\u3067 40% \u3000(\u540c\u4e0a)\r\n# \u691c\u51fa\u529b power \u306f80%, p=0.005 (\u3053\u308c\u306f\u610f\u56f3\u7684\u306b\u6c4e\u7528\u3055\u308c\u3066\u3044\u308bP=0.05\u30840.01\u3088\u308a\u5c0f\u3055\u304f\u3057\u307e\u3057\u305f\uff09\u00a0\r\nout_ii &lt;- pwr.2p.test(h = ES.h(p1 = 0.50, p2 = 0.40),\r\n                    sig.level = 0.005,\r\n                    power = 0.80,\r\n                    alternative = \"two.sided\")\r\nplot(out_ii, main = \"\u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7fa4\u306750%, \u5b9f\u85ac\u7fa4\u3067 40%\")<\/pre>\n<p>&nbsp;<\/p>\n<h2>\u7d50\u679c\u3067\u3059<\/h2>\n<h3>i) \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7fa4\u306750%, \u5b9f\u85ac\u7fa4\u306725%\u3000\uff08\u3068\u85ac\u52b9\u3084\u30a4\u30d9\u30f3\u30c8\u3092\u60f3\u5b9a\uff09, \u691c\u51fa\u529b power \u306f80%, p=0.005 (\u3053\u308c\u306f\u610f\u56f3\u7684\u306b\u6c4e\u7528\u3055\u308c\u3066\u3044\u308bP=0.05\u30840.01\u3088\u308a\u5c0f\u3055\u304f\u3057\u307e\u3057\u305f\uff09<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01.png\" alt=\"\" width=\"865\" height=\"555\" class=\"aligncenter size-full wp-image-3243\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01.png 865w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01-300x192.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01-700x449.png 700w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01-150x96.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01-768x493.png 768w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01-500x321.png 500w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01-800x513.png 800w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>pwr\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u3092\u4f7f\u308f\u305a\u306b\u3001\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u3092\u7528\u3044\u308b\u3068\u3001\u56f3\u306f\u51fa\u307e\u305b\u3093\u304c\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">power.prop.test(p1=0.50, p2=0.25, sig.level = 0.005, power = 0.80)<\/pre>\n<p>\u7d50\u679c\u3067\u3059<\/p>\n<pre aria-label=\"Console Output\" role=\"document\" class=\"GND-IWGDH3B\" id=\"rstudio_console_output\" tabindex=\"0\"><span class=\"GND-IWGDI3B\" role=\"document\" tabindex=\"-1\"><span class=\"GND-IWGDH3B\">\r\n     Two-sample comparison of proportions power calculation \r\n\r\n              n = 98.28936\r\n             p1 = 0.5\r\n             p2 = 0.25\r\n      sig.level = 0.005\r\n          power = 0.8\r\n    alternative = two.sided\r\n\r\nNOTE: n is number in *each* group<\/span><\/span><\/pre>\n<p>\u56f3\u4e2d\u306b\u793a\u3055\u308c\u305fn=98\u3068\u3060\u3044\u305f\u3044\u4e00\u81f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<h3>ii) \u30b3\u30f3\u30c8\u30ed\u30fc\u30eb\u7fa4\u306750%, \u5b9f\u85ac\u7fa4\u3067 40% \u3000(\u540c\u4e0a)<\/h3>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot00.png\" alt=\"\" width=\"865\" height=\"555\" class=\"aligncenter size-full wp-image-3244\" srcset=\"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot00.png 865w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot00-300x192.png 300w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot00-700x449.png 700w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot00-150x96.png 150w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot00-768x493.png 768w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot00-500x321.png 500w, https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot00-800x513.png 800w\" sizes=\"auto, (max-width: 865px) 100vw, 865px\" \/><\/p>\n<p>pwr\u30e9\u30a4\u30d6\u30e9\u30ea\u30fc\u3092\u4f7f\u308f\u305a\u306b\u3001\u7d44\u307f\u8fbc\u307f\u95a2\u6570\u3092\u7528\u3044\u308b\u3068\u3001\u56f3\u306f\u51fa\u307e\u305b\u3093\u304c\u6b21\u306e\u3088\u3046\u306b\u306a\u308a\u307e\u3059\u3002<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">power.prop.test(p1=0.50, p2=0.40, sig.level = 0.005, power = 0.80)<\/pre>\n<p>\u3053\u306e\u7d50\u679c\u3067\u3059<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">     Two-sample comparison of proportions power calculation \r\n\r\n              n = 657.4394\r\n             p1 = 0.5\r\n             p2 = 0.4\r\n      sig.level = 0.005\r\n          power = 0.8\r\n    alternative = two.sided\r\n\r\nNOTE: n is number in *each* group<\/pre>\n<p>\u3053\u3061\u3089\u3082\u56f3\u4e2d\u306e657\u3068\u3060\u3044\u305f\u3044\u4e00\u81f4\u3057\u307e\u3057\u305f\u3002<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u306f\u3058\u3081\u306b \u81e8\u5e8a\u7814\u7a76\u3092\u3059\u308b\u305f\u3081\u306e\u30d7\u30ed\u30c8\u30b3\u30fc\u30eb\u306b\u66f8\u304f\u3088\u3046\u306a\u3001\u53b3\u5bc6\u6027\u306e\u3042\u308b\u898b\u7a4d\u3082\u308a\u306f\u7d71\u8a08\u306e\u5c02\u9580\u5bb6\u306b\u76f8\u8ac7\u3057\u3066\u9032\u3081\u308b\u5fc5\u8981\u304c\u3042\u308b\u306e\u3067\u3059\u304c\u3001\u5c02\u9580\u5bb6\u306b\u4f9d\u983c\u3059\u308b\u3068\u305d\u308c\u306a\u308a\u306b\u524d\u63d0\u3092\u6574\u7406\u3057\u3066\u304a\u81b3\u7acb\u3066\u3057\u3066\u304b\u3089\u304a\u9858\u3044\u3059\u308b\u3053\u3068\u306b\u306a\u308a\u307e\u3059\u3002\u307e\u305f\u3001\u5c02\u9580&#8230;<\/p>\n","protected":false},"author":1,"featured_media":3243,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5,4],"tags":[],"class_list":["post-3241","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-miscellaneous","category-science"],"jetpack_featured_media_url":"https:\/\/plaza.umin.ac.jp\/~OIO\/wp-content\/uploads\/2023\/09\/Rplot01.png","jetpack_shortlink":"https:\/\/wp.me\/p9b6zl-Qh","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/posts\/3241","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3241"}],"version-history":[{"count":0,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/posts\/3241\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=\/wp\/v2\/media\/3243"}],"wp:attachment":[{"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3241"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3241"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/plaza.umin.ac.jp\/~OIO\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3241"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}