{"id":4291,"date":"2025-07-20T12:02:54","date_gmt":"2025-07-20T03:02:54","guid":{"rendered":"https:\/\/best-biostatistics.com\/toukei-er\/?p=4291"},"modified":"2025-07-20T12:02:56","modified_gmt":"2025-07-20T03:02:56","slug":"unveiling-true-differences-regression-line-comparisons-adjusted-for-confounders","status":"publish","type":"post","link":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/unveiling-true-differences-regression-line-comparisons-adjusted-for-confounders\/","title":{"rendered":"\u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3057\u305f\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\uff1a\u3088\u308a\u6df1\u3044\u6d1e\u5bdf\u3092\u5f97\u308b\u305f\u3081\u306b"},"content":{"rendered":"\n<p>\u30c7\u30fc\u30bf\u5206\u6790\u306b\u304a\u3044\u3066\u3001\u8907\u6570\u306e\u30b0\u30eb\u30fc\u30d7\u9593\u3067\u306e\u95a2\u4fc2\u6027\u306e\u9055\u3044\u3092\u6bd4\u8f03\u3059\u308b\u3053\u3068\u306f\u975e\u5e38\u306b\u91cd\u8981\u3060\u3002\u7279\u306b\u3001\u3042\u308b\u5f93\u5c5e\u5909\u6570\u3068\u72ec\u7acb\u5909\u6570\u306e\u95a2\u4fc2\u304c\u3001\u5225\u306e\u8981\u56e0\uff08\u30b0\u30eb\u30fc\u30d7\uff09\u306b\u3088\u3063\u3066\u3069\u306e\u3088\u3046\u306b\u7570\u306a\u308b\u304b\u3092\u660e\u3089\u304b\u306b\u3057\u305f\u3044\u5834\u5408\u3001\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\u306f\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u3068\u306a\u308b\u3002\u3057\u304b\u3057\u3001\u3053\u3053\u3067\u898b\u843d\u3068\u3057\u3066\u306f\u3044\u3051\u306a\u3044\u306e\u304c\u300c<strong>\u4ea4\u7d61\u56e0\u5b50<\/strong>\u300d\u306e\u5b58\u5728\u3060\u3002\u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u305b\u305a\u306b\u89e3\u6790\u3092\u9032\u3081\u308b\u3068\u3001\u8aa4\u3063\u305f\u7d50\u8ad6\u3092\u5c0e\u304d\u51fa\u3059\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u8a18\u4e8b\u3067\u306f\u3001\u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3057\u305f\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\u306b\u3064\u3044\u3066\u3001\u5177\u4f53\u7684\u306a\u4f8b\u3068R\u3067\u306e\u8a08\u7b97\u4f8b\u3001\u305d\u3057\u3066\u7d50\u679c\u306e\u53ef\u8996\u5316\u3092\u4ea4\u3048\u3066\u89e3\u8aac\u3059\u308b\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\u3068\u306f\u4f55\u304b\uff1f<\/h2>\n\n\n\n<p>\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\u3068\u306f\u30012\u3064\u4ee5\u4e0a\u306e\u30b0\u30eb\u30fc\u30d7\u9593\u3067\u3001\u3042\u308b\u72ec\u7acb\u5909\u6570\u3068\u5f93\u5c5e\u5909\u6570\u306e\u9593\u306e\u7dda\u5f62\u95a2\u4fc2\uff08\u56de\u5e30\u76f4\u7dda\uff09\u306b\u7d71\u8a08\u7684\u306b\u6709\u610f\u306a\u5dee\u304c\u3042\u308b\u304b\u3069\u3046\u304b\u3092\u8a55\u4fa1\u3059\u308b\u624b\u6cd5\u3060\u3002\u5177\u4f53\u7684\u306b\u306f\u3001<strong>\u5207\u7247\u3068\u50be\u304d\u306e\u4e21\u65b9\u3001\u307e\u305f\u306f\u305d\u306e\u3044\u305a\u308c\u304b\u306b\u5dee\u304c\u3042\u308b\u304b<\/strong>\u3092\u691c\u5b9a\u3059\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u4ea4\u7d61\u56e0\u5b50\u3068\u306f\u4f55\u304b\uff1f\u306a\u305c\u91cd\u8981\u306a\u306e\u304b\uff1f<\/h2>\n\n\n\n<p>\u4ea4\u7d61\u56e0\u5b50\uff08Confounding Factor\uff09\u3068\u306f\u3001\u72ec\u7acb\u5909\u6570\u3068\u5f93\u5c5e\u5909\u6570\u306e\u4e21\u65b9\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u3001\u305d\u306e\u7d50\u679c\u3001\u4e21\u8005\u306e\u9593\u306b\u898b\u304b\u3051\u4e0a\u306e\u95a2\u9023\u6027\u3092\u4f5c\u308a\u51fa\u3057\u305f\u308a\u3001\u771f\u306e\u95a2\u9023\u6027\u3092\u96a0\u853d\u3057\u305f\u308a\u3059\u308b\u7b2c\u4e09\u306e\u5909\u6570\u306e\u3053\u3068\u3060\u3002<\/p>\n\n\n\n<p>\u4f8b\u3048\u3070\u3001\u300c\u30b3\u30fc\u30d2\u30fc\u306e\u6442\u53d6\u91cf\u300d\u3068\u300c\u5fc3\u81d3\u75c5\u306e\u30ea\u30b9\u30af\u300d\u306e\u95a2\u4fc2\u3092\u8abf\u3079\u305f\u3044\u3068\u3059\u308b\u3002\u3053\u3053\u3067\u300c\u55ab\u7159\u7fd2\u6163\u300d\u3068\u3044\u3046\u4ea4\u7d61\u56e0\u5b50\u304c\u5b58\u5728\u3059\u308b\u304b\u3082\u3057\u308c\u306a\u3044\u3002\u55ab\u7159\u8005\u306f\u30b3\u30fc\u30d2\u30fc\u3092\u98f2\u3080\u91cf\u304c\u591a\u3044\u50be\u5411\u304c\u3042\u308a\u3001\u304b\u3064\u55ab\u7159\u81ea\u4f53\u304c\u5fc3\u81d3\u75c5\u306e\u30ea\u30b9\u30af\u3092\u9ad8\u3081\u308b\u3002\u3053\u306e\u5834\u5408\u3001\u30b3\u30fc\u30d2\u30fc\u3068\u5fc3\u81d3\u75c5\u306e\u9593\u306b\u898b\u3089\u308c\u308b\u95a2\u9023\u6027\u304c\u3001\u5b9f\u306f\u55ab\u7159\u7fd2\u6163\u306b\u3088\u3063\u3066\u5f15\u304d\u8d77\u3053\u3055\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u3001\u30b3\u30fc\u30d2\u30fc\u81ea\u4f53\u304c\u5fc3\u81d3\u75c5\u306e\u539f\u56e0\u3067\u306f\u306a\u3044\u304b\u3082\u3057\u308c\u306a\u3044\u3002<\/p>\n\n\n\n<p>\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\u3092\u884c\u3046\u969b\u306b\u3082\u3001\u4ea4\u7d61\u56e0\u5b50\u3092\u7121\u8996\u3059\u308b\u3068\u3001\u30b0\u30eb\u30fc\u30d7\u9593\u306e\u771f\u306e\u95a2\u4fc2\u6027\u306e\u9055\u3044\u3092\u898b\u8aa4\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3060\u3002<\/p>\n\n\n\n<div id=\"biost-1556847859\" 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\">\u5177\u4f53\u4f8b\u3067\u8003\u3048\u3066\u307f\u3088\u3046\uff1a\u65b0\u85ac\u306e\u6709\u52b9\u6027<\/h2>\n\n\n\n<p>\u3042\u308b\u75be\u60a3\u306b\u5bfe\u3059\u308b\u65b0\u85acA\u3068\u65e2\u5b58\u85acB\u306e\u52b9\u679c\u3092\u6bd4\u8f03\u3057\u305f\u3044\u3068\u3059\u308b\u3002\u52b9\u679c\u306e\u6307\u6a19\u3068\u3057\u3066\u300c\u75c7\u72b6\u6539\u5584\u5ea6\uff08\u30b9\u30b3\u30a2\uff1a0-100\uff09\u300d\u3001\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u8981\u56e0\u3068\u3057\u3066\u300c\u6295\u85ac\u671f\u9593\uff08\u9031\uff09\u300d\u3092\u8003\u3048\u308b\u3002\u3057\u304b\u3057\u3001\u60a3\u8005\u306e\u300c\u5e74\u9f62\u300d\u304c\u3001\u6295\u85ac\u671f\u9593\u3068\u75c7\u72b6\u6539\u5584\u5ea6\u306e\u4e21\u65b9\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u53ef\u80fd\u6027\u304c\u3042\u308a\u3001\u3053\u308c\u304c\u4ea4\u7d61\u56e0\u5b50\u3068\u306a\u308a\u5f97\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u72ec\u7acb\u5909\u6570:<\/strong> \u6295\u85ac\u671f\u9593<\/li>\n\n\n\n<li><strong>\u5f93\u5c5e\u5909\u6570:<\/strong> \u75c7\u72b6\u6539\u5584\u5ea6<\/li>\n\n\n\n<li><strong>\u30b0\u30eb\u30fc\u30d7\u5909\u6570:<\/strong> \u85ac\u5264\uff08A vs B\uff09<\/li>\n\n\n\n<li><strong>\u4ea4\u7d61\u56e0\u5b50:<\/strong> \u5e74\u9f62<\/li>\n<\/ul>\n\n\n\n<p>\u79c1\u305f\u3061\u306f\u3001\u300c\u65b0\u85acA\u3068\u65e2\u5b58\u85acB\u3067\u3001\u6295\u85ac\u671f\u9593\u304c\u75c7\u72b6\u6539\u5584\u5ea6\u306b\u4e0e\u3048\u308b\u5f71\u97ff\uff08\u56de\u5e30\u76f4\u7dda\uff09\u306b\u5dee\u304c\u3042\u308b\u304b\u3001\u305f\u3060\u3057\u5e74\u9f62\u306e\u5f71\u97ff\u3092\u8abf\u6574\u3057\u305f\u4e0a\u3067\u300d\u3092\u77e5\u308a\u305f\u3044\u308f\u3051\u3060\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">R\u3067\u306e\u8a08\u7b97\u4f8b\u3068\u53ef\u8996\u5316<\/h2>\n\n\n\n<p>\u305d\u308c\u3067\u306f\u3001R\u3092\u4f7f\u3063\u3066\u4e0a\u8a18\u306e\u4f8b\u3092\u30b7\u30df\u30e5\u30ec\u30fc\u30b7\u30e7\u30f3\u3057\u3001\u89e3\u6790\u3057\u3066\u307f\u3088\u3046\u3002<\/p>\n\n\n\n<p>\u307e\u305a\u3001\u5fc5\u8981\u306a\u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u8aad\u307f\u8fbc\u307f\u3001\u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u3092\u4f5c\u6210\u3059\u308b\u3002<\/p>\n\n\n\n<p>R\u30b9\u30af\u30ea\u30d7\u30c8\u4f8b\uff1a<\/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\uff06\u8aad\u307f\u8fbc\u307f\uff08\u307e\u3060\u30a4\u30f3\u30b9\u30c8\u30fc\u30eb\u3057\u3066\u3044\u306a\u3044\u5834\u5408\uff09\n# install.packages(\"ggplot2\")\n# install.packages(\"dplyr\")\n\nlibrary(ggplot2)\nlibrary(dplyr)\n\n# \u30c0\u30df\u30fc\u30c7\u30fc\u30bf\u306e\u4f5c\u6210\nset.seed(123) # \u518d\u73fe\u6027\u306e\u305f\u3081\u306e\u30b7\u30fc\u30c9\u8a2d\u5b9a\n\n# \u85ac\u5264A\u306e\u30c7\u30fc\u30bf\ndata_A &lt;- data.frame(\n  \u85ac\u5264 = \"A\",\n  \u6295\u85ac\u671f\u9593 = round(runif(100, 1, 10)), # 1\u9031\u9593\u304b\u308910\u9031\u9593\n  \u5e74\u9f62 = sample(30:70, 100, replace = TRUE) # 30\u6b73\u304b\u308970\u6b73\n)\ndata_A$\u75c7\u72b6\u6539\u5584\u5ea6 &lt;- round(30 + 5 * data_A$\u6295\u85ac\u671f\u9593 - 0.5 * data_A$\u5e74\u9f62 + rnorm(100, 0, 5))\n\n# \u85ac\u5264B\u306e\u30c7\u30fc\u30bf\ndata_B &lt;- data.frame(\n  \u85ac\u5264 = \"B\",\n  \u6295\u85ac\u671f\u9593 = round(runif(100, 1, 10)),\n  \u5e74\u9f62 = sample(30:70, 100, replace = TRUE)\n)\ndata_B$\u75c7\u72b6\u6539\u5584\u5ea6 &lt;- round(20 + 6 * data_B$\u6295\u85ac\u671f\u9593 - 0.4 * data_B$\u5e74\u9f62 + rnorm(100, 0, 5))\n\n# \u30c7\u30fc\u30bf\u3092\u7d50\u5408\ndata_all &lt;- rbind(data_A, data_B)\n\n# \u85ac\u5264\u3092\u56e0\u5b50\u578b\u306b\u5909\u63db\ndata_all$\u85ac\u5264 &lt;- as.factor(data_all$\u85ac\u5264)\n\n# \u30c7\u30fc\u30bf\u306e\u4e00\u90e8\u3092\u8868\u793a\nhead(data_all)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">\u56de\u5e30\u76f4\u7dda\u306e\u53ef\u8996\u5316<\/h3>\n\n\n\n<p>\u307e\u305a\u3001\u56de\u5e30\u76f4\u7dda\u3092\u53ef\u8996\u5316\u3057\u3066\u3001\u8996\u899a\u7684\u306b\u9055\u3044\u3092\u628a\u63e1\u3057\u3088\u3046\u3002\u4ea4\u7d61\u56e0\u5b50\u3092\u8abf\u6574\u3057\u305f\u30e2\u30c7\u30eb\u306e\u53ef\u8996\u5316\u306f\u5c11\u3057\u8907\u96d1\u306b\u306a\u308b\u304c\u3001\u3053\u3053\u3067\u306f\u5358\u7d14\u306b\u5404\u30b0\u30eb\u30fc\u30d7\u306e\u56de\u5e30\u76f4\u7dda\u3092\u30d7\u30ed\u30c3\u30c8\u3059\u308b\u3002\u305f\u3060\u3057\u3001\u4ea4\u7d61\u56e0\u5b50\u306e\u5f71\u97ff\u3092\u53ef\u8996\u5316\u3059\u308b\u969b\u306b\u306f\u3001\u4f8b\u3048\u3070\u5e74\u9f62\u3092\u7279\u5b9a\u306e\u5024\u306b\u56fa\u5b9a\u3057\u3066\u30d7\u30ed\u30c3\u30c8\u3059\u308b\u3068\u3044\u3063\u305f\u5de5\u592b\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002\u3053\u3053\u3067\u306f\u7c21\u7565\u5316\u306e\u305f\u3081\u3001\u5e74\u9f62\u306e\u5f71\u97ff\u306f\u76f4\u63a5\u7684\u306b\u306f\u53ef\u8996\u5316\u305b\u305a\u3001\u5404\u85ac\u5264\u30b0\u30eb\u30fc\u30d7\u306e\u6563\u5e03\u56f3\u3068\u56de\u5e30\u76f4\u7dda\u3092\u8868\u793a\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u53ef\u8996\u5316\nggplot(data_all, aes(x = \u6295\u85ac\u671f\u9593, y = \u75c7\u72b6\u6539\u5584\u5ea6, color = \u85ac\u5264)) +\n  geom_point(alpha = 0.6) + # \u6563\u5e03\u56f3\n  geom_smooth(method = \"lm\", se = FALSE) + # \u5404\u30b0\u30eb\u30fc\u30d7\u306e\u56de\u5e30\u76f4\u7dda\n  labs(title = \"\u6295\u85ac\u671f\u9593\u3068\u75c7\u72b6\u6539\u5584\u5ea6\uff1a\u85ac\u5264\u5225\u306e\u56de\u5e30\u76f4\u7dda\",\n       x = \"\u6295\u85ac\u671f\u9593 (\u9031)\",\n       y = \"\u75c7\u72b6\u6539\u5584\u5ea6\u30b9\u30b3\u30a2\") +\n  theme_minimal()\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img decoding=\"async\" width=\"1024\" height=\"819\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/linear_regression_diff_test_confounding-1-1024x819.png\" alt=\"\" class=\"wp-image-4294\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/linear_regression_diff_test_confounding-1-1024x819.png 1024w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/linear_regression_diff_test_confounding-1-300x240.png 300w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/linear_regression_diff_test_confounding-1-768x614.png 768w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/linear_regression_diff_test_confounding-1-1536x1229.png 1536w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/linear_regression_diff_test_confounding-1-2048x1638.png 2048w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p>\u3053\u306e\u30b0\u30e9\u30d5\u3067\u306f\u30012\u3064\u306e\u56de\u5e30\u76f4\u7dda\u304c\u63cf\u304b\u308c\u3001\u305d\u306e\u50be\u304d\u3084\u4f4d\u7f6e\u306e\u9055\u3044\u3092\u8996\u899a\u7684\u306b\u78ba\u8a8d\u3067\u304d\u308b\u3002\u305f\u3060\u3057\u3001\u3053\u308c\u306f\u5e74\u9f62\u306e\u8abf\u6574\u304c\u306a\u3055\u308c\u3066\u3044\u306a\u3044\u5358\u7d14\u306a\u30d7\u30ed\u30c3\u30c8\u3067\u3042\u308b\u3053\u3068\u306b\u6ce8\u610f\u3057\u3066\u307b\u3057\u3044\u3002\u3088\u308a\u53b3\u5bc6\u306a\u53ef\u8996\u5316\u306b\u306f\u3001\u4e88\u6e2c\u5024\u3092\u4f7f\u3063\u305f\u30d7\u30ed\u30c3\u30c8\u306a\u3069\u304c\u5fc5\u8981\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3057\u306a\u3044\u5834\u5408<\/h3>\n\n\n\n<p>\u307e\u305a\u306f\u3001\u5e74\u9f62\u3092\u8003\u616e\u305b\u305a\u306b\u5358\u7d14\u306b\u85ac\u5264\u30b0\u30eb\u30fc\u30d7\u3054\u3068\u306e\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u3092\u691c\u5b9a\u3057\u3066\u307f\u3088\u3046\u3002\u3053\u308c\u306f\u3001\u85ac\u5264\u3068\u6295\u85ac\u671f\u9593\u306e\u4ea4\u4e92\u4f5c\u7528\u9805\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u691c\u5b9a\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3057\u306a\u3044\u30e2\u30c7\u30eb\nmodel_simple &lt;- lm(\u75c7\u72b6\u6539\u5584\u5ea6 ~ \u6295\u85ac\u671f\u9593 * \u85ac\u5264, data = data_all)\nsummary(model_simple)\n<\/code><\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> # \u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3057\u306a\u3044\u30e2\u30c7\u30eb\n> model_simple &lt;- lm(\u75c7\u72b6\u6539\u5584\u5ea6 ~ \u6295\u85ac\u671f\u9593 * \u85ac\u5264, data = data_all)\n> summary(model_simple)\n\nCall:\nlm(formula = \u75c7\u72b6\u6539\u5584\u5ea6 ~ \u6295\u85ac\u671f\u9593 * \u85ac\u5264, data = data_all)\n\nResiduals:\n     Min       1Q   Median       3Q      Max \n-23.1056  -5.4419  -0.4874   5.0322  17.6681 \n\nCoefficients:\n               Estimate Std. Error t value Pr(>|t|)    \n(Intercept)      4.7327     1.7365   2.725  0.00700 ** \n\u6295\u85ac\u671f\u9593         4.9555     0.2876  17.229  &lt; 2e-16 ***\n\u85ac\u5264B           -7.8197     2.4408  -3.204  0.00158 ** \n\u6295\u85ac\u671f\u9593:\u85ac\u5264B   1.4436     0.4044   3.569  0.00045 ***\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: 7.471 on 196 degrees of freedom\nMultiple R-squared:  0.8039,    Adjusted R-squared:  0.8009 \nF-statistic: 267.8 on 3 and 196 DF,  p-value: &lt; 2.2e-16\n\n<\/code><\/pre>\n\n\n\n<p><code>summary(model_simple)<\/code> \u306e\u51fa\u529b\u3092\u898b\u308b\u3068\u3001<code>\u6295\u85ac\u671f\u9593:\u85ac\u5264B<\/code> \u306e<strong>\u4ea4\u4e92\u4f5c\u7528\u9805\u306ep\u5024<\/strong>\u3092\u78ba\u8a8d\u3059\u308b\u3002\u3053\u306ep\u5024\u304c\u7d71\u8a08\u7684\u306b\u6709\u610f\u3067\u3042\u308c\u3070\u3001\u85ac\u5264A\u3068\u85ac\u5264B\u3067\u6295\u85ac\u671f\u9593\u306e\u50be\u304d\u306b\u5dee\u304c\u3042\u308b\u3068\u89e3\u91c8\u3067\u304d\u308b\u3002\u307e\u305f\u3001<code>\u85ac\u5264B<\/code> \u306e\u9805\u306f\u5207\u7247\u306e\u5dee\u3092\u793a\u3059\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3059\u308b\u5834\u5408<\/h3>\n\n\n\n<p>\u6b21\u306b\u3001\u4ea4\u7d61\u56e0\u5b50\u3067\u3042\u308b\u300c\u5e74\u9f62\u300d\u3092\u30e2\u30c7\u30eb\u306b\u6295\u5165\u3057\u3066\u3001\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u3092\u691c\u5b9a\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3057\u305f\u30e2\u30c7\u30eb\nmodel_confounder &lt;- lm(\u75c7\u72b6\u6539\u5584\u5ea6 ~ \u6295\u85ac\u671f\u9593 * \u85ac\u5264 + \u5e74\u9f62, data = data_all)\nsummary(model_confounder)\n<\/code><\/pre>\n\n\n\n<p>\u5b9f\u884c\u7d50\u679c\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>> # \u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3057\u305f\u30e2\u30c7\u30eb\n> model_confounder &lt;- lm(\u75c7\u72b6\u6539\u5584\u5ea6 ~ \u6295\u85ac\u671f\u9593 * \u85ac\u5264 + \u5e74\u9f62, data = data_all)\n> summary(model_confounder)\n\nCall:\nlm(formula = \u75c7\u72b6\u6539\u5584\u5ea6 ~ \u6295\u85ac\u671f\u9593 * \u85ac\u5264 + \u5e74\u9f62, \n    data = data_all)\n\nResiduals:\n     Min       1Q   Median       3Q      Max \n-14.4094  -3.7725   0.1532   3.5748  13.2856 \n\nCoefficients:\n               Estimate Std. Error t value Pr(>|t|)    \n(Intercept)    26.39517    2.00814  13.144  &lt; 2e-16 ***\n\u6295\u85ac\u671f\u9593        5.21210    0.20650  25.240  &lt; 2e-16 ***\n\u85ac\u5264B          -5.11506    1.75625  -2.912 0.004004 ** \n\u5e74\u9f62           -0.45557    0.03319 -13.725  &lt; 2e-16 ***\n\u6295\u85ac\u671f\u9593:\u85ac\u5264B  0.98338    0.29111   3.378 0.000882 ***\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: 5.342 on 195 degrees of freedom\nMultiple R-squared:  0.9002,    Adjusted R-squared:  0.8982 \nF-statistic: 439.9 on 4 and 195 DF,  p-value: &lt; 2.2e-16\n\n<\/code><\/pre>\n\n\n\n<p><code>summary(model_confounder)<\/code> \u306e\u51fa\u529b\u3092\u898b\u308b\u3002\u3053\u3053\u3067\u3082 <code>\u6295\u85ac\u671f\u9593:\u85ac\u5264B<\/code> \u306e<strong>\u4ea4\u4e92\u4f5c\u7528\u9805\u306ep\u5024<\/strong>\u304c\u91cd\u8981\u3060\u3002\u3053\u306ep\u5024\u304c\u7d71\u8a08\u7684\u306b\u6709\u610f\u3067\u3042\u308c\u3070\u3001\u300c<strong>\u5e74\u9f62\u306e\u5f71\u97ff\u3092\u8abf\u6574\u3057\u305f\u4e0a\u3067<\/strong>\u300d\u3001\u85ac\u5264A\u3068\u85ac\u5264B\u3067\u6295\u85ac\u671f\u9593\u306e\u50be\u304d\u306b\u5dee\u304c\u3042\u308b\u3068\u8a00\u3048\u308b\u3002\u307e\u305f\u3001<code>\u85ac\u5264B<\/code> \u306e\u9805\u306f\u8abf\u6574\u5f8c\u306e\u5207\u7247\u306e\u5dee\u3092\u793a\u3059\u3002<\/p>\n\n\n\n<p>\u5e74\u9f62\u306e\u4fc2\u6570\u3082\u78ba\u8a8d\u3057\u3001\u5e74\u9f62\u304c\u75c7\u72b6\u6539\u5584\u5ea6\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3044\u308b\u304b\u3069\u3046\u304b\u3082\u78ba\u8a8d\u3067\u304d\u308b\u3060\u308d\u3046\u3002\u5e74\u9f62\u306e Estimate \u304c\u30de\u30a4\u30ca\u30b9\u306a\u306e\u3067\u3001\u52a0\u9f62\u3068\u3068\u3082\u306b\u75c7\u72b6\u6539\u5584\u5ea6\u304c\u4e0b\u304c\u308b\u3068\u7406\u89e3\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n\n\n\n<h3 class=\"wp-block-heading\">\u88dc\u8db3\uff1a\u4ea4\u7d61\u56e0\u5b50\u6295\u5165\u3067\u4ea4\u4e92\u4f5c\u7528\u304c\u6709\u610f\u3067\u306a\u304f\u306a\u3063\u305f\u5834\u5408<\/h3>\n\n\n\n<p>\u3082\u3057\u4ea4\u7d61\u56e0\u5b50\u3092\u30e2\u30c7\u30eb\u306b\u6295\u5165\u3057\u305f\u7d50\u679c\u3001\u305d\u308c\u307e\u3067\u7d71\u8a08\u7684\u306b\u6709\u610f\u3060\u3063\u305f<strong>\u4ea4\u4e92\u4f5c\u7528\u9805\uff08\u56de\u5e30\u76f4\u7dda\u306e\u50be\u304d\u306e\u5dee\uff09\u304c\u6709\u610f\u3067\u306a\u304f\u306a\u3063\u305f<\/strong>\u5834\u5408\u3001\u305d\u308c\u306f\u975e\u5e38\u306b\u91cd\u8981\u306a\u30b5\u30a4\u30f3\u3060\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5834\u5408\u3001\u300c<strong>\u5f53\u521d\u898b\u3089\u308c\u305f\u30b0\u30eb\u30fc\u30d7\u9593\u306e\u56de\u5e30\u76f4\u7dda\u306e\u50be\u304d\u306e\u9055\u3044\u306f\u3001\u5b9f\u969b\u306b\u306f\u305d\u306e\u4ea4\u7d61\u56e0\u5b50\u306b\u3088\u3063\u3066\u5f15\u304d\u8d77\u3053\u3055\u308c\u3066\u3044\u305f\u3001\u3042\u308b\u3044\u306f\u5f37\u304f\u5f71\u97ff\u3092\u53d7\u3051\u3066\u3044\u305f<\/strong>\u300d\u3068\u89e3\u91c8\u3067\u304d\u308b\u3002\u3064\u307e\u308a\u3001\u898b\u304b\u3051\u4e0a\u306e\u5dee\u304c\u3001\u5b9f\u306f\u4ea4\u7d61\u56e0\u5b50\u306e\u5f71\u97ff\u3067\u3042\u3063\u305f\u53ef\u80fd\u6027\u304c\u9ad8\u3044\u306e\u3060\u3002<\/p>\n\n\n\n<p>\u7c21\u5358\u306a\u8a00\u8449\u3067\u8a00\u3046\u3068\u3001\u4ea4\u7d61\u56e0\u5b50\u304c\u300c\u771f\u72af\u4eba\u300d\u3067\u3001\u79c1\u305f\u3061\u304c\u5f53\u521d\u898b\u3066\u3044\u305f\u30b0\u30eb\u30fc\u30d7\u9593\u306e\u9055\u3044\u306f\u3001\u305d\u306e\u300c\u771f\u72af\u4eba\u300d\u304c\u5f15\u304d\u8d77\u3053\u3057\u305f\u5f71\u306e\u3088\u3046\u306a\u3082\u306e\u3060\u3063\u305f\u3001\u3068\u7406\u89e3\u3067\u304d\u308b\u3002\u3053\u306e\u7d50\u679c\u306f\u3001\u79c1\u305f\u3061\u304c\u672c\u5f53\u306b\u77e5\u308a\u305f\u3044\u72ec\u7acb\u5909\u6570\u3068\u5f93\u5c5e\u5909\u6570\u306e\u95a2\u4fc2\u306b\u3064\u3044\u3066\u3001\u3088\u308a\u6b63\u78ba\u306a\u7406\u89e3\u3092\u4e0e\u3048\u3066\u304f\u308c\u308b\u3082\u306e\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>\u4ea4\u7d61\u56e0\u5b50\u3092\u8003\u616e\u3057\u305f\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\u306f\u3001\u5358\u306b\u30b0\u30eb\u30fc\u30d7\u9593\u306e\u95a2\u4fc2\u6027\u306e\u9055\u3044\u3092\u898b\u308b\u3060\u3051\u3067\u306a\u304f\u3001\u305d\u306e\u9055\u3044\u304c\u672c\u5f53\u306b\u77e5\u308a\u305f\u3044\u5909\u6570\u306b\u3088\u3063\u3066\u5f15\u304d\u8d77\u3053\u3055\u308c\u3066\u3044\u308b\u306e\u304b\u3001\u305d\u308c\u3068\u3082\u4ed6\u306e\u96a0\u308c\u305f\u8981\u56e0\u306b\u3088\u3063\u3066\u898b\u305b\u304b\u3051\u3089\u308c\u305f\u3082\u306e\u306a\u306e\u304b\u3092\u5224\u65ad\u3059\u308b\u305f\u3081\u306b\u4e0d\u53ef\u6b20\u3060\u3002<\/p>\n\n\n\n<p>\u4eca\u56de\u306eR\u306e\u4f8b\u3067\u306f\u3001\u4ea4\u7d61\u56e0\u5b50\u3067\u3042\u308b\u300c\u5e74\u9f62\u300d\u3092\u30e2\u30c7\u30eb\u306b\u542b\u3081\u308b\u3053\u3068\u3067\u3001\u7d50\u679c\u306f\u5927\u304d\u304f\u7570\u306a\u308b\u3053\u3068\u306f\u306a\u304b\u3063\u305f\u304c\u3001\u3088\u308a\u6b63\u78ba\u306a\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\u3092\u884c\u3046\u3053\u3068\u304c\u3067\u304d\u305f\u3002\u30c7\u30fc\u30bf\u5206\u6790\u3092\u884c\u3046\u969b\u306b\u306f\u3001\u5e38\u306b\u6f5c\u5728\u7684\u306a\u4ea4\u7d61\u56e0\u5b50\u306e\u5b58\u5728\u3092\u610f\u8b58\u3057\u3001\u9069\u5207\u306b\u30e2\u30c7\u30eb\u306b\u7d44\u307f\u8fbc\u3080\u3053\u3068\u3067\u3001\u3088\u308a\u30ed\u30d0\u30b9\u30c8\u3067\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u7d50\u8ad6\u3092\u5c0e\u304d\u51fa\u3059\u3088\u3046\u306b\u5fc3\u304c\u3051\u3088\u3046\u3002<\/p>\n\n\n\n<hr class=\"wp-block-separator has-alpha-channel-opacity\"\/>\n","protected":false},"excerpt":{"rendered":"<p>\u30c7\u30fc\u30bf\u5206\u6790\u306b\u304a\u3044\u3066\u3001\u8907\u6570\u306e\u30b0\u30eb\u30fc\u30d7\u9593\u3067\u306e\u95a2\u4fc2\u6027\u306e\u9055\u3044\u3092\u6bd4\u8f03\u3059\u308b\u3053\u3068\u306f\u975e\u5e38\u306b\u91cd\u8981\u3060\u3002\u7279\u306b\u3001\u3042\u308b\u5f93\u5c5e\u5909\u6570\u3068\u72ec\u7acb\u5909\u6570\u306e\u95a2\u4fc2\u304c\u3001\u5225\u306e\u8981\u56e0\uff08\u30b0\u30eb\u30fc\u30d7\uff09\u306b\u3088\u3063\u3066\u3069\u306e\u3088\u3046\u306b\u7570\u306a\u308b\u304b\u3092\u660e\u3089\u304b\u306b\u3057\u305f\u3044\u5834\u5408\u3001\u56de\u5e30\u76f4\u7dda\u306e\u5dee\u306e\u691c\u5b9a\u306f\u5f37\u529b\u306a\u30c4\u30fc\u30eb [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":4294,"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":[11],"tags":[],"class_list":["post-4291","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-11"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2025\/07\/linear_regression_diff_test_confounding-1-scaled.png","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4291","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=4291"}],"version-history":[{"count":2,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4291\/revisions"}],"predecessor-version":[{"id":4296,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4291\/revisions\/4296"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media\/4294"}],"wp:attachment":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media?parent=4291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/categories?post=4291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/tags?post=4291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}