{"id":4194,"date":"2025-07-11T11:24:43","date_gmt":"2025-07-11T02:24:43","guid":{"rendered":"https:\/\/best-biostatistics.com\/toukei-er\/?p=4194"},"modified":"2025-07-11T11:24:45","modified_gmt":"2025-07-11T02:24:45","slug":"bootstrap-method-strengthening-statistical-inference-through-data-reuse","status":"publish","type":"post","link":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/bootstrap-method-strengthening-statistical-inference-through-data-reuse\/","title":{"rendered":"\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\uff1a\u30c7\u30fc\u30bf\u306e\u300c\u518d\u5229\u7528\u300d\u3067\u7d71\u8a08\u7684\u63a8\u6e2c\u3092\u5f37\u5316\u3059\u308b"},"content":{"rendered":"\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u624b\u5143\u306b\u3042\u308b\u30c7\u30fc\u30bf\u3060\u3051\u3067\u306f\u3001\u672c\u5f53\u306b\u4fe1\u983c\u3067\u304d\u308b\u7d71\u8a08\u7684\u306a\u7d50\u8ad6\u306f\u51fa\u305b\u306a\u3044\u306e\u3067\u306f\u306a\u3044\u304b\uff1f\u305d\u3046\u60a9\u3093\u3060\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u7279\u306b\u3001\u30c7\u30fc\u30bf\u6570\u304c\u5c11\u306a\u3044\u5834\u5408\u3084\u3001\u8907\u96d1\u306a\u7d71\u8a08\u91cf\u306b\u95a2\u5fc3\u304c\u3042\u308b\u5834\u5408\u3001\u305d\u306e\u60a9\u307f\u306f\u5c3d\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u305d\u3093\u306a\u6642\u306b\u975e\u5e38\u306b\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3068\u306a\u308b\u306e\u304c<strong>\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5<\/strong>\u3060\u3002\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306e\u57fa\u672c\u7684\u306a\u8003\u3048\u65b9\u304b\u3089\u3001\u5177\u4f53\u7684\u306aR\u3067\u306e\u8a08\u7b97\u65b9\u6cd5\u3001\u3055\u3089\u306b\u306f\u5fdc\u7528\u4f8b\u307e\u3067\u3001\u5206\u304b\u308a\u3084\u3059\u304f\u89e3\u8aac\u3059\u308b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306e\u6982\u8981<\/h2>\n\n\n\n<p>\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306f\u3001\u624b\u5143\u306b\u3042\u308b<strong>\u9650\u3089\u308c\u305f\u6a19\u672c\u30c7\u30fc\u30bf\u304b\u3089\u3001\u3042\u305f\u304b\u3082\u591a\u6570\u306e\u65b0\u3057\u3044\u6a19\u672c\u3092\u63a1\u53d6\u3057\u305f\u304b\u306e\u3088\u3046\u306b\u632f\u308b\u821e\u3044\u3001\u7d71\u8a08\u7684\u63a8\u6e2c\u3092\u884c\u3046\u305f\u3081\u306e\u5f37\u529b\u306a\u30ea\u30b5\u30f3\u30d7\u30ea\u30f3\u30b0\uff08\u518d\u6a19\u672c\u5316\uff09\u624b\u6cd5<\/strong>\u3067\u3042\u308b\u3002\u3053\u306e\u624b\u6cd5\u306e\u6838\u5fc3\u306f\u3001<strong><mark style=\"background-color:rgba(0, 0, 0, 0)\" class=\"has-inline-color has-swl-deep-01-color\">\u300c\u5fa9\u5143\u62bd\u51fa\u300d<\/mark><\/strong>\u3068\u3044\u3046\u30b7\u30f3\u30d7\u30eb\u306a\u30a2\u30a4\u30c7\u30a2\u306b\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u5177\u4f53\u7684\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u624b\u9806\u3092\u7e70\u308a\u8fd4\u3059\u3002<\/p>\n\n\n\n<ol start=\"1\" class=\"wp-block-list\">\n<li><strong>\u5143\u306e\u6a19\u672c\u304b\u3089\u5fa9\u5143\u62bd\u51fa\u3067\u65b0\u3057\u3044\u6a19\u672c\u3092\u751f\u6210\u3059\u308b<\/strong>\uff1a\u624b\u5143\u306b\u3042\u308bN\u500b\u306e\u30c7\u30fc\u30bf\u304b\u3089\u3001\u91cd\u8907\u3092\u8a31\u3057\u3066N\u500b\u306e\u30c7\u30fc\u30bf\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u9078\u3073\u51fa\u3057\u3001\u65b0\u3057\u3044\u300c\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6a19\u672c\u300d\u3092\u4f5c\u6210\u3059\u308b\u3002\u5143\u306e\u6a19\u672c\u3068\u540c\u3058\u30b5\u30a4\u30ba\u306b\u3059\u308b\u306e\u304c\u4e00\u822c\u7684\u3060\u3002<\/li>\n\n\n\n<li><strong>\u7d71\u8a08\u91cf\u3092\u8a08\u7b97\u3059\u308b<\/strong>\uff1a\u751f\u6210\u3055\u308c\u305f\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6a19\u672c\u3054\u3068\u306b\u3001\u63a8\u5b9a\u3057\u305f\u3044\u7d71\u8a08\u91cf\uff08\u4f8b\u3048\u3070\u3001\u5e73\u5747\u5024\u3001\u4e2d\u592e\u5024\u3001\u5206\u6563\u3001\u76f8\u95a2\u4fc2\u6570\u306a\u3069\uff09\u3092\u8a08\u7b97\u3059\u308b\u3002<\/li>\n\n\n\n<li><strong>\u591a\u6570\u56de\u7e70\u308a\u8fd4\u3059<\/strong>\uff1a\u3053\u306e\u30d7\u30ed\u30bb\u30b9\u3092\u6570\u5343\u56de\u3001\u3042\u308b\u3044\u306f\u6570\u4e07\u56de\u7e70\u308a\u8fd4\u3059\u3053\u3068\u3067\u3001\u5143\u306e\u6a19\u672c\u304b\u3089\u5f97\u3089\u308c\u308b\u53ef\u80fd\u6027\u306e\u3042\u308b\u7d71\u8a08\u91cf\u306e\u5206\u5e03\uff08\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u5206\u5e03\uff09\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30c8\u3059\u308b\u3002<\/li>\n<\/ol>\n\n\n\n<p>\u3053\u306e\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u5206\u5e03\u3092\u5229\u7528\u3059\u308b\u3053\u3068\u3067\u3001<strong>\u6bcd\u96c6\u56e3\u306b\u95a2\u3059\u308b\u7d71\u8a08\u91cf\u306e\u4fe1\u983c\u533a\u9593\u306e\u63a8\u5b9a<\/strong>\u3084\u3001<strong>\u4eee\u8aac\u691c\u5b9a<\/strong>\u306a\u3069\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306e\u4f7f\u3044\u6240<\/h2>\n\n\n\n<p>\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306f\u3001\u69d8\u3005\u306a\u5834\u9762\u3067\u305d\u306e\u771f\u4fa1\u3092\u767a\u63ee\u3059\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u30c7\u30fc\u30bf\u6570\u304c\u5c11\u306a\u3044\u5834\u5408<\/strong>\uff1a\u7279\u306b\u3001\u89e3\u6790\u306b\u4f7f\u3048\u308b\u30c7\u30fc\u30bf\u304c\u9650\u3089\u308c\u3066\u3044\u308b\u5834\u5408\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306f\u7d71\u8a08\u7684\u63a8\u6e2c\u306e\u4fe1\u983c\u6027\u3092\u9ad8\u3081\u308b\u6709\u52b9\u306a\u624b\u6bb5\u3068\u306a\u308b\u3002<\/li>\n\n\n\n<li><strong>\u8907\u96d1\u306a\u7d71\u8a08\u91cf\u306e\u5834\u5408<\/strong>\uff1a\u5e73\u5747\u3084\u5206\u6563\u306e\u3088\u3046\u306a\u5358\u7d14\u306a\u7d71\u8a08\u91cf\u3060\u3051\u3067\u306a\u304f\u3001\u4e2d\u592e\u5024\u3001\u5206\u4f4d\u6570\u3001\u76f8\u95a2\u4fc2\u6570\u3001\u56de\u5e30\u4fc2\u6570\u306a\u3069\u3001\u7406\u8ad6\u7684\u306a\u5206\u5e03\u304c\u5c0e\u304d\u306b\u304f\u3044\u8907\u96d1\u306a\u7d71\u8a08\u91cf\u306b\u5bfe\u3057\u3066\u3082\u3001\u305d\u306e\u5206\u5e03\u3084\u4fe1\u983c\u533a\u9593\u3092\u63a8\u5b9a\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/li>\n\n\n\n<li><strong>\u5206\u5e03\u306e\u4eee\u5b9a\u3092\u7f6e\u304d\u305f\u304f\u306a\u3044\u5834\u5408<\/strong>\uff1a\u30d1\u30e9\u30e1\u30c8\u30ea\u30c3\u30af\u306a\u624b\u6cd5\u306e\u3088\u3046\u306b\u3001\u30c7\u30fc\u30bf\u304c\u7279\u5b9a\u306e\u78ba\u7387\u5206\u5e03\uff08\u4f8b\uff1a\u6b63\u898f\u5206\u5e03\uff09\u306b\u5f93\u3046\u3068\u3044\u3046\u4eee\u5b9a\u3092\u7f6e\u304b\u305a\u306b\u63a8\u6e2c\u3092\u884c\u3044\u305f\u3044\u5834\u5408\u306b\u975e\u5e38\u306b\u6709\u52b9\u3060\u3002\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306f\u3001\u30c7\u30fc\u30bf\u306e<strong>\u7d4c\u9a13\u5206\u5e03<\/strong>\u306b\u57fa\u3065\u3044\u3066\u63a8\u6e2c\u3092\u884c\u3046\u305f\u3081\u3001\u3088\u308a\u30ed\u30d0\u30b9\u30c8\u306a\u7d50\u679c\u304c\u5f97\u3089\u308c\u308b\u3002<\/li>\n\n\n\n<li><strong>\u4fe1\u983c\u533a\u9593\u306e\u63a8\u5b9a<\/strong>\uff1a\u63a8\u5b9a\u91cf\u306e\u4fe1\u983c\u533a\u9593\u3092\u3001\u6a19\u6e96\u7684\u306a\u65b9\u6cd5\u3067\u306f\u8a08\u7b97\u304c\u96e3\u3057\u3044\u5834\u5408\u3067\u3082\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u5206\u5e03\u304b\u3089\u76f4\u63a5\u7684\u306b\u63a8\u5b9a\u3067\u304d\u308b\u3002<\/li>\n\n\n\n<li><strong>\u30d0\u30a4\u30a2\u30b9\u306e\u63a8\u5b9a\u3068\u88dc\u6b63<\/strong>\uff1a\u63a8\u5b9a\u91cf\u306e\u30d0\u30a4\u30a2\u30b9\uff08\u504f\u308a\uff09\u3092\u63a8\u5b9a\u3057\u3001\u5fc5\u8981\u3067\u3042\u308c\u3070\u88dc\u6b63\u3059\u308b\u305f\u3081\u306b\u5229\u7528\u3059\u308b\u3053\u3068\u3082\u3042\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<div id=\"biost-2466545946\" 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\">\u57fa\u790e\u7684\u306a\u5177\u4f53\u4f8b\u3068R\u3067\u306e\u8a08\u7b97\u65b9\u6cd5\uff1a\u5e73\u5747\u5024\u306e\u4fe1\u983c\u533a\u9593<\/h2>\n\n\n\n<p>\u3053\u3053\u3067\u306f\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u3092\u4f7f\u3063\u3066\u3001\u3042\u308b\u30c7\u30fc\u30bf\u30bb\u30c3\u30c8\u306e\u5e73\u5747\u5024\u306e95%\u4fe1\u983c\u533a\u9593\u3092\u63a8\u5b9a\u3059\u308b\u4f8b\u3092\u898b\u3066\u307f\u3088\u3046\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b7\u30ca\u30ea\u30aa<\/h3>\n\n\n\n<p>\u3042\u308b\u5b66\u6821\u306e\u751f\u5f9215\u4eba\u306e\u6570\u5b66\u306e\u30c6\u30b9\u30c8\u306e\u70b9\u6570\u30c7\u30fc\u30bf\u304c\u3042\u308b\u3082\u306e\u3068\u3059\u308b\u3002\u3053\u306e\u30c7\u30fc\u30bf\u304b\u3089\u3001\u5168\u751f\u5f92\u306e\u6570\u5b66\u306e\u5e73\u5747\u70b9\u306b\u95a2\u3059\u308b95%\u4fe1\u983c\u533a\u9593\u3092\u63a8\u5b9a\u3057\u305f\u3044\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">R\u3067\u306e\u8a08\u7b97\u65b9\u6cd5<\/h3>\n\n\n\n<p>R\u3067\u306f\u3001<code>boot<\/code>\u30d1\u30c3\u30b1\u30fc\u30b8\u304c\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u3092\u975e\u5e38\u306b\u7c21\u5358\u306b\u884c\u3048\u308b\u3088\u3046\u306b\u3057\u3066\u304f\u308c\u308b\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<p><strong>R \u30b9\u30af\u30ea\u30d7\u30c8\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u30c7\u30fc\u30bf\u3092\u6e96\u5099\nset.seed(123) # \u518d\u73fe\u6027\u306e\u305f\u3081\u306b\u30b7\u30fc\u30c9\u3092\u8a2d\u5b9a\nscores &lt;- c(65, 70, 75, 80, 85, 60, 90, 72, 78, 88, 68, 73, 82, 77, 92)\n<\/code><\/pre>\n\n\n\n<p>\u6b21\u306b\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3092\u884c\u3046\u305f\u3081\u306e\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3002\u3053\u306e\u95a2\u6570\u306f\u3001\u30c7\u30fc\u30bf\u3068\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u53d7\u3051\u53d6\u308a\u3001\u8a08\u7b97\u3057\u305f\u3044\u7d71\u8a08\u91cf\uff08\u3053\u3053\u3067\u306f\u5e73\u5747\u5024\uff09\u3092\u8fd4\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5e73\u5747\u5024\u3092\u8a08\u7b97\u3059\u308b\u95a2\u6570\nmean_function &lt;- function(data, indices) {\n  mean(data&#91;indices])\n}\n<\/code><\/pre>\n\n\n\n<p><code>boot<\/code>\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># boot\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30ed\u30fc\u30c9\nlibrary(boot)\n\n# \u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3092\u5b9f\u884c (R = 10000\u56de\u7e70\u308a\u8fd4\u3059)\nboot_results_mean &lt;- boot(data = scores, statistic = mean_function, R = 10000)\n\n# \u7d50\u679c\u306e\u8868\u793a\nprint(boot_results_mean)\n<\/code><\/pre>\n\n\n\n<p>\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u306e\u7d50\u679c\u304b\u3089\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4fe1\u983c\u533a\u9593\u306e\u8a08\u7b97 (Percentile method)\nboot.ci(boot_results_mean, type = \"perc\")\n<\/code><\/pre>\n\n\n\n\n\n\n\n<p><strong>\u5b9f\u884c\u7d50\u679c\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> # \u4fe1\u983c\u533a\u9593\u306e\u8a08\u7b97 (Percentile method)\n> boot.ci(boot_results_mean, type = \"perc\")\nBOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS\nBased on 10000 bootstrap replicates\n\nCALL : \nboot.ci(boot.out = boot_results_mean, type = \"perc\")\n\nIntervals : \nLevel     Percentile     \n95%   (72.47, 81.60 )  \nCalculations and Intervals on Original Scale\n> <\/code><\/pre>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<p>\u3053\u306e\u7d50\u679c\u304b\u3089\u3001\u300c\u6570\u5b66\u306e\u5e73\u5747\u70b9\u306e95%\u4fe1\u983c\u533a\u9593\u306f[72.47, 81.60]\u3067\u3042\u308b\u300d\u3068\u8a00\u3048\u308b\u3002\u3053\u308c\u306f\u3001\u3082\u3057\u540c\u3058\u30d7\u30ed\u30bb\u30b9\u3092\u4f55\u5ea6\u3082\u7e70\u308a\u8fd4\u3057\u305f\u3089\u300195%\u306e\u78ba\u7387\u3067\u771f\u306e\u6bcd\u5e73\u5747\u304c\u3053\u306e\u533a\u9593\u5185\u306b\u542b\u307e\u308c\u308b\u3053\u3068\u3092\u610f\u5473\u3059\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u5fdc\u7528\u7684\u306a\u5177\u4f53\u4f8b\u3068R\u3067\u306e\u8a08\u7b97\u65b9\u6cd5\uff1a\u56de\u5e30\u4fc2\u6570\u306e\u4fe1\u983c\u533a\u9593<\/h2>\n\n\n\n<p>\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306f\u3001\u3088\u308a\u8907\u96d1\u306a\u7d71\u8a08\u30e2\u30c7\u30ea\u30f3\u30b0\u3001\u4f8b\u3048\u3070<strong>\u7dda\u5f62\u56de\u5e30\u306e\u56de\u5e30\u4fc2\u6570\u306e\u4fe1\u983c\u533a\u9593\u63a8\u5b9a<\/strong>\u306b\u3082\u5229\u7528\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u30b7\u30ca\u30ea\u30aa<\/h3>\n\n\n\n<p>\u751f\u5f92\u306e\u6570\u5b66\u306e\u70b9\u6570\u304c\u3001\u5b66\u7fd2\u6642\u9593\uff08\u6642\u9593\uff09\u3067\u4e88\u6e2c\u3067\u304d\u308b\u304b\u3069\u3046\u304b\u3092\u8abf\u3079\u305f\u3044\u3068\u3059\u308b\u3002\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3057\u3001\u5b66\u7fd2\u6642\u9593\u306e\u4fc2\u6570\uff08\u50be\u304d\uff09\u306e\u4fe1\u983c\u533a\u9593\u3092\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u3067\u63a8\u5b9a\u3059\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">R\u3067\u306e\u8a08\u7b97\u65b9\u6cd5<\/h3>\n\n\n\n<p>\u307e\u305a\u3001\u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<p><strong>R \u30b9\u30af\u30ea\u30d7\u30c8\u4f8b\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u30c7\u30fc\u30bf\u3092\u6e96\u5099\nset.seed(456) # \u518d\u73fe\u6027\u306e\u305f\u3081\u306b\u30b7\u30fc\u30c9\u3092\u8a2d\u5b9a\nlearning_hours &lt;- c(2, 3, 4, 5, 6, 1, 7, 3, 4, 6, 2, 3, 5, 4, 7)\nscores_reg &lt;- c(68, 72, 76, 80, 84, 62, 90, 70, 75, 86, 66, 71, 81, 78, 92)\ndata_reg &lt;- data.frame(hours = learning_hours, score = scores_reg)\n<\/code><\/pre>\n\n\n\n<p>\u6b21\u306b\u3001\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3092\u884c\u3046\u305f\u3081\u306e\u95a2\u6570\u3092\u5b9a\u7fa9\u3059\u308b\u3002\u3053\u306e\u95a2\u6570\u306f\u3001\u30c7\u30fc\u30bf\u3068\u30a4\u30f3\u30c7\u30c3\u30af\u30b9\u3092\u53d7\u3051\u53d6\u308a\u3001\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u3092\u30d5\u30a3\u30c3\u30c8\u3057\u3001\u5b66\u7fd2\u6642\u9593\u306e\u4fc2\u6570\uff08\u3053\u3053\u3067\u306f<code>hours<\/code>\u306e\u4fc2\u6570\uff09\u3092\u8fd4\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u56de\u5e30\u4fc2\u6570\u3092\u8a08\u7b97\u3059\u308b\u95a2\u6570\nreg_coef_function &lt;- function(data, indices) {\n  d &lt;- data&#91;indices, ] # \u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6a19\u672c\u3092\u4f5c\u6210\n  model &lt;- lm(score ~ hours, data = d) # \u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u3092\u30d5\u30a3\u30c3\u30c8\n  coef(model)&#91;\"hours\"] # hours\u306e\u4fc2\u6570\u3092\u8fd4\u3059\n}\n<\/code><\/pre>\n\n\n\n<p><code>boot<\/code>\u95a2\u6570\u3092\u4f7f\u3063\u3066\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># boot\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30ed\u30fc\u30c9 (\u3059\u3067\u306b\u30ed\u30fc\u30c9\u6e08\u307f\u306a\u3089\u4e0d\u8981)\nlibrary(boot)\n\n# \u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u3092\u5b9f\u884c (R = 10000\u56de\u7e70\u308a\u8fd4\u3059)\nboot_results_reg &lt;- boot(data = data_reg, statistic = reg_coef_function, R = 10000)\n\n# \u7d50\u679c\u306e\u8868\u793a\nprint(boot_results_reg)\n<\/code><\/pre>\n\n\n\n<p>\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u306e\u7d50\u679c\u304b\u3089\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4fe1\u983c\u533a\u9593\u306e\u8a08\u7b97 (Percentile method)\nboot.ci(boot_results_reg, type = \"perc\")\n<\/code><\/pre>\n\n\n\n<p><strong>\u5b9f\u884c\u7d50\u679c\uff1a<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> # \u4fe1\u983c\u533a\u9593\u306e\u8a08\u7b97 (Percentile method)\n> boot.ci(boot_results_reg, type = \"perc\")\nBOOTSTRAP CONFIDENCE INTERVAL CALCULATIONS\nBased on 10000 bootstrap replicates\n\nCALL : \nboot.ci(boot.out = boot_results_reg, type = \"perc\")\n\nIntervals : \nLevel     Percentile     \n95%   ( 4.415,  5.047 )  \nCalculations and Intervals on Original Scale\n> <\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u7d50\u679c\u304b\u3089\u3001\u300c\u5b66\u7fd2\u6642\u9593\u306e\u4fc2\u6570\u306e95%\u4fe1\u983c\u533a\u9593\u306f[4.415, 5.047]\u3067\u3042\u308b\u300d\u3068\u8a00\u3048\u308b\u3002\u3053\u308c\u306f\u3001\u5b66\u7fd2\u6642\u9593\u304c1\u6642\u9593\u5897\u3048\u308b\u3054\u3068\u306b\u6570\u5b66\u306e\u70b9\u6570\u304c\u5e73\u5747\u7684\u306b\u7d04 4.4 \u70b9\u304b\u3089 5.0 \u70b9\u306e\u9593\u3067\u5897\u52a0\u3059\u308b\u3068\u3044\u3063\u305f\u89e3\u91c8\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u306f\u3001\u624b\u5143\u306b\u3042\u308b\u30c7\u30fc\u30bf\u304b\u3089\u3001\u7d71\u8a08\u7684\u306a\u63a8\u6e2c\u3092\u3088\u308a\u30ed\u30d0\u30b9\u30c8\u306b\u884c\u3046\u305f\u3081\u306e\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3060\u3002\u7279\u306b\u3001\u30c7\u30fc\u30bf\u6570\u304c\u5c11\u306a\u3044\u5834\u5408\u3084\u3001\u8907\u96d1\u306a\u7d71\u8a08\u91cf\u3001\u3042\u308b\u3044\u306f\u5206\u5e03\u306e\u4eee\u5b9a\u3092\u7f6e\u304d\u305f\u304f\u306a\u3044\u5834\u5408\u306b\u305d\u306e\u5a01\u529b\u3092\u767a\u63ee\u3059\u308b\u3002<\/p>\n\n\n\n<p>R\u306e<code>boot<\/code>\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u3048\u3070\u3001\u57fa\u672c\u7684\u306a\u5e73\u5747\u5024\u306e\u4fe1\u983c\u533a\u9593\u63a8\u5b9a\u304b\u3089\u3001\u7dda\u5f62\u56de\u5e30\u306e\u4fc2\u6570\u63a8\u5b9a\u307e\u3067\u3001\u69d8\u3005\u306a\u7d71\u8a08\u7684\u63a8\u6e2c\u306b\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u3092\u7c21\u5358\u306b\u9069\u7528\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u624b\u6cd5\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u3042\u306a\u305f\u306e\u30c7\u30fc\u30bf\u5206\u6790\u306f\u3088\u308a\u4fe1\u983c\u6027\u304c\u9ad8\u304f\u3001\u8aac\u5f97\u529b\u306e\u3042\u308b\u3082\u306e\u3068\u306a\u308b\u3060\u308d\u3046\u3002\u305c\u3072\u3001\u81ea\u8eab\u306e\u30c7\u30fc\u30bf\u3067\u30d6\u30fc\u30c8\u30b9\u30c8\u30e9\u30c3\u30d7\u6cd5\u3092\u8a66\u3057\u3066\u307f\u3066\u307b\u3057\u3044\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>\u624b\u5143\u306b\u3042\u308b\u30c7\u30fc\u30bf\u3060\u3051\u3067\u306f\u3001\u672c\u5f53\u306b\u4fe1\u983c\u3067\u304d\u308b\u7d71\u8a08\u7684\u306a\u7d50\u8ad6\u306f\u51fa\u305b\u306a\u3044\u306e\u3067\u306f\u306a\u3044\u304b\uff1f\u305d\u3046\u60a9\u3093\u3060\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\u3002\u7279\u306b\u3001\u30c7\u30fc\u30bf\u6570\u304c\u5c11\u306a\u3044\u5834\u5408\u3084\u3001\u8907\u96d1\u306a\u7d71\u8a08\u91cf\u306b\u95a2\u5fc3\u304c\u3042\u308b\u5834\u5408\u3001\u305d\u306e\u60a9\u307f\u306f\u5c3d\u304d\u306a\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u305d\u3093\u306a\u6642\u306b\u975e\u5e38\u306b\u5f37\u529b [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"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":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[22],"tags":[],"class_list":["post-4194","post","type-post","status-publish","format-standard","hentry","category-22"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4194","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=4194"}],"version-history":[{"count":2,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4194\/revisions"}],"predecessor-version":[{"id":4196,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4194\/revisions\/4196"}],"wp:attachment":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media?parent=4194"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/categories?post=4194"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/tags?post=4194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}