{"id":4343,"date":"2025-07-29T23:15:41","date_gmt":"2025-07-29T14:15:41","guid":{"rendered":"https:\/\/best-biostatistics.com\/toukei-er\/?p=4343"},"modified":"2025-07-29T23:15:43","modified_gmt":"2025-07-29T14:15:43","slug":"heteroscedasticity-and-its-solutions-making-statistical-models-more-robust","status":"publish","type":"post","link":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/heteroscedasticity-and-its-solutions-making-statistical-models-more-robust\/","title":{"rendered":"\u4e0d\u5747\u4e00\u5206\u6563\u3068\u305d\u306e\u5bfe\u51e6\u6cd5\uff1a\u7d71\u8a08\u30e2\u30c7\u30ea\u30f3\u30b0\u3092\u3088\u308a\u9811\u5065\u306b\u3059\u308b\u305f\u3081\u306b"},"content":{"rendered":"\n<p>\u7d71\u8a08\u30e2\u30c7\u30ea\u30f3\u30b0\u3092\u884c\u3046\u969b\u3001\u30c7\u30fc\u30bf\u306e\u300c\u5206\u6563\u300d\u304c\u5747\u4e00\u3067\u3042\u308b\u3068\u3044\u3046\u4eee\u5b9a\u3092\u7f6e\u304f\u3053\u3068\u304c\u3088\u304f\u3042\u308b\u3002\u3057\u304b\u3057\u3001\u73fe\u5b9f\u306e\u30c7\u30fc\u30bf\u3067\u306f\u3053\u306e\u4eee\u5b9a\u304c\u6210\u308a\u7acb\u305f\u306a\u3044\u3001\u3064\u307e\u308a\u300c<strong>\u4e0d\u5747\u4e00\u5206\u6563<\/strong>\u300d\u3092\u793a\u3059\u30b1\u30fc\u30b9\u304c\u5c11\u306a\u304f\u306a\u3044\u3002\u4e0d\u5747\u4e00\u5206\u6563\u306f\u3001\u7d71\u8a08\u7684\u63a8\u8ad6\u306e\u4fe1\u983c\u6027\u3092\u640d\u306a\u3046\u53ef\u80fd\u6027\u304c\u3042\u308a\u3001\u9069\u5207\u306a\u5bfe\u51e6\u304c\u4e0d\u53ef\u6b20\u3067\u3042\u308b\u3002\u672c\u8a18\u4e8b\u3067\u306f\u3001\u4e0d\u5747\u4e00\u5206\u6563\u3068\u306f\u4f55\u304b\u3001\u305d\u306e\u554f\u984c\u70b9\u3001\u305d\u3057\u3066\u69d8\u3005\u306a\u5bfe\u51e6\u6cd5\u306b\u3064\u3044\u3066\u3001\u5177\u4f53\u7684\u306a\u4f8b\u3092\u4ea4\u3048\u306a\u304c\u3089\u89e3\u8aac\u3059\u308b\u3002\u7279\u306b\u3001\u7d71\u8a08\u89e3\u6790\u30c4\u30fc\u30ebR\u3092\u7528\u3044\u305f\u8a08\u7b97\u4f8b\u3082\u7d39\u4ecb\u3057\u3001\u5b9f\u8df5\u7684\u306a\u7406\u89e3\u3092\u6df1\u3081\u3066\u3044\u304f\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0d\u5747\u4e00\u5206\u6563\u3068\u306f<\/h2>\n\n\n\n<p><strong>\u4e0d\u5747\u4e00\u5206\u6563<\/strong>\uff08Heteroscedasticity\uff09\u3068\u306f\u3001\u7d71\u8a08\u30e2\u30c7\u30eb\u306b\u304a\u3051\u308b\u8aa4\u5dee\u9805\u306e\u5206\u6563\u304c\u3001\u8aac\u660e\u5909\u6570\u306e\u5024\u306b\u3088\u3063\u3066\u7570\u306a\u308b\u72b6\u614b\u3092\u6307\u3059\u3002\u4f8b\u3048\u3070\u3001\u3042\u308b\u8aac\u660e\u5909\u6570\u306e\u5024\u304c\u5c0f\u3055\u3044\u3068\u304d\u306b\u306f\u8aa4\u5dee\u306e\u3070\u3089\u3064\u304d\u304c\u5c0f\u3055\u3044\u306e\u306b\u3001\u305d\u306e\u5024\u304c\u5927\u304d\u304f\u306a\u308b\u306b\u3064\u308c\u3066\u8aa4\u5dee\u306e\u3070\u3089\u3064\u304d\u3082\u5927\u304d\u304f\u306a\u308b\u3001\u3068\u3044\u3063\u305f\u72b6\u6cc1\u304c\u4e0d\u5747\u4e00\u5206\u6563\u306e\u5178\u578b\u4f8b\u3067\u3042\u308b\u3002\u3053\u308c\u306b\u5bfe\u3057\u3001\u8aa4\u5dee\u9805\u306e\u5206\u6563\u304c\u8aac\u660e\u5909\u6570\u306e\u5024\u306b\u304b\u304b\u308f\u3089\u305a\u4e00\u5b9a\u3067\u3042\u308b\u72b6\u614b\u3092<strong>\u5747\u4e00\u5206\u6563<\/strong>\uff08Homoscedasticity\uff09\u3068\u547c\u3076\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0d\u5747\u4e00\u5206\u6563\u306e\u554f\u984c\u70b9<\/h2>\n\n\n\n<p>\u4e0d\u5747\u4e00\u5206\u6563\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u6700\u5c0f\u4e8c\u4e57\u6cd5\uff08OLS\uff09\u3092\u7528\u3044\u305f\u7dda\u5f62\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u63a8\u5b9a\u7d50\u679c\u306b\u306f\u3001\u4ee5\u4e0b\u306e\u3088\u3046\u306a\u554f\u984c\u304c\u751f\u3058\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u4fc2\u6570\u63a8\u5b9a\u91cf\u306e\u4e0d\u504f\u6027\u306f\u4fdd\u305f\u308c\u308b\u304c\u3001\u52b9\u7387\u6027\u304c\u5931\u308f\u308c\u308b<\/strong>: \u63a8\u5b9a\u3055\u308c\u305f\u56de\u5e30\u4fc2\u6570\u306f\u6b63\u3057\u3044\u5024\u3092\u6307\u3059\u3082\u306e\u306e\u3001\u305d\u306e\u63a8\u5b9a\u5024\u306e\u3070\u3089\u3064\u304d\u304c\u5927\u304d\u304f\u306a\u308b\u3002<\/li>\n\n\n\n<li><strong>\u6a19\u6e96\u8aa4\u5dee\u306e\u904e\u5c0f\u8a55\u4fa1\u307e\u305f\u306f\u904e\u5927\u8a55\u4fa1<\/strong>: \u4e0d\u5747\u4e00\u5206\u6563\u304c\u3042\u308b\u5834\u5408\u3001OLS\u304c\u7b97\u51fa\u3059\u308b\u6a19\u6e96\u8aa4\u5dee\u306f\u771f\u306e\u6a19\u6e96\u8aa4\u5dee\u3092\u6b63\u78ba\u306b\u53cd\u6620\u3057\u306a\u3044\u3002\u591a\u304f\u306e\u5834\u5408\u3001\u6a19\u6e96\u8aa4\u5dee\u304c\u904e\u5c0f\u8a55\u4fa1\u3055\u308c\u3001\u7d50\u679c\u3068\u3057\u3066\u7d71\u8a08\u7684\u6709\u610f\u6027\u304c\u3042\u308b\u3068\u3044\u3046\u8aa4\u3063\u305f\u7d50\u8ad6\u3092\u5c0e\u304d\u3084\u3059\u304f\u306a\u308b\u3002<\/li>\n\n\n\n<li><strong>\u4fe1\u983c\u533a\u9593\u3068\u4eee\u8aac\u691c\u5b9a\u306e\u4fe1\u983c\u6027\u306e\u4f4e\u4e0b<\/strong>: \u6a19\u6e96\u8aa4\u5dee\u306e\u4e0d\u6b63\u78ba\u3055\u306b\u3088\u308a\u3001\u69cb\u7bc9\u3055\u308c\u308b\u4fe1\u983c\u533a\u9593\u306f\u771f\u306e\u6bcd\u6570\u3092\u30ab\u30d0\u30fc\u305b\u305a\u3001\u4eee\u8aac\u691c\u5b9a\u306e\u7d50\u679c\u3082\u4fe1\u983c\u3067\u304d\u306a\u304f\u306a\u308b\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u8aa4\u3063\u305f\u610f\u601d\u6c7a\u5b9a\u306b\u3064\u306a\u304c\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<div id=\"biost-3728511603\" 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\">\u4e0d\u5747\u4e00\u5206\u6563\u306e\u5bfe\u51e6\u6cd5<\/h2>\n\n\n\n<p>\u4e0d\u5747\u4e00\u5206\u6563\u306b\u5bfe\u51e6\u3059\u308b\u305f\u3081\u306e\u65b9\u6cd5\u306f\u3044\u304f\u3064\u304b\u5b58\u5728\u3059\u308b\u3002<\/p>\n\n\n\n<ul start=\"1\" class=\"wp-block-list\">\n<li>\u9811\u5065\u306a\uff08\u30ed\u30d0\u30b9\u30c8\uff09\u6a19\u6e96\u8aa4\u5dee\uff08Robust Standard Errors\uff09\u306e\u4f7f\u7528:\u4e0d\u5747\u4e00\u5206\u6563\u304c\u5b58\u5728\u3057\u3066\u3082\u3001\u56de\u5e30\u4fc2\u6570\u306e\u63a8\u5b9a\u5024\u81ea\u4f53\u306f\u4e0d\u504f\u6027\u3092\u4fdd\u3064\u3002\u554f\u984c\u306f\u6a19\u6e96\u8aa4\u5dee\u306e\u4e0d\u6b63\u78ba\u3055\u306b\u3042\u308b\u305f\u3081\u3001\u3053\u308c\u3092\u88dc\u6b63\u3059\u308b\u65b9\u6cd5\u3067\u3042\u308b\u3002White\u306e\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\uff08\u307e\u305f\u306fHuber-White\u6a19\u6e96\u8aa4\u5dee\uff09\u304c\u4ee3\u8868\u7684\u3067\u3042\u308a\u3001\u3053\u308c\u306f\u4e0d\u5747\u4e00\u5206\u6563\u304c\u5b58\u5728\u3057\u3066\u3082\u3001\u6f38\u8fd1\u7684\u306b\u6b63\u3057\u3044\u6a19\u6e96\u8aa4\u5dee\u3092\u4e0e\u3048\u308b\u3053\u3068\u304c\u77e5\u3089\u308c\u3066\u3044\u308b\u3002R\u3067\u306f<code>sandwich<\/code>\u30d1\u30c3\u30b1\u30fc\u30b8\u306a\u3069\u3092\u7528\u3044\u3066\u7c21\u5358\u306b\u8a08\u7b97\u3067\u304d\u308b\u3002<\/li>\n\n\n\n<li>\u5206\u6563\u5b89\u5b9a\u5316\u5909\u63db\uff08Variance Stabilizing Transformation\uff09:\u5f93\u5c5e\u5909\u6570\u306b\u6570\u5b66\u7684\u306a\u5909\u63db\u3092\u65bd\u3059\u3053\u3068\u3067\u3001\u8aa4\u5dee\u306e\u5206\u6563\u3092\u5747\u4e00\u306b\u8fd1\u3065\u3051\u308b\u65b9\u6cd5\u3067\u3042\u308b\u3002\n<ul class=\"wp-block-list\">\n<li><strong>\u5bfe\u6570\u5909\u63db\uff08Log Transformation\uff09<\/strong>: \u30c7\u30fc\u30bf\u304c\u5e83\u7bc4\u56f2\u306b\u5206\u5e03\u3057\u3001\u5206\u6563\u304c\u5e73\u5747\u5024\u306b\u6bd4\u4f8b\u3057\u3066\u5927\u304d\u304f\u306a\u308b\u5834\u5408\u306b\u6709\u52b9\u3067\u3042\u308b\u3002\u4f8b\uff1a$Y&#8217;=\\log{Y}$<\/li>\n\n\n\n<li><strong>\u5e73\u65b9\u6839\u5909\u63db\uff08Square Root Transformation\uff09<\/strong>: \u30dd\u30a2\u30bd\u30f3\u5206\u5e03\u306b\u5f93\u3046\u30ab\u30a6\u30f3\u30c8\u30c7\u30fc\u30bf\u306a\u3069\u3001\u5206\u6563\u304c\u5e73\u5747\u5024\u306b\u6bd4\u4f8b\u3059\u308b\u5834\u5408\u306b\u6709\u52b9\u3067\u3042\u308b\u3002\u4f8b\uff1a$Y&#8217;=\\sqrt{Y}$<\/li>\n\n\n\n<li>\u9006\u6570\u5909\u63db\uff08Reciprocal Transformation\uff09: \u5206\u6563\u304c\u5e73\u5747\u5024\u306e2\u4e57\u306b\u6bd4\u4f8b\u3059\u308b\u5834\u5408\u306a\u3069\u306b\u6709\u52b9\u3067\u3042\u308b\u3002\u4f8b\uff1a$Y&#8217;=1\/Y$ \u305f\u3060\u3057\u3001\u5909\u63db\u5f8c\u306e\u30e2\u30c7\u30eb\u306e\u89e3\u91c8\u304c\u5143\u306e\u5c3a\u5ea6\u3068\u7570\u306a\u308b\u305f\u3081\u3001\u6ce8\u610f\u304c\u5fc5\u8981\u3067\u3042\u308b\u3002<\/li>\n<\/ul>\n<\/li>\n\n\n\n<li>\u52a0\u91cd\u6700\u5c0f\u4e8c\u4e57\u6cd5\uff08Weighted Least Squares, WLS\uff09:\u8aa4\u5dee\u306e\u5206\u6563\u304c\u5c0f\u3055\u3044\u89b3\u6e2c\u5024\u306b\u306f\u5927\u304d\u306a\u91cd\u307f\u3092\u3001\u5206\u6563\u304c\u5927\u304d\u3044\u89b3\u6e2c\u5024\u306b\u306f\u5c0f\u3055\u306a\u91cd\u307f\u3092\u4e0e\u3048\u3066\u56de\u5e30\u5206\u6790\u3092\u884c\u3046\u65b9\u6cd5\u3067\u3042\u308b\u3002\u5206\u6563\u306e\u9006\u6570\u3092\u91cd\u307f\u3068\u3057\u3066\u4f7f\u7528\u3059\u308b\u3002\u5206\u6563\u306e\u69cb\u9020\u3092\u4e8b\u524d\u306b\u77e5\u308b\u5fc5\u8981\u304c\u3042\u308b\u305f\u3081\u3001\u9069\u7528\u304c\u96e3\u3057\u3044\u5834\u5408\u3082\u3042\u308b\u304c\u3001\u4e0d\u5747\u4e00\u5206\u6563\u306e\u30d1\u30bf\u30fc\u30f3\u304c\u7279\u5b9a\u3067\u304d\u308b\u5834\u5408\u306b\u306f\u975e\u5e38\u306b\u6709\u52b9\u3067\u3042\u308b\u3002<\/li>\n\n\n\n<li>\u4e00\u822c\u5316\u7dda\u5f62\u30e2\u30c7\u30eb\uff08Generalized Linear Models, GLMs\uff09:\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\uff08\u30ab\u30a6\u30f3\u30c8\u30c7\u30fc\u30bf\uff09\u3001\u30ac\u30f3\u30de\u56de\u5e30\uff08\u9023\u7d9a\u3067\u6b63\u306e\u5024\u3092\u53d6\u308b\u30c7\u30fc\u30bf\uff09\u306a\u3069\u3001\u8aa4\u5dee\u306e\u5206\u5e03\u304c\u6b63\u898f\u5206\u5e03\u3067\u306f\u306a\u3044\u30c7\u30fc\u30bf\u306b\u5bfe\u5fdc\u3059\u308b\u30e2\u30c7\u30eb\u3067\u3042\u308b\u3002\u3053\u308c\u3089\u306e\u30e2\u30c7\u30eb\u3067\u306f\u3001\u5e73\u5747\u3068\u5206\u6563\u306e\u95a2\u4fc2\u3092\u30e2\u30c7\u30eb\u5185\u306b\u7d44\u307f\u8fbc\u3080\u3053\u3068\u304c\u3067\u304d\u308b\u305f\u3081\u3001\u4e0d\u5747\u4e00\u5206\u6563\u306e\u554f\u984c\u3092\u3088\u308a\u81ea\u7136\u306b\u6271\u3046\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">\u4e0d\u5747\u4e00\u5206\u6563\u306e\u5177\u4f53\u4f8b<\/h2>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001\u3042\u308b\u4f01\u696d\u306e\u58f2\u4e0a\u30c7\u30fc\u30bf\u3068\u5e83\u544a\u8cbb\u306e\u95a2\u4fc2\u3092\u5206\u6790\u3059\u308b\u30b1\u30fc\u30b9\u3092\u8003\u3048\u308b\u3002\u5e83\u544a\u8cbb\u304c\u5c11\u306a\u3044\u5c0f\u898f\u6a21\u306a\u4f01\u696d\u3067\u306f\u58f2\u4e0a\u306e\u3070\u3089\u3064\u304d\u3082\u5c0f\u3055\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u304c\u3001\u5e83\u544a\u8cbb\u3092\u83ab\u5927\u306b\u6295\u3058\u308b\u5927\u4f01\u696d\u3067\u306f\u58f2\u4e0a\u306e\u3070\u3089\u3064\u304d\u3082\u975e\u5e38\u306b\u5927\u304d\u304f\u306a\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002\u3053\u308c\u306f\u3001\u5e83\u544a\u8cbb\u304c\u5897\u3048\u308b\u306b\u3064\u308c\u3066\u58f2\u4e0a\u306e\u4e88\u6e2c\u8aa4\u5dee\uff08\u6b8b\u5dee\uff09\u306e\u3070\u3089\u3064\u304d\u304c\u5927\u304d\u304f\u306a\u308b\u3001\u5178\u578b\u7684\u306a\u4e0d\u5747\u4e00\u5206\u6563\u306e\u4f8b\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">R\u3067\u306e\u8a08\u7b97\u4f8b<\/h3>\n\n\n\n<p>\u3053\u3053\u3067\u306f\u3001\u4e0d\u5747\u4e00\u5206\u6563\u3092\u6301\u3064\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3057\u3001OLS\u56de\u5e30\u3068\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u3092\u7528\u3044\u305fOLS\u56de\u5e30\u306e\u7d50\u679c\u3092\u6bd4\u8f03\u3059\u308bR\u3067\u306e\u8a08\u7b97\u4f8b\u3092\u793a\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\uff08\u307e\u3060\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u5834\u5408\uff09\n# install.packages(\"lmtest\")\n# install.packages(\"sandwich\")\n\n# \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8aad\u307f\u8fbc\u307f\nlibrary(lmtest)   # coeftest\u95a2\u6570\u7528\nlibrary(sandwich) # vcovHC\u95a2\u6570\u7528\n\n# \u4e0d\u5747\u4e00\u5206\u6563\u3092\u6301\u3064\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u306e\u751f\u6210\nset.seed(123)\nn &lt;- 100\nx &lt;- runif(n, 1, 10) # \u8aac\u660e\u5909\u6570\n# \u8aa4\u5dee\u306e\u5206\u6563\u304cx\u306e\u5897\u52a0\u3068\u3068\u3082\u306b\u5927\u304d\u304f\u306a\u308b\u3088\u3046\u306b\u8a2d\u5b9a\nepsilon &lt;- rnorm(n, 0, 0.5 * x)\ny &lt;- 2 + 3 * x + epsilon # \u5f93\u5c5e\u5909\u6570\n\n# \u30c7\u30fc\u30bf\u3092\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u307e\u3068\u3081\u308b\ndf &lt;- data.frame(x, y)\n\n# \u30c7\u30fc\u30bf\u306e\u53ef\u8996\u5316\uff08\u4e0d\u5747\u4e00\u5206\u6563\u306e\u78ba\u8a8d\uff09\npar(mfrow = c(2,1), mar = c(5,5,3,2), oma = c(0,0,0,0), cex = 1.5)\nplot(df$x, df$y,\n     main = \"\u4e0d\u5747\u4e00\u5206\u6563\u3092\u6301\u3064\u30c7\u30fc\u30bf\u306e\u4f8b\",\n     xlab = \"\u8aac\u660e\u5909\u6570 (x)\",\n     ylab = \"\u5f93\u5c5e\u5909\u6570 (y)\")\n# \u56de\u5e30\u76f4\u7dda\u3092\u8ffd\u52a0\nabline(lm(y ~ x, data = df), col = \"red\")\n\n# OLS\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u63a8\u5b9a\nmodel_ols &lt;- lm(y ~ x, data = df)\nsummary(model_ols)\n\n# OLS\u30e2\u30c7\u30eb\u306e\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\nplot(model_ols$fitted.values, model_ols$residuals,\n     main = \"OLS\u30e2\u30c7\u30eb\u306e\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\",\n     xlab = \"\u4e88\u6e2c\u5024\",\n     ylab = \"\u6b8b\u5dee\")\nabline(h = 0, col = \"red\", lty = 2) # \u30bc\u30ed\u30e9\u30a4\u30f3\n\n# \u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u3092\u7528\u3044\u305f\u4fc2\u6570\u63a8\u5b9a\n# type = \"HC1\"\u306fWhite\u306e\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u306e\u4e00\u7a2e\ncoeftest(model_ols, vcov = vcovHC(model_ols, type = \"HC1\"))\n<\/code><\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"659\" height=\"509\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/Screenshot-from-2025-07-29-23-01-30.png\" alt=\"\" class=\"wp-image-4351\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/Screenshot-from-2025-07-29-23-01-30.png 659w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/Screenshot-from-2025-07-29-23-01-30-300x232.png 300w\" sizes=\"(max-width: 659px) 100vw, 659px\" \/><\/figure>\n\n\n\n<p>\u8aac\u660e\u5909\u6570 x \u304c\u5927\u304d\u3044\u307b\u3069\u3001\u5f93\u5c5e\u5909\u6570 y \u306e\u3070\u3089\u3064\u304d\u304c\u5927\u304d\u3044\u306e\u304c\u308f\u304b\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> # OLS\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u63a8\u5b9a\n> model_ols &lt;- lm(y ~ x, data = df)\n> summary(model_ols)\n\nCall:\nlm(formula = y ~ x, data = df)\n\nResiduals:\n    Min      1Q  Median      3Q     Max \n-8.1305 -1.6273  0.0422  1.2916 10.1121 \n\nCoefficients:\n            Estimate Std. Error t value Pr(>|t|)    \n(Intercept)   1.9557     0.6977   2.803   0.0061 ** \nx             2.9753     0.1153  25.805   &lt;2e-16 ***\n---\nSignif. codes:  0 \u2018***\u2019 0.001 \u2018**\u2019 0.01 \u2018*\u2019 0.05 \u2018.\u2019 0.1 \u2018 \u2019 1\n\nResidual standard error: 2.943 on 98 degrees of freedom\nMultiple R-squared:  0.8717,    Adjusted R-squared:  0.8704 \nF-statistic: 665.9 on 1 and 98 DF,  p-value: &lt; 2.2e-16\n\n> <\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"654\" height=\"490\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/Screenshot-from-2025-07-29-23-05-59.png\" alt=\"\" class=\"wp-image-4352\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/Screenshot-from-2025-07-29-23-05-59.png 654w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/Screenshot-from-2025-07-29-23-05-59-300x225.png 300w\" sizes=\"(max-width: 654px) 100vw, 654px\" \/><\/figure>\n\n\n\n<p>\u4e88\u6e2c\u5024\u304c\u5927\u304d\u3044\u3068\u3001\u6b8b\u5dee\u306e\u3070\u3089\u3064\u304d\u304c\u5927\u304d\u3044\u3053\u3068\u304c\u308f\u304b\u308b<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> # \u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u3092\u7528\u3044\u305f\u4fc2\u6570\u63a8\u5b9a\n> # type = \"HC1\"\u306fWhite\u306e\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u306e\u4e00\u7a2e\n> coeftest(model_ols, vcov = vcovHC(model_ols, type = \"HC1\"))\n\nt test of coefficients:\n\n            Estimate Std. Error t value  Pr(>|t|)    \n(Intercept)  1.95569    0.52698  3.7111 0.0003426 ***\nx            2.97528    0.12584 23.6426 &lt; 2.2e-16 ***\n---\nSignif. codes:  0 \u2018***\u2019 0.001 \u2018**\u2019 0.01 \u2018*\u2019 0.05 \u2018.\u2019 0.1 \u2018 \u2019 1\n\n> <\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u7d50\u679c\u89e3\u91c8<\/h3>\n\n\n\n<p>\u4e0a\u8a18\u306eR\u306e\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001\u307e\u305a\u901a\u5e38\u306e<code>summary(model_ols)<\/code>\u306e\u7d50\u679c\u304c\u8868\u793a\u3055\u308c\u308b\u3002\u3053\u306e\u7d50\u679c\u3067\u306f\u3001\u4fc2\u6570\u306e\u63a8\u5b9a\u5024\u3068\u305d\u306e\u6a19\u6e96\u8aa4\u5dee\u3001p\u5024\u3001\u4fe1\u983c\u533a\u9593\u304c\u793a\u3055\u308c\u308b\u3002\u4e0d\u5747\u4e00\u5206\u6563\u304c\u5b58\u5728\u3059\u308b\u5834\u5408\u3001\u3053\u3053\u3067\u8868\u793a\u3055\u308c\u308b\u6a19\u6e96\u8aa4\u5dee\u306f\u904e\u5c0f\u8a55\u4fa1\u3055\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u307e\u305f\u3001\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\u3067\u306f\u3001\u4e88\u6e2c\u5024\u304c\u5927\u304d\u304f\u306a\u308b\u306b\u3064\u308c\u3066\u6b8b\u5dee\u306e\u3070\u3089\u3064\u304d\u3082\u5927\u304d\u304f\u306a\u308b\u300c\u6f0f\u6597\u578b\u300d\u306e\u30d1\u30bf\u30fc\u30f3\u304c\u89b3\u5bdf\u3055\u308c\u308c\u3070\u3001\u4e0d\u5747\u4e00\u5206\u6563\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u3092\u793a\u5506\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u6700\u5f8c\u306b\u3001<code>coeftest(model_ols, vcov = vcovHC(model_ols, type = \"HC1\"))<\/code>\u306e\u7d50\u679c\u3092\u898b\u3066\u307b\u3057\u3044\u3002\u3053\u308c\u306f\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u3092\u7528\u3044\u3066\u518d\u8a08\u7b97\u3055\u308c\u305f\u6a19\u6e96\u8aa4\u5dee\u306b\u57fa\u3065\u3044\u305f\u4fc2\u6570\u306e\u691c\u5b9a\u7d50\u679c\u3067\u3042\u308b\u3002\u901a\u5e38\u3001\u3053\u306e\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u306fOLS\u306e\u6a19\u6e96\u8aa4\u5dee\u3088\u308a\u3082\u5927\u304d\u304f\u306a\u308b\u50be\u5411\u304c\u3042\u308b\u3002\u4eca\u56de\u306e\u4f8b\u3082\u30010.1153 \u3060\u3063\u305f\u6a19\u6e96\u8aa4\u5dee\u304c\u3001\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u3067\u306f\u30010.12584 \u3068\u5c11\u3057\u3060\u3051\u5927\u304d\u304f\u306a\u3063\u3066\u3044\u308b\u3002\u305d\u306e\u7d50\u679c\u3001t\u5024\u304c\u5c0f\u3055\u304f\u306a\u308a\u3001p\u5024\u304c\u5927\u304d\u304f\u306a\u308b\u3053\u3068\u3067\u3001OLS\u3067\u306f\u7d71\u8a08\u7684\u306b\u6709\u610f\u3068\u5224\u65ad\u3055\u308c\u3066\u3044\u305f\u4fc2\u6570\u304c\u3001\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u3092\u7528\u3044\u308b\u3068\u6709\u610f\u3067\u306f\u306a\u304f\u306a\u308b\u3053\u3068\u304c\u3042\u308b\u3002\u3053\u306e\u9811\u5065\u6a19\u6e96\u8aa4\u5dee\u3092\u4f7f\u3046\u3053\u3068\u306f\u3001\u3088\u308a\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u7d71\u8a08\u7684\u63a8\u8ad6\u3092\u610f\u5473\u3059\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u4e0d\u5747\u4e00\u5206\u6563\u306f\u3001\u7d71\u8a08\u30e2\u30c7\u30ea\u30f3\u30b0\u306b\u304a\u3044\u3066\u898b\u904e\u3054\u3055\u308c\u304c\u3061\u306a\u554f\u984c\u3067\u3042\u308b\u304c\u3001\u305d\u306e\u5f71\u97ff\u306f\u7d71\u8a08\u7684\u63a8\u8ad6\u306e\u4fe1\u983c\u6027\u3092\u5927\u304d\u304f\u640d\u306a\u3046\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002\u672c\u8a18\u4e8b\u3067\u7d39\u4ecb\u3057\u305f\u3088\u3046\u306b\u3001<strong>\u9811\u5065\u306a\u6a19\u6e96\u8aa4\u5dee\u306e\u4f7f\u7528\u3001\u30c7\u30fc\u30bf\u5909\u63db\u3001\u52a0\u91cd\u6700\u5c0f\u4e8c\u4e57\u6cd5\u3001\u305d\u3057\u3066\u4e00\u822c\u5316\u7dda\u5f62\u30e2\u30c7\u30eb\u306e\u9069\u7528<\/strong>\u306a\u3069\u3001\u69d8\u3005\u306a\u5bfe\u51e6\u6cd5\u304c\u5b58\u5728\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u30c7\u30fc\u30bf\u306e\u6027\u8cea\u3084\u5206\u6790\u306e\u76ee\u7684\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u5bfe\u51e6\u6cd5\u3092\u9078\u629e\u3057\u3001\u3088\u308a\u9811\u5065\u3067\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u7d71\u8a08\u7684\u5206\u6790\u3092\u884c\u3046\u3053\u3068\u304c\u3001\u30c7\u30fc\u30bf\u306b\u57fa\u3065\u3044\u305f\u610f\u601d\u6c7a\u5b9a\u306e\u7cbe\u5ea6\u5411\u4e0a\u306b\u7e4b\u304c\u308b\u3002\u5206\u6790\u3092\u884c\u3046\u969b\u306b\u306f\u3001\u6b8b\u5dee\u30d7\u30ed\u30c3\u30c8\u306a\u3069\u3067\u4e0d\u5747\u4e00\u5206\u6563\u306e\u5146\u5019\u304c\u306a\u3044\u304b\u3092\u78ba\u8a8d\u3057\u3001\u5fc5\u8981\u306b\u5fdc\u3058\u3066\u9069\u5207\u306a\u5bfe\u51e6\u3092\u884c\u3046\u7fd2\u6163\u3092\u3064\u3051\u3088\u3046\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u7d71\u8a08\u30e2\u30c7\u30ea\u30f3\u30b0\u3092\u884c\u3046\u969b\u3001\u30c7\u30fc\u30bf\u306e\u300c\u5206\u6563\u300d\u304c\u5747\u4e00\u3067\u3042\u308b\u3068\u3044\u3046\u4eee\u5b9a\u3092\u7f6e\u304f\u3053\u3068\u304c\u3088\u304f\u3042\u308b\u3002\u3057\u304b\u3057\u3001\u73fe\u5b9f\u306e\u30c7\u30fc\u30bf\u3067\u306f\u3053\u306e\u4eee\u5b9a\u304c\u6210\u308a\u7acb\u305f\u306a\u3044\u3001\u3064\u307e\u308a\u300c\u4e0d\u5747\u4e00\u5206\u6563\u300d\u3092\u793a\u3059\u30b1\u30fc\u30b9\u304c\u5c11\u306a\u304f\u306a\u3044\u3002\u4e0d\u5747\u4e00\u5206\u6563\u306f\u3001\u7d71\u8a08\u7684\u63a8\u8ad6\u306e\u4fe1\u983c\u6027\u3092\u640d\u306a\u3046\u53ef [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":4351,"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":[44],"tags":[],"class_list":["post-4343","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-44"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/Screenshot-from-2025-07-29-23-01-30.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4343","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=4343"}],"version-history":[{"count":7,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4343\/revisions"}],"predecessor-version":[{"id":4353,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4343\/revisions\/4353"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media\/4351"}],"wp:attachment":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media?parent=4343"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/categories?post=4343"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/tags?post=4343"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}