{"id":4151,"date":"2025-07-06T20:13:25","date_gmt":"2025-07-06T11:13:25","guid":{"rendered":"https:\/\/best-biostatistics.com\/toukei-er\/?p=4151"},"modified":"2025-07-06T20:13:27","modified_gmt":"2025-07-06T11:13:27","slug":"mastering-instrumental-variables-your-powerful-tool-against-spurious-correlations","status":"publish","type":"post","link":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/mastering-instrumental-variables-your-powerful-tool-against-spurious-correlations\/","title":{"rendered":"\u64cd\u4f5c\u5909\u6570\u6cd5\u3092\u5fb9\u5e95\u89e3\u8aac\uff01\u898b\u305b\u304b\u3051\u306e\u76f8\u95a2\u306b\u3060\u307e\u3055\u308c\u306a\u3044\u305f\u3081\u306e\u5f37\u529b\u306a\u6b66\u5668"},"content":{"rendered":"\n<p>\u898b\u305b\u304b\u3051\u306e\u76f8\u95a2\u306b\u60d1\u308f\u3055\u308c\u3066\u3044\u306a\u3044\u3060\u308d\u3046\u304b\uff1f\u4e16\u306e\u4e2d\u306b\u306f\u3001\u4e00\u898b\u3059\u308b\u3068\u95a2\u4fc2\u304c\u3042\u308a\u305d\u3046\u306b\u898b\u3048\u3066\u3001\u5b9f\u306f\u305d\u3046\u3067\u306f\u306a\u3044\u73fe\u8c61\u304c\u305f\u304f\u3055\u3093\u5b58\u5728\u3059\u308b\u3002\u4f8b\u3048\u3070\u3001\u300c\u30a2\u30a4\u30b9\u30af\u30ea\u30fc\u30e0\u304c\u58f2\u308c\u308b\u3068\u30d7\u30fc\u30eb\u306e\u4e8b\u6545\u304c\u5897\u3048\u308b\u300d\u3068\u3044\u3046\u8a71\u3092\u805e\u3044\u305f\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\uff1f\u3053\u308c\u306f\u3001\u30a2\u30a4\u30b9\u30af\u30ea\u30fc\u30e0\u3068\u30d7\u30fc\u30eb\u306e\u4e8b\u6545\u306b\u76f4\u63a5\u7684\u306a\u56e0\u679c\u95a2\u4fc2\u304c\u3042\u308b\u308f\u3051\u3067\u306f\u306a\u304f\u3001\u300c\u6c17\u6e29\u304c\u9ad8\u3044\u300d\u3068\u3044\u3046\u5171\u901a\u306e\u539f\u56e0\u304c\u305d\u308c\u305e\u308c\u306b\u5f71\u97ff\u3057\u3066\u3044\u308b\u305f\u3081\u306b\u8d77\u3053\u308b\u898b\u305b\u304b\u3051\u306e\u76f8\u95a2\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306a\u8aa4\u3063\u305f\u56e0\u679c\u95a2\u4fc2\u306e\u89e3\u91c8\u306f\u3001\u79c1\u305f\u3061\u306e\u610f\u601d\u6c7a\u5b9a\u3092\u8aa4\u3089\u305b\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002\u3057\u304b\u3057\u3001\u3054\u5b89\u5fc3\u3044\u305f\u3060\u304d\u305f\u3044\u3002\u7d71\u8a08\u5b66\u306b\u306f\u3001\u3053\u306e\u3088\u3046\u306a\u898b\u305b\u304b\u3051\u306e\u76f8\u95a2\u3092\u898b\u7834\u308a\u3001\u771f\u306e\u56e0\u679c\u95a2\u4fc2\u3092\u7279\u5b9a\u3059\u308b\u305f\u3081\u306e\u5f37\u529b\u306a\u30c4\u30fc\u30eb\u304c\u3042\u308b\u3002\u305d\u308c\u304c<strong>\u64cd\u4f5c\u5909\u6570\u6cd5<\/strong>\u3060\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">\u64cd\u4f5c\u5909\u6570\u6cd5\u306e\u6982\u7565<\/h2>\n\n\n\n<p><strong>\u64cd\u4f5c\u5909\u6570\u6cd5\uff08Instrumental Variable Method, IV\uff09<\/strong>\u306f\u3001<strong>\u5185\u751f\u6027\uff08Endogeneity\uff09<\/strong>\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3057\u3001\u771f\u306e\u56e0\u679c\u52b9\u679c\u3092\u63a8\u5b9a\u3059\u308b\u305f\u3081\u306e\u7d71\u8a08\u7684\u624b\u6cd5\u3067\u3042\u308b\u3002\u5185\u751f\u6027\u3068\u306f\u3001\u8aac\u660e\u5909\u6570\u3068\u8aa4\u5dee\u9805\u306e\u9593\u306b\u76f8\u95a2\u304c\u3042\u308b\u72b6\u614b\u3092\u6307\u3059\u3002\u3053\u306e\u76f8\u95a2\u304c\u3042\u308b\u3068\u3001\u901a\u5e38\u306e\u6700\u5c0f\u4e8c\u4e57\u6cd5\uff08OLS\uff09\u3067\u306f\u3001\u8aac\u660e\u5909\u6570\u306e\u52b9\u679c\u3092\u6b63\u3057\u304f\u63a8\u5b9a\u3067\u304d\u306a\u3044\u3002<\/p>\n\n\n\n<p>\u5185\u751f\u6027\u306e\u539f\u56e0\u306f\u3044\u304f\u3064\u304b\u3042\u308b\u304c\u3001\u4ee3\u8868\u7684\u306a\u3082\u306e\u3068\u3057\u3066\u306f\u4ee5\u4e0b\u306e3\u3064\u304c\u6319\u3052\u3089\u308c\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6b20\u843d\u5909\u6570\u30d0\u30a4\u30a2\u30b9\uff08Omitted Variable Bias\uff09<\/strong>: \u91cd\u8981\u306a\u5909\u6570\u304c\u30e2\u30c7\u30eb\u304b\u3089\u629c\u3051\u3066\u3044\u308b\u305f\u3081\u306b\u3001\u8aac\u660e\u5909\u6570\u3068\u8aa4\u5dee\u9805\u304c\u76f8\u95a2\u3057\u3066\u3057\u307e\u3046\u30b1\u30fc\u30b9\u3002\u5148\u307b\u3069\u306e\u30a2\u30a4\u30b9\u30af\u30ea\u30fc\u30e0\u306e\u4f8b\u3067\u8a00\u3048\u3070\u3001\u300c\u6c17\u6e29\u300d\u304c\u6b20\u843d\u5909\u6570\u306b\u3042\u305f\u308b\u3002<\/li>\n\n\n\n<li><strong>\u540c\u6642\u6027\uff08Simultaneity\uff09<\/strong>: \u8aac\u660e\u5909\u6570\u3068\u76ee\u7684\u5909\u6570\u304c\u4e92\u3044\u306b\u5f71\u97ff\u3057\u5408\u3063\u3066\u3044\u308b\u30b1\u30fc\u30b9\u3002\u4f8b\u3048\u3070\u3001\u4f9b\u7d66\u3068\u9700\u8981\u306e\u95a2\u4fc2\u306e\u3088\u3046\u306b\u3001\u4fa1\u683c\u304c\u9700\u8981\u306b\u5f71\u97ff\u3057\u3001\u9700\u8981\u304c\u4fa1\u683c\u306b\u5f71\u97ff\u3059\u308b\u3068\u3044\u3063\u305f\u5834\u5408\u3067\u3042\u308b\u3002<\/li>\n\n\n\n<li><strong>\u6e2c\u5b9a\u8aa4\u5dee\uff08Measurement Error\uff09<\/strong>: \u8aac\u660e\u5909\u6570\u306e\u6e2c\u5b9a\u306b\u8aa4\u5dee\u304c\u542b\u307e\u308c\u308b\u30b1\u30fc\u30b9\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u64cd\u4f5c\u5909\u6570\u6cd5\u3067\u306f\u3001\u3053\u308c\u3089\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3059\u308b\u305f\u3081\u306b\u3001\u4ee5\u4e0b\u306e\u6761\u4ef6\u3092\u6e80\u305f\u3059\u300c<strong>\u64cd\u4f5c\u5909\u6570\uff08Instrumental Variable, IV\uff09<\/strong>\u300d\u3068\u547c\u3070\u308c\u308b\u65b0\u305f\u306a\u5909\u6570\u3092\u4f7f\u7528\u3059\u308b\u3002<\/p>\n\n\n\n<ul start=\"1\" class=\"wp-block-list\">\n<li><strong>\u95a2\u9023\u6027\uff08Relevance\uff09<\/strong>: \u64cd\u4f5c\u5909\u6570\u306f\u3001\u5185\u751f\u6027\u306e\u3042\u308b\u8aac\u660e\u5909\u6570\u3068\u76f8\u95a2\u304c\u3042\u308b\u3053\u3068\u3002<\/li>\n\n\n\n<li><strong>\u5916\u751f\u6027\uff08Exogeneity\uff09<\/strong>: \u64cd\u4f5c\u5909\u6570\u306f\u3001\u76ee\u7684\u5909\u6570\u3068\u306f\u76f4\u63a5\u76f8\u95a2\u304c\u306a\u304f\u3001\u5185\u751f\u6027\u306e\u3042\u308b\u8aac\u660e\u5909\u6570\u3092\u4ecb\u3057\u3066\u306e\u307f\u76ee\u7684\u5909\u6570\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u3053\u3068\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u64cd\u4f5c\u5909\u6570\u306f\u3001\u5185\u751f\u6027\u306e\u3042\u308b\u8aac\u660e\u5909\u6570\u306e\u300c\u4ee3\u7406\u300d\u3068\u3057\u3066\u6a5f\u80fd\u3057\u3001\u305d\u306e\u5909\u6570\u3092\u901a\u3057\u3066\u306e\u307f\u76ee\u7684\u5909\u6570\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u305f\u3081\u3001\u5185\u751f\u6027\u306b\u3088\u308b\u30d0\u30a4\u30a2\u30b9\u3092\u53d6\u308a\u9664\u304d\u3001\u3088\u308a\u6b63\u78ba\u306a\u56e0\u679c\u52b9\u679c\u3092\u63a8\u5b9a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u64cd\u4f5c\u5909\u6570\u6cd5\u306e\u6d3b\u7528\u5834\u9762<\/h2>\n\n\n\n<p>\u64cd\u4f5c\u5909\u6570\u6cd5\u306f\u3001\u7d4c\u6e08\u5b66\u3001\u793e\u4f1a\u5b66\u3001\u75ab\u5b66\u3001\u653f\u7b56\u8a55\u4fa1\u306a\u3069\u3001\u5e45\u5e83\u3044\u5206\u91ce\u3067\u6d3b\u7528\u3055\u308c\u3066\u3044\u308b\u3002\u4ee5\u4e0b\u306b\u5177\u4f53\u7684\u306a\u6d3b\u7528\u5834\u9762\u3092\u3044\u304f\u3064\u304b\u793a\u3059\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u6559\u80b2\u3068\u8cc3\u91d1<\/strong>: \u6559\u80b2\u5e74\u6570\u304c\u8cc3\u91d1\u306b\u4e0e\u3048\u308b\u5f71\u97ff\u3092\u5206\u6790\u3059\u308b\u969b\u3001\u500b\u4eba\u306e\u80fd\u529b\u3084\u5bb6\u5ead\u74b0\u5883\u306a\u3069\u304c\u6559\u80b2\u5e74\u6570\u3068\u8cc3\u91d1\u306e\u53cc\u65b9\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u305f\u3081\u3001\u5185\u751f\u6027\u304c\u751f\u3058\u308b\u3002\u3053\u306e\u5834\u5408\u3001\u500b\u4eba\u306e\u51fa\u751f\u6708\u3084\u51fa\u751f\u5730\u306a\u3069\u3001\u6559\u80b2\u5e74\u6570\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u304c\u8cc3\u91d1\u306b\u306f\u76f4\u63a5\u5f71\u97ff\u3057\u306a\u3044\u5909\u6570\u3092\u64cd\u4f5c\u5909\u6570\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u8003\u3048\u3089\u308c\u308b\u3002<\/li>\n\n\n\n<li><strong>\u533b\u7642\u4ecb\u5165\u306e\u52b9\u679c<\/strong>: \u7279\u5b9a\u306e\u533b\u7642\u4ecb\u5165\u304c\u5065\u5eb7\u72b6\u614b\u306b\u4e0e\u3048\u308b\u5f71\u97ff\u3092\u8a55\u4fa1\u3059\u308b\u969b\u3001\u5065\u5eb7\u610f\u8b58\u306e\u9ad8\u3044\u4eba\u304c\u4ecb\u5165\u3092\u53d7\u3051\u3084\u3059\u3044\u3068\u3044\u3063\u305f\u81ea\u5df1\u9078\u629e\u30d0\u30a4\u30a2\u30b9\u304c\u751f\u3058\u308b\u3053\u3068\u304c\u3042\u308b\u3002\u3053\u306e\u5834\u5408\u3001\u533b\u7642\u4ecb\u5165\u3078\u306e\u30a2\u30af\u30bb\u30b9\u3092\u30e9\u30f3\u30c0\u30e0\u306b\u5272\u308a\u5f53\u3066\u308b\u3088\u3046\u306a\u3001\u653f\u7b56\u7684\u306a\u4ecb\u5165\u3084\u5730\u7406\u7684\u8981\u56e0\u306a\u3069\u3092\u64cd\u4f5c\u5909\u6570\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u691c\u8a0e\u3055\u308c\u308b\u3002<\/li>\n\n\n\n<li><strong>\u4f01\u696d\u306e\u6295\u8cc7\u3068\u751f\u7523\u6027<\/strong>: \u4f01\u696d\u306e\u6295\u8cc7\u304c\u751f\u7523\u6027\u306b\u4e0e\u3048\u308b\u5f71\u97ff\u3092\u5206\u6790\u3059\u308b\u969b\u3001\u4f01\u696d\u306e\u751f\u7523\u6027\u304c\u9ad8\u3044\u305f\u3081\u306b\u6295\u8cc7\u304c\u5897\u3048\u308b\u3068\u3044\u3046\u540c\u6642\u6027\u306e\u554f\u984c\u304c\u751f\u3058\u308b\u3053\u3068\u304c\u3042\u308b\u3002\u3053\u306e\u5834\u5408\u3001\u91d1\u878d\u653f\u7b56\u3084\u7a0e\u5236\u512a\u9047\u63aa\u7f6e\u306a\u3069\u3001\u4f01\u696d\u306e\u6295\u8cc7\u306b\u306f\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u304c\u751f\u7523\u6027\u306b\u306f\u76f4\u63a5\u5f71\u97ff\u3057\u306a\u3044\u5909\u6570\u3092\u64cd\u4f5c\u5909\u6570\u3068\u3057\u3066\u5229\u7528\u3059\u308b\u3053\u3068\u304c\u8003\u3048\u3089\u308c\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<div id=\"biost-3920172182\" 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\uff1a\u6559\u80b2\u3068\u8cc3\u91d1<\/h2>\n\n\n\n<p>\u3053\u3053\u3067\u306f\u3001\u300c<strong>\u6559\u80b2\u5e74\u6570\u304c\u8cc3\u91d1\u306b\u4e0e\u3048\u308b\u56e0\u679c\u52b9\u679c<\/strong>\u300d\u3092\u63a8\u5b9a\u3059\u308b\u4f8b\u3092\u8003\u3048\u3066\u307f\u3088\u3046\u3002<\/p>\n\n\n\n<p>\u901a\u5e38\u3001\u6559\u80b2\u5e74\u6570\u304c\u9577\u3044\u307b\u3069\u8cc3\u91d1\u304c\u9ad8\u3044\u50be\u5411\u306b\u3042\u308b\u304c\u3001\u3053\u308c\u306f\u6559\u80b2\u304c\u8cc3\u91d1\u3092\u4e0a\u3052\u308b\u3068\u3044\u3046\u56e0\u679c\u95a2\u4fc2\u3060\u3051\u3067\u306a\u304f\u3001\u80fd\u529b\u306e\u9ad8\u3044\u4eba\u304c\u3088\u308a\u591a\u304f\u306e\u6559\u80b2\u3092\u53d7\u3051\u308b\u50be\u5411\u304c\u3042\u308b\u3001\u3068\u3044\u3063\u305f\u300c<strong>\u80fd\u529b\u30d0\u30a4\u30a2\u30b9<\/strong>\u300d\u304c\u95a2\u4fc2\u3057\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u3002\u3064\u307e\u308a\u3001\u80fd\u529b\u304c\u6559\u80b2\u5e74\u6570\u3068\u8cc3\u91d1\u306e\u53cc\u65b9\u306b\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u305f\u3081\u3001\u6559\u80b2\u5e74\u6570\u3068\u8aa4\u5dee\u9805\u306e\u9593\u306b\u76f8\u95a2\u304c\u751f\u3058\u3001\u5185\u751f\u6027\u306e\u554f\u984c\u304c\u767a\u751f\u3059\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u5185\u751f\u6027\u306e\u554f\u984c\u306b\u5bfe\u51e6\u3059\u308b\u305f\u3081\u306b\u3001\u64cd\u4f5c\u5909\u6570\u6cd5\u3092\u9069\u7528\u3059\u308b\u3002\u4eca\u56de\u306f\u3001\u64cd\u4f5c\u5909\u6570\u3068\u3057\u3066\u300c<strong>\u51fa\u751f\u5730\u304c\u5927\u5b66\u306e\u8fd1\u304f\u304b\u3069\u3046\u304b<\/strong>\u300d\u3068\u3044\u3046\u5909\u6570\u3092\u4f7f\u7528\u3059\u308b\u3053\u3068\u3092\u8003\u3048\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u95a2\u9023\u6027<\/strong>: \u51fa\u751f\u5730\u304c\u5927\u5b66\u306e\u8fd1\u304f\u3067\u3042\u308c\u3070\u3001\u5927\u5b66\u3078\u306e\u9032\u5b66\u304c\u5bb9\u6613\u306b\u306a\u308a\u3001\u7d50\u679c\u3068\u3057\u3066\u6559\u80b2\u5e74\u6570\u304c\u9577\u304f\u306a\u308b\u50be\u5411\u304c\u3042\u308b\u3068\u8003\u3048\u3089\u308c\u308b\u3002<\/li>\n\n\n\n<li><strong>\u5916\u751f\u6027<\/strong>: \u51fa\u751f\u5730\u304c\u5927\u5b66\u306e\u8fd1\u304f\u3067\u3042\u308b\u3053\u3068\u81ea\u4f53\u304c\u3001\u500b\u4eba\u306e\u8cc3\u91d1\u306b\u76f4\u63a5\u5f71\u97ff\u3092\u4e0e\u3048\u308b\u3053\u3068\u306f\u306a\u3044\u3068\u8003\u3048\u3089\u308c\u308b\u3002\u8cc3\u91d1\u3078\u306e\u5f71\u97ff\u306f\u3001\u51fa\u751f\u5730\u304c\u5927\u5b66\u306e\u8fd1\u304f\u3067\u3042\u308b\u3053\u3068\u306b\u3088\u3063\u3066\u6559\u80b2\u5e74\u6570\u304c\u4f38\u3073\u305f\u5834\u5408\u306b\u306e\u307f\u751f\u3058\u308b\u3068\u4eee\u5b9a\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<p>\u3053\u306e\u64cd\u4f5c\u5909\u6570\u3092\u4f7f\u3063\u3066\u3001\u6559\u80b2\u5e74\u6570\u304c\u8cc3\u91d1\u306b\u4e0e\u3048\u308b\u771f\u306e\u56e0\u679c\u52b9\u679c\u3092\u63a8\u5b9a\u3059\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">R \u8a08\u7b97\u4f8b<\/h3>\n\n\n\n<p>R\u3092\u4f7f\u3063\u305f\u64cd\u4f5c\u5909\u6570\u6cd5\u306e\u8a08\u7b97\u4f8b\u3092\u898b\u3066\u307f\u3088\u3046\u3002\u3053\u3053\u3067\u306f\u3001<code>AER<\/code>\u30d1\u30c3\u30b1\u30fc\u30b8\u306e<code>ivreg()<\/code>\u95a2\u6570\u3092\u4f7f\u7528\u3059\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># \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(\"AER\")\n\n# \u30d1\u30c3\u30b1\u30fc\u30b8\u306e\u8aad\u307f\u8fbc\u307f\nlibrary(AER)\n\n# \u30b5\u30f3\u30d7\u30eb\u30c7\u30fc\u30bf\u306e\u4f5c\u6210\nset.seed(123)\nn &lt;- 1000\n\n# \u6f5c\u5728\u7684\u306a\u80fd\u529b\uff08\u89b3\u6e2c\u3067\u304d\u306a\u3044\u5909\u6570\uff09\nability &lt;- rnorm(n, mean = 0, sd = 1)\n\n# \u64cd\u4f5c\u5909\u6570\uff1a\u51fa\u751f\u5730\u304c\u5927\u5b66\u306e\u8fd1\u304f\u304b\u3069\u3046\u304b (0:\u9060\u3044, 1:\u8fd1\u3044)\nnear_university &lt;- rbinom(n, 1, 0.5)\n\n# \u6559\u80b2\u5e74\u6570\uff08ability\u3068near_university\u306b\u5f71\u97ff\u3055\u308c\u308b\uff09\n# ability\u304c\u9ad8\u3044\u307b\u3069\u3001near_university\u304c1\u3060\u3068\u6559\u80b2\u5e74\u6570\u304c\u9577\u304f\u306a\u308b\u50be\u5411\neducation &lt;- round(10 + 2 * ability + 2 * near_university + rnorm(n, mean = 0, sd = 1))\neducation &lt;- pmax(0, education) # \u6559\u80b2\u5e74\u6570\u304c\u8ca0\u306b\u306a\u3089\u306a\u3044\u3088\u3046\u306b\u8abf\u6574\n\n# \u8cc3\u91d1\uff08education\u3068ability\u306b\u5f71\u97ff\u3055\u308c\u308b\uff09\n# ability\u304c\u9ad8\u3044\u307b\u3069\u3001education\u304c\u9ad8\u3044\u307b\u3069\u8cc3\u91d1\u3082\u9ad8\u304f\u306a\u308b\u304c\u3001ability\u306f\u8aa4\u5dee\u9805\u306b\u542b\u307e\u308c\u308b\nwage &lt;- round(5 + 0.8 * education + 1.5 * ability + rnorm(n, mean = 0, sd = 2))\n\n# \u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306e\u4f5c\u6210\ndata_df &lt;- data.frame(wage, education, near_university, ability)\n\n# OLS\uff08\u901a\u5e38\u306e\u6700\u5c0f\u4e8c\u4e57\u6cd5\uff09\u3067\u306e\u63a8\u5b9a\n# ability\u304c\u6b20\u843d\u5909\u6570\u3068\u3057\u3066\u8aa4\u5dee\u9805\u306b\u542b\u307e\u308c\u308b\u305f\u3081\u3001\u5185\u751f\u6027\u304c\u767a\u751f\nols_model &lt;- lm(wage ~ education, data = data_df)\nsummary(ols_model)\n\n# \u64cd\u4f5c\u5909\u6570\u6cd5\u3067\u306e\u63a8\u5b9a\n# education\u304c\u5185\u751f\u5909\u6570\u3001near_university\u304c\u64cd\u4f5c\u5909\u6570\niv_model &lt;- ivreg(wage ~ education | near_university, data = data_df)\nsummary(iv_model)\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>> # OLS\uff08\u901a\u5e38\u306e\u6700\u5c0f\u4e8c\u4e57\u6cd5\uff09\u3067\u306e\u63a8\u5b9a\n> # ability\u304c\u6b20\u843d\u5909\u6570\u3068\u3057\u3066\u8aa4\u5dee\u9805\u306b\u542b\u307e\u308c\u308b\u305f\u3081\u3001\u5185\u751f\u6027\u304c\u767a\u751f\n> ols_model &lt;- lm(wage ~ education, data = data_df)\n> summary(ols_model)\n\nCall:\nlm(formula = wage ~ education, data = data_df)\n\nResiduals:\n    Min      1Q  Median      3Q     Max \n-6.5172 -1.5172  0.0304  1.4828  6.9018 \n\nCoefficients:\n            Estimate Std. Error t value Pr(>|t|)    \n(Intercept) -0.38751    0.31918  -1.214    0.225    \neducation    1.29047    0.02833  45.558   &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.185 on 998 degrees of freedom\nMultiple R-squared:  0.6753,    Adjusted R-squared:  0.675 \nF-statistic:  2076 on 1 and 998 DF,  p-value: &lt; 2.2e-16\n\n> # \u64cd\u4f5c\u5909\u6570\u6cd5\u3067\u306e\u63a8\u5b9a\n> # education\u304c\u5185\u751f\u5909\u6570\u3001near_university\u304c\u64cd\u4f5c\u5909\u6570\n> iv_model &lt;- ivreg(wage ~ education | near_university, data = data_df)\n> summary(iv_model)\n\nCall:\nivreg(formula = wage ~ education | near_university, data = data_df)\n\nResiduals:\n     Min       1Q   Median       3Q      Max \n-7.30693 -1.68342  0.06717  1.56598  8.06478 \n\nCoefficients:\n            Estimate Std. Error t value Pr(>|t|)    \n(Intercept)  4.17983    0.78188   5.346 1.12e-07 ***\neducation    0.87530    0.07073  12.374  &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.409 on 998 degrees of freedom\nMultiple R-Squared: 0.6054,     Adjusted R-squared: 0.605 \nWald test: 153.1 on 1 and 998 DF,  p-value: &lt; 2.2e-16 \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\u30b3\u30fc\u30c9\u3092\u5b9f\u884c\u3059\u308b\u3068\u3001<code>ols_model<\/code>\u3068<code>iv_model<\/code>\u306e2\u3064\u306e\u7d50\u679c\u304c\u51fa\u529b\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p><strong>OLS\u30e2\u30c7\u30eb\u306e\u7d50\u679c\uff08\u4e00\u90e8\u629c\u7c8b\uff09:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Coefficients:\n            Estimate Std. Error t value Pr(>|t|)    \n(Intercept) -0.38751    0.31918  -1.214    0.225    \neducation    1.29047    0.02833  45.558   &lt;2e-16 ***\n<\/code><\/pre>\n\n\n\n<p>OLS\u30e2\u30c7\u30eb\u3067\u306f\u3001<code>education<\/code>\u306e\u4fc2\u6570\u304c\u7d04 1.29 \u3068\u63a8\u5b9a\u3055\u308c\u305f\u3002\u3053\u308c\u306f\u3001\u6559\u80b2\u5e74\u6570\u304c1\u5e74\u5897\u3048\u308b\u3054\u3068\u306b\u8cc3\u91d1\u304c\u7d04 1.29 \u5358\u4f4d\uff08\u4f8b\uff1a1 \u5358\u4f4d 100 \u4e07\u5186\u3068\u3059\u308b\u3068 129 \u4e07\u5186\uff09\u5897\u52a0\u3059\u308b\u3053\u3068\u3092\u793a\u5506\u3057\u3066\u3044\u308b\u3002\u3057\u304b\u3057\u3001\u3053\u306eOLS\u306e\u63a8\u5b9a\u5024\u306b\u306f<strong>\u80fd\u529b\u30d0\u30a4\u30a2\u30b9\u304c\u542b\u307e\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027<\/strong>\u304c\u3042\u308b\u3002\u3064\u307e\u308a\u3001\u6559\u80b2\u5e74\u6570\u304c\u9577\u3044\u4eba\u304c\u3082\u3068\u3082\u3068\u80fd\u529b\u304c\u9ad8\u3044\u305f\u3081\u306b\u8cc3\u91d1\u304c\u9ad8\u3044\u3068\u3044\u3046\u5074\u9762\u304c\u3001\u3053\u306e\u4fc2\u6570\u306b\u4e0a\u4e57\u305b\u3055\u308c\u3066\u3044\u308b\u53ef\u80fd\u6027\u304c\u3042\u308b\u306e\u3060\u3002<\/p>\n\n\n\n<p><strong>\u64cd\u4f5c\u5909\u6570\u6cd5\uff08IV\uff09\u30e2\u30c7\u30eb\u306e\u7d50\u679c\uff08\u4e00\u90e8\u629c\u7c8b\uff09:<\/strong><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>Coefficients:\n            Estimate Std. Error t value Pr(>|t|)    \n(Intercept)  4.17983    0.78188   5.346 1.12e-07 ***\neducation    0.87530    0.07073  12.374  &lt; 2e-16 ***\n<\/code><\/pre>\n\n\n\n<p>\u64cd\u4f5c\u5909\u6570\u6cd5\u3092\u7528\u3044\u305fIV\u30e2\u30c7\u30eb\u3067\u306f\u3001<code>education<\/code>\u306e\u4fc2\u6570\u304c\u7d04 0.88 \u3068\u63a8\u5b9a\u3055\u308c\u305f\u3002\u3053\u306e\u5024\u306f\u3001OLS\u306e\u7d50\u679c\uff081.29\uff09\u3088\u308a\u3082\u5c0f\u3055\u304f\u306a\u3063\u3066\u3044\u308b\u3002\u3053\u308c\u306f\u3001\u64cd\u4f5c\u5909\u6570\u6cd5\u304c\u80fd\u529b\u30d0\u30a4\u30a2\u30b9\u3092\u53d6\u308a\u9664\u304d\u3001<strong>\u6559\u80b2\u5e74\u6570\u304c\u8cc3\u91d1\u306b\u4e0e\u3048\u308b\u771f\u306e\u56e0\u679c\u52b9\u679c\uff08\u7d040.88\uff09\u3092\u3088\u308a\u6b63\u78ba\u306b\u63a8\u5b9a\u3067\u304d\u3066\u3044\u308b\u53ef\u80fd\u6027<\/strong>\u3092\u793a\u3057\u3066\u3044\u308b\u3002\u3064\u307e\u308a\u3001\u80fd\u529b\u306b\u3088\u308b\u5f71\u97ff\u3092\u6392\u9664\u3057\u305f\u4e0a\u3067\u3001\u6559\u80b2\u5e74\u6570\u304c1\u5e74\u5897\u3048\u308b\u3053\u3068\u306b\u3088\u308b\u8cc3\u91d1\u306e\u4e0a\u6607\u52b9\u679c\u304c\u7d04 0.88 \u5358\u4f4d\uff08\u4f8b\uff1a1 \u5358\u4f4d 100 \u4e07\u5186\u3068\u3059\u308b\u3068 88 \u4e07\u5186\uff09\u3067\u3042\u308b\u3001\u3068\u89e3\u91c8\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p>\u3053\u306e\u3088\u3046\u306b\u3001OLS\u3067\u306f\u898b\u305b\u304b\u3051\u306e\u76f8\u95a2\uff08\u80fd\u529b\u3068\u6559\u80b2\u5e74\u6570\u306e\u76f8\u95a2\uff09\u306b\u3088\u3063\u3066\u4fc2\u6570\u304c\u904e\u5927\u8a55\u4fa1\u3055\u308c\u3066\u3044\u305f\u53ef\u80fd\u6027\u304c\u3042\u3063\u305f\u304c\u3001\u64cd\u4f5c\u5909\u6570\u6cd5\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u3001\u3088\u308a\u53b3\u5bc6\u306a\u56e0\u679c\u95a2\u4fc2\u3092\u63a8\u5b9a\u3059\u308b\u3053\u3068\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">\u307e\u3068\u3081<\/h2>\n\n\n\n<p>\u64cd\u4f5c\u5909\u6570\u6cd5\u306f\u3001\u7d71\u8a08\u5206\u6790\u306b\u304a\u3051\u308b\u300c\u5185\u751f\u6027\u300d\u3068\u3044\u3046\u5384\u4ecb\u306a\u554f\u984c\u306b\u5bfe\u51e6\u3057\u3001<strong>\u898b\u305b\u304b\u3051\u306e\u76f8\u95a2\u306b\u60d1\u308f\u3055\u308c\u305a\u306b\u771f\u306e\u56e0\u679c\u52b9\u679c\u3092\u7279\u5b9a\u3059\u308b\u305f\u3081\u306e\u975e\u5e38\u306b\u5f37\u529b\u306a\u624b\u6cd5<\/strong>\u3067\u3042\u308b\u3002\u9069\u5207\u306a\u64cd\u4f5c\u5909\u6570\u3092\u898b\u3064\u3051\u308b\u3053\u3068\u306f\u5bb9\u6613\u3067\u306f\u306a\u3044\u304c\u3001\u3053\u306e\u624b\u6cd5\u3092\u4f7f\u3044\u3053\u306a\u3059\u3053\u3068\u3067\u3001\u3088\u308a\u4fe1\u983c\u6027\u306e\u9ad8\u3044\u5206\u6790\u7d50\u679c\u3092\u5f97\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p>\u8907\u96d1\u306a\u793e\u4f1a\u73fe\u8c61\u3084\u7d4c\u6e08\u73fe\u8c61\u306e\u88cf\u306b\u96a0\u3055\u308c\u305f\u771f\u306e\u56e0\u679c\u95a2\u4fc2\u3092\u89e3\u660e\u3059\u308b\u305f\u3081\u306b\u3001\u64cd\u4f5c\u5909\u6570\u6cd5\u306f\u4eca\u5f8c\u307e\u3059\u307e\u3059\u91cd\u8981\u306a\u5f79\u5272\u3092\u679c\u305f\u3059\u3060\u308d\u3046\u3002\u3082\u3057\u3042\u306a\u305f\u304c\u5206\u6790\u306e\u969b\u306b\u300c\u672c\u5f53\u306b\u3053\u308c\u3067\u56e0\u679c\u95a2\u4fc2\u3092\u8a00\u3048\u308b\u306e\u304b\uff1f\u300d\u3068\u7591\u554f\u306b\u611f\u3058\u305f\u3089\u3001\u64cd\u4f5c\u5909\u6570\u6cd5\u306e\u6d3b\u7528\u3092\u691c\u8a0e\u3057\u3066\u307f\u3066\u306f\u3044\u304b\u304c\u3060\u308d\u3046\u304b\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u898b\u305b\u304b\u3051\u306e\u76f8\u95a2\u306b\u60d1\u308f\u3055\u308c\u3066\u3044\u306a\u3044\u3060\u308d\u3046\u304b\uff1f\u4e16\u306e\u4e2d\u306b\u306f\u3001\u4e00\u898b\u3059\u308b\u3068\u95a2\u4fc2\u304c\u3042\u308a\u305d\u3046\u306b\u898b\u3048\u3066\u3001\u5b9f\u306f\u305d\u3046\u3067\u306f\u306a\u3044\u73fe\u8c61\u304c\u305f\u304f\u3055\u3093\u5b58\u5728\u3059\u308b\u3002\u4f8b\u3048\u3070\u3001\u300c\u30a2\u30a4\u30b9\u30af\u30ea\u30fc\u30e0\u304c\u58f2\u308c\u308b\u3068\u30d7\u30fc\u30eb\u306e\u4e8b\u6545\u304c\u5897\u3048\u308b\u300d\u3068\u3044\u3046\u8a71\u3092\u805e\u3044\u305f\u3053\u3068\u306f\u306a\u3044\u3060\u308d\u3046\u304b\uff1f [&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":[114],"tags":[],"class_list":["post-4151","post","type-post","status-publish","format-standard","hentry","category-114"],"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\/4151","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=4151"}],"version-history":[{"count":2,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4151\/revisions"}],"predecessor-version":[{"id":4155,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4151\/revisions\/4155"}],"wp:attachment":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media?parent=4151"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/categories?post=4151"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/tags?post=4151"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}