{"id":4748,"date":"2026-08-15T17:59:38","date_gmt":"2026-08-15T08:59:38","guid":{"rendered":"https:\/\/best-biostatistics.com\/toukei-er\/?p=4748"},"modified":"2026-08-15T17:59:39","modified_gmt":"2026-08-15T08:59:39","slug":"dont-miss-u-shaped-or-j-shaped-risks-continuous-hazard-ratio-visualization-and-cox-regression-via-restricted-cubic-splines-rcs","status":"publish","type":"post","link":"https:\/\/best-biostatistics.com\/toukei-er\/entry\/dont-miss-u-shaped-or-j-shaped-risks-continuous-hazard-ratio-visualization-and-cox-regression-via-restricted-cubic-splines-rcs\/","title":{"rendered":"U\u5b57\u30fbJ\u5b57\u578b\u30ea\u30b9\u30af\u3092\u898b\u9003\u3055\u306a\u3044\uff01\u73fe\u4ee3\u533b\u5b66\u7d71\u8a08\u306e\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u300cRestricted Cubic Splines\u300d\u306b\u3088\u308bCox\u56de\u5e30\u3068\u9023\u7d9aHR\u53ef\u8996\u5316"},"content":{"rendered":"\n<p class=\"wp-block-paragraph\">\u300c\u5148\u751f\uff01BMI\u3068\u6b7b\u4ea1\u30ea\u30b9\u30af\u306e\u95a2\u4fc2\u3092\u898b\u305f\u304f\u3066\u591a\u5909\u91cfCox\u6bd4\u4f8b\u30cf\u30b6\u30fc\u30c9\u30e2\u30c7\u30eb\u3092\u7d44\u3093\u3060\u306e\u3067\u3059\u304c\u3001$P &gt; 0.05$ \u3067\u6709\u610f\u5dee\u304c\u51fa\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3067\u3082\u30c7\u30fc\u30bf\u3092\u30b0\u30e9\u30d5\u3067\u898b\u308b\u3068\u3001\u3069\u3046\u898b\u3066\u3082U\u5b57\u578b\uff08\u4f4e\u4f53\u91cd\u3067\u3082\u80a5\u6e80\u3067\u3082\u6b7b\u4ea1\u30ea\u30b9\u30af\u304c\u9ad8\u3044\uff09\u306a\u3093\u3067\u3059\uff01\u76f4\u7dda\u30e2\u30c7\u30eb\u306e\u307e\u307e\u8ad6\u6587\u306b\u66f8\u3044\u3066\u826f\u3044\u306e\u3067\u3057\u3087\u3046\u304b\uff1f\u300d<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u81e8\u5e8a\u7814\u7a76\u306b\u304a\u3044\u3066\u3001\u9023\u7d9a\u5909\u6570\uff08BMI\u3001\u8840\u5727\u3001eGFR\u3001CRP\u3001\u5e74\u9f62\u306a\u3069\uff09\u3068\u75be\u60a3\u30ea\u30b9\u30af\u306e\u95a2\u4fc2\u3092\u89e3\u6790\u3059\u308b\u969b\u3001\u3053\u306e\u3088\u3046\u306a\u300c\u624b\u8a70\u307e\u308a\u300d\u306b\u76f4\u9762\u3059\u308b\u7814\u7a76\u8005\u306f\u975e\u5e38\u306b\u591a\u3044\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u751f\u4f53\u53cd\u5fdc\u306e\u591a\u304f\u306f\u76f4\u7dda\uff08\u7dda\u5f62\uff09\u3067\u306f\u306a\u304f\u3001\u300c\u9069\u6b63\u7bc4\u56f2\u300d\u3084\u300c\u95be\u5024\uff08Threshold\uff09\u300d\u3092\u6301\u3064\u975e\u7dda\u5f62\u306a\u95a2\u4fc2\uff08U\u5b57\u578b\u30fbJ\u5b57\u578b\u30fbL\u5b57\u578b\uff09\u3092\u793a\u3059\u3002\u3053\u308c\u3092\u7121\u7406\u3084\u308a\u76f4\u7dda\u30e2\u30c7\u30eb\u306b\u5f53\u3066\u306f\u3081\u308b\u3068\u3001\u30ea\u30b9\u30af\u306e\u4e0a\u6607\u3068\u4f4e\u4e0b\u304c\u76f8\u6bba\u3055\u308c\u3066\u300c\u6709\u610f\u5dee\u306a\u3057\u300d\u3068\u3044\u3046\u8aa4\u3063\u305f\u7d50\u8ad6\u3092\u5c0e\u3044\u3066\u3057\u307e\u3046\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u304b\u3068\u3044\u3063\u3066\u3001\u9023\u7d9a\u5909\u6570\u3092\u300c4\u5206\u4f4d\u7fa4\uff08Q1\u301cQ4\uff09\u300d\u3084\u300c65\u6b73\u4ee5\u4e0a\/\u672a\u6e80\u300d\u306a\u3069\u306e\u30ab\u30c6\u30b4\u30ea\u30fc\u306b\u5b89\u6613\u306b\u5206\u5272\u3057\u3066\u9003\u3052\u308b\u3068\u3001\u60c5\u5831\u640d\u5931\u304c\u5927\u304d\u304f\u67fb\u8aad\u8005\u304b\u3089\u300c\u306a\u305c\u305d\u306e\u30ab\u30c3\u30c8\u30aa\u30d5\u306a\u306e\u304b\uff1f P-hacking\uff08\u30c7\u30fc\u30bf\u99c6\u52d5\u7684\u306a\u30ab\u30c3\u30c8\u30aa\u30d5\u9078\u629e\uff09\u3067\u306f\u306a\u3044\u304b\uff1f\u300d\u3068\u4e00\u767a\u3067\u53e9\u304b\u308c\u308b\u539f\u56e0\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u306e\u554f\u984c\u3092\u6839\u672c\u304b\u3089\u89e3\u6c7a\u3057\u3001\u73fe\u4ee3\u533b\u5b66\u7d71\u8a08\u306e\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u3068\u306a\u3063\u3066\u3044\u308b\u624b\u6cd5\u304c <strong>Restricted Cubic Splines\uff08RCS \/ \u5236\u9650\u4ed8\u304d3\u6b21\u30b9\u30d7\u30e9\u30a4\u30f3\uff09<\/strong> \u3067\u3042\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u672c\u8a18\u4e8b\u3067\u306f\u3001\u9023\u7d9a\u5909\u6570\u3092\u30ab\u30c6\u30b4\u30ea\u30fc\u5316\u3059\u308b\u300c3\u3064\u306e\u7f60\u300d\u304b\u3089\u3001RCS\u304c\u4e16\u754c\u6a19\u6e96\u3067\u3042\u308b\u7406\u7531\u3001\u67fb\u8aad\u8005\u3092\u7d0d\u5f97\u3055\u305b\u308b\u300c\u975e\u7dda\u5f62\u6027\u306e\u691c\u5b9a\uff08$P$ for non-linearity\uff09\u300d\u306e\u8aad\u307f\u65b9\u3001<code>rms<\/code> \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u7528\u3044\u305fR\u3067\u306e\u5b9f\u8df5\u624b\u9806\u3001\u305d\u3057\u3066\u8ad6\u6587\u3067\u305d\u306e\u307e\u307e\u4f7f\u3048\u308b\u82f1\u6587\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u307e\u3067\u3092\u5fb9\u5e95\u89e3\u8aac\u3059\u308b\u3002<\/p>\n\n\n\n<!--more-->\n\n\n\n<h2 class=\"wp-block-heading\">1. \u9023\u7d9a\u5909\u6570\u3092\u30ab\u30c6\u30b4\u30ea\u30fc\u5316\u3057\u3066\u89e3\u6790\u3059\u308b\u300c3\u3064\u306e\u7f60\u300d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u81e8\u5e8a\u30c7\u30fc\u30bf\u3092\u89e3\u6790\u3059\u308b\u969b\u3001\u9023\u7d9a\u5909\u6570\u306e\u6271\u3044\u65b9\u3092\u8aa4\u308b\u3068\u7814\u7a76\u306e\u8cea\u304c\u8457\u3057\u304f\u4f4e\u4e0b\u3059\u308b\u3002\u81e8\u5e8a\u533b\u304c\u9665\u308a\u304c\u3061\u306a\u300c3\u3064\u306e\u7f60\u300d\u3092\u6574\u7406\u3059\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7f601\uff1a\u7dda\u5f62\u6027\u306e\u5f37\u5236\u9069\u7528\uff08Linearity Trap\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u6a19\u6e96\u7684\u306aCox\u6bd4\u4f8b\u30cf\u30b6\u30fc\u30c9\u30e2\u30c7\u30eb\u3084\u30ed\u30b8\u30b9\u30c6\u30a3\u30c3\u30af\u56de\u5e30\u30e2\u30c7\u30eb\u306b\u9023\u7d9a\u5909\u6570\u3092\u305d\u306e\u307e\u307e\u6295\u5165\u3059\u308b\u3068\u3001\u300c1\u5358\u4f4d\u5897\u52a0\u3059\u308b\u3054\u3068\u306e\u30ea\u30b9\u30af\u5909\u5316\uff08\u30cf\u30b6\u30fc\u30c9\u6bd4\uff1aHR\uff09\u304c\u5e38\u306b\u4e00\u5b9a\u3067\u3042\u308b\u300d\u3068\u3044\u3046\u76f4\u7dda\uff08\u7dda\u5f62\uff09\u30e2\u30c7\u30eb\u304c\u81ea\u52d5\u7684\u306b\u9069\u7528\u3055\u308c\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u4f8b\u3048\u3070\u3001BMI\u3068\u5168\u6b7b\u4ea1\u30ea\u30b9\u30af\u306e\u3088\u3046\u306b\u300c\u4f4e\u4f53\u91cd\uff08BMI &lt; 18.5\uff09\u3067\u3082\u9ad8\u5ea6\u80a5\u6e80\uff08BMI &gt; 30\uff09\u3067\u3082\u6b7b\u4ea1\u7387\u304c\u4e0a\u304c\u308b\u300dU\u5b57\u578b\u30ea\u30b9\u30af\u69cb\u9020\u3092\u6301\u3064\u30c7\u30fc\u30bf\u3092\u76f4\u7dda\u30e2\u30c7\u30eb\u306b\u5165\u308c\u308b\u3068\u3001\u4f4e\u4f53\u91cd\u5074\u306e\u30ea\u30b9\u30af\u4e0a\u6607\u3068\u80a5\u6e80\u5074\u306e\u30ea\u30b9\u30af\u4e0a\u6607\u304c\u4e92\u3044\u306b\u6253\u3061\u6d88\u3057\u5408\u3044\u3001\u56de\u5e30\u4fc2\u6570\u306e\u50be\u304d\u304c\u5e73\u5766\uff08$\\text{HR} \\approx 1.0$\uff09\u306b\u306a\u3063\u3066 $P &gt; 0.05$\uff08\u6709\u610f\u5dee\u306a\u3057\uff09\u3068\u3044\u3046\u507d\u9670\u6027\u306e\u7d50\u8ad6\u306b\u81f3\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u7f602\uff1a\u5b89\u6613\u306a\u30ab\u30c6\u30b4\u30ea\u30fc\u5316\uff08Arbitrary Categorization Trap\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u76f4\u7dda\u30e2\u30c7\u30eb\u3067\u6709\u610f\u5dee\u304c\u51fa\u306a\u3044\u305f\u3081\u3001\u9023\u7d9a\u5909\u6570\u3092\u300c4\u5206\u4f4d\u7fa4\uff08Q1\u301cQ4\uff09\u300d\u3084\u300c\u81e8\u5e8a\u7684\u30ab\u30c3\u30c8\u30aa\u30d5\uff08\u4f8b: 65\u6b73\u4ee5\u4e0a\uff09\u300d\u3067\u30ab\u30c6\u30b4\u30ea\u30fc\u5316\u3057\u3066\u591a\u5909\u91cf\u89e3\u6790\u306b\u5165\u308c\u308b\u624b\u6cd5\u304c\u3088\u304f\u4f7f\u308f\u308c\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3057\u304b\u3057\u3001\u30ab\u30c6\u30b4\u30ea\u30fc\u5316\u306b\u306f\u4ee5\u4e0b\u306e\u81f4\u547d\u7684\u306a\u30c7\u30e1\u30ea\u30c3\u30c8\u304c\u5b58\u5728\u3059\u308b\uff1a<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>\u7d71\u8a08\u7684\u691c\u51fa\u529b\uff08Power\uff09\u306e\u8457\u3057\u3044\u4f4e\u4e0b<\/strong>: \u9023\u7d9a\u5024\u3092\u533a\u5206\u5316\u3059\u308b\u3053\u3068\u3067\u3001\u30c7\u30fc\u30bf\u304c\u6301\u3064\u8c4a\u5bcc\u306a\u60c5\u5831\u91cf\u304c\u5927\u91cf\u306b\u7834\u68c4\u3055\u308c\u308b\u3002<\/li>\n\n\n\n<li><strong>\u4e0d\u81ea\u7136\u306a\u5883\u754c\u52b9\u679c<\/strong>: \u30ab\u30c3\u30c8\u30aa\u30d5\u306e\u5883\u754c\u7dda\uff08\u4f8b: 64\u6b73\u306865\u6b73\uff09\u3067\u30ea\u30b9\u30af\u304c\u6025\u6fc0\u306b\u8df3\u306d\u4e0a\u304c\u308b\u3068\u3044\u3046\u3001\u81e8\u5e8a\u7684\u306b\u3042\u308a\u5f97\u306a\u3044\u4e0d\u81ea\u7136\u306a\u30e2\u30c7\u30eb\u306b\u306a\u308b\u3002<\/li>\n\n\n\n<li><strong>\u67fb\u8aad\u8005\u304b\u3089\u306e\u6307\u6458<\/strong>: \u300c\u306a\u305c\u305d\u306e\u30ab\u30c3\u30c8\u30aa\u30d5\u3092\u8a2d\u5b9a\u3057\u305f\u306e\u304b\uff1f\u5148\u884c\u7814\u7a76\u306e\u6839\u62e0\u306f\u3042\u308b\u306e\u304b\uff1f\u89e3\u6790\u7d50\u679c\u304c\u826f\u304f\u898b\u3048\u308b\u30ab\u30c3\u30c8\u30aa\u30d5\u3092\u63a2\u3057\u305f\u306e\u3067\u306f\u306a\u3044\u304b\uff1f\u300d\u3068\u3044\u3046\u6307\u6458\u3092\u53d7\u3051\u308b\u6700\u5927\u306e\u8981\u56e0\u3068\u306a\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">\u7f603\uff1a\u9ad8\u6b21\u591a\u9805\u5f0f\u306e\u633f\u5165\uff08Polynomial Trap\uff09<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u66f2\u7dda\u3092\u63cf\u304f\u305f\u3081\u306b\u3001$X$ \u306b\u52a0\u3048\u3066 $X^2$\uff082\u6b21\u5f0f\uff09\u3084 $X^3$\uff083\u6b21\u5f0f\uff09\u3092\u30e2\u30c7\u30eb\u306b\u5165\u308c\u308b\u624b\u6cd5\u3082\u3042\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3057\u304b\u3057\u3001\u9ad8\u6b21\u591a\u9805\u5f0f\u306f\u30c7\u30fc\u30bf\u306e\u4e21\u7aef\uff08\u6700\u5c0f\u5024\u30fb\u6700\u5927\u5024\u4ed8\u8fd1\uff09\u3067\u66f2\u7dda\u304c\u6025\u6fc0\u306b\u5927\u304d\u304f\u98db\u3073\u8df3\u306d\u308b\u73fe\u8c61\uff08\u30eb\u30f3\u30b2\u73fe\u8c61\uff09\u3092\u8d77\u3053\u3057\u3084\u3059\u3044\u3002\u305d\u306e\u7d50\u679c\u3001\u30c7\u30fc\u30bf\u304c\u5b58\u5728\u3057\u306a\u3044\u6975\u7aef\u306a\u5024\u3067\u306e\u30ea\u30b9\u30af\u4e88\u6e2c\u304c\u8457\u3057\u304f\u4e0d\u5b89\u5b9a\u306b\u306a\u308a\u3001\u81e8\u5e8a\u7684\u306a\u89e3\u91c8\u306b\u8010\u3048\u3089\u308c\u306a\u304f\u306a\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. \u306a\u305c Restricted Cubic Splines (RCS) \u304c\u73fe\u4ee3\u533b\u5b66\u7d71\u8a08\u306e\u30c7\u30d5\u30a1\u30af\u30c8\u30b9\u30bf\u30f3\u30c0\u30fc\u30c9\u306a\u306e\u304b\uff1f<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ab\u30c6\u30b4\u30ea\u30fc\u5316\u3084\u9ad8\u6b21\u591a\u9805\u5f0f\u306e\u7f60\u3092\u5168\u3066\u56de\u907f\u3057\u3001\u9023\u7d9a\u5909\u6570\u306e\u771f\u306e\u30ea\u30b9\u30af\u69cb\u9020\u3092\u5ba2\u89b3\u7684\u306b\u63cf\u304d\u51fa\u3059\u624b\u6cd5\u304c <strong>Restricted Cubic Splines (RCS \/ \u5236\u9650\u4ed8\u304d3\u6b21\u30b9\u30d7\u30e9\u30a4\u30f3)<\/strong> \u3067\u3042\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>&#91;\u591a\u9805\u5f0f (Polynomial)]        &#91;\u901a\u5e38\u306e Spline]           &#91;RCS (\u5236\u9650\u4ed8\u304d3\u6b21\u30b9\u30d7\u30e9\u30a4\u30f3)]\n \u7aef\u3067\u6025\u6fc0\u306b\u98db\u3073\u8df3\u306d\u308b        \u533a\u9593\u3054\u3068\u306b\u6ed1\u3089\u304b\u306b\u63a5\u7d9a      \u7aef\uff08\u4e21\u7aef\u306eKnots\u306e\u5916\u5074\uff09\u3092\n  \uff3c          \uff0f               \u301c\u301c\u301c\u301c              \u300c\u76f4\u7dda\uff08\u7dda\u5f62\uff09\u300d\u306b\u5236\u9650\uff01\n    \uff3c______\uff0f                                          \u2192 \u5b89\u5b9a\u3057\u305f\u30ab\u30fc\u30d6\u3092\u63cf\u753b\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">RCS\u306e\u512a\u308c\u305f\u4ed5\u7d44\u307f<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30d7\u30e9\u30a4\u30f3\uff08Spline\uff09\u3068\u306f\u3001\u30c7\u30fc\u30bf\u306e\u7bc4\u56f2\u3092\u8907\u6570\u306e\u533a\u9593\u306b\u5206\u3051\u3001\u5404\u533a\u9593\u30923\u6b21\u95a2\u6570\uff08Cubic\uff09\u3067\u6ed1\u3089\u304b\u306b\u7e4b\u304e\u5408\u308f\u305b\u308b\u6280\u6cd5\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">RCS\u306e\u6700\u5927\u306e\u7279\u5fb4\u306f <strong>\u300cRestricted\uff08\u5236\u9650\u4ed8\u304d\uff09\u300d<\/strong> \u3068\u3044\u3046\u5236\u7d04\u306b\u3042\u308b\u3002\u30c7\u30fc\u30bf\u306e\u4e21\u7aef\uff08\u6700\u3082\u5916\u5074\u306e\u7d50\u7bc0 \/ Knots\u306e\u5916\u5074\uff09\u306b\u304a\u3044\u3066\u3001\u95a2\u6570\u3092\u300c3\u6b21\u5f0f\u300d\u3067\u306f\u306a\u304f\u300c1\u6b21\u5f0f\uff08\u76f4\u7dda\uff09\u300d\u306b\u5f37\u5236\u5236\u9650\u3059\u308b\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u30c7\u30fc\u30bf\u306e\u7aef\u3067\u66f2\u7dda\u304c\u7570\u5e38\u306b\u8df3\u306d\u4e0a\u304c\u308b\u591a\u9805\u5f0f\u306e\u5f31\u70b9\u3092\u5b8c\u5168\u306b\u514b\u670d\u3057\u3001\u5b89\u5b9a\u3057\u305f\u30ea\u30b9\u30af\u30ab\u30fc\u30d6\u3092\u63cf\u753b\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Knots\uff08\u7d50\u7bc0\uff09\u306e\u6c7a\u5b9a\u6307\u91dd<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b9\u30d7\u30e9\u30a4\u30f3\u66f2\u7dda\u3092\u7e4b\u304e\u6b62\u3081\u308b\u30dd\u30a4\u30f3\u30c8\u3092 <strong>Knots\uff08\u7d50\u7bc0\uff09<\/strong> \u3068\u547c\u3076\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u7d50\u7bc0\u306e\u6570\u306f <strong>3\u301c5\u500b<\/strong> \u304c\u63a8\u5968\u3055\u308c\u3066\u304a\u308a\u3001<strong>4\u500b<\/strong> \u304c\u30e2\u30c7\u30eb\u306e\u9069\u5408\u5ea6\u3068\u8907\u96d1\u3055\u306e\u30d0\u30e9\u30f3\u30b9\u306b\u304a\u3044\u3066\u30d9\u30b9\u30c8\u3068\u3055\u308c\u308b\u3053\u3068\u304c\u591a\u304f\u3001\u6a19\u6e96\u7684\u306a\u7b2c\u4e00\u9078\u629e\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u91cd\u8981\u3067\u3042\u308b\u306e\u306f\u3001\u7d50\u7bc0\u306e\u4f4d\u7f6e\u306f\u7814\u7a76\u8005\u304c\u624b\u52d5\u3067\u9078\u3076\u306e\u3067\u306f\u306a\u304f\u3001<strong>\u30c7\u30fc\u30bf\u306e\u30d1\u30fc\u30bb\u30f3\u30bf\u30a4\u30eb\uff08\u5206\u4f4d\u70b9\uff1a\u4f8b 5%, 35%, 65%, 95%\uff09\u306b\u57fa\u3065\u3044\u3066\u81ea\u52d5\u914d\u7f6e\u3059\u308b<\/strong>\u70b9\u3067\u3042\u308b\u3002\u3053\u308c\u306b\u3088\u308a\u3001\u7814\u7a76\u8005\u306e\u4e3b\u89b3\u3084 P-hacking \u306e\u4ecb\u5165\u3092\u5b8c\u5168\u306b\u6392\u9664\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u57fa\u6e96\u70b9\uff08Reference value\uff09\u306b\u57fa\u3065\u304f\u76f4\u611f\u7684\u89e3\u91c8<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">RCS\u3092\u7528\u3044\u308b\u3053\u3068\u3067\u3001\u300c\u7279\u5b9a\u306e\u57fa\u6e96\u70b9\uff08\u4f8b: BMI = 22.0 $\\text{kg\/m}^2$\uff09\u306b\u304a\u3051\u308b\u30cf\u30b6\u30fc\u30c9\u6bd4\u3092 $\\text{HR} = 1.0$ \u3068\u8a2d\u5b9a\u3057\u305f\u3068\u304d\u3001BMI\u306e\u5909\u5316\u306b\u4f34\u3046\u9023\u7d9a\u7684\u306a\u30cf\u30b6\u30fc\u30c9\u6bd4\u306e\u63a8\u79fb\uff0895%\u4fe1\u983c\u533a\u9593\u4ed8\u304d\uff09\u300d\u30921\u3064\u306e\u9023\u7d9a\u30ab\u30fc\u30d6\u3068\u3057\u3066\u63d0\u793a\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u308c\u306b\u3088\u308a\u3001\u300cBMI 22 \u4ed8\u8fd1\u3067\u6700\u3082\u6b7b\u4ea1\u30ea\u30b9\u30af\u304c\u4f4e\u304f\u300120 \u672a\u6e80\u304a\u3088\u3073 28 \u4ee5\u4e0a\u3067\u7d71\u8a08\u5b66\u7684\u306b\u6709\u610f\u306b\u30ea\u30b9\u30af\u304c\u4e0a\u6607\u3059\u308b\u300d\u3068\u3044\u3063\u305f\u81e8\u5e8a\u7684\u306b\u304d\u308f\u3081\u3066\u660e\u5feb\u306a\u89e3\u91c8\u304c\u53ef\u80fd\u3068\u306a\u308b\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>\u203b\u88dc\u8db3\uff08\u95a2\u9023\u8a18\u4e8b\uff09<\/strong>:<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u30ed\u30b8\u30b9\u30c6\u30a3\u30c3\u30af\u56de\u5e30\uff08\u4e8c\u5024\u30a2\u30a6\u30c8\u30ab\u30e0\uff09\u306b\u304a\u3051\u308bRCS\u66f2\u7dda\u306e\u5177\u4f53\u7684\u306a\u63cf\u304d\u65b9\u306b\u3064\u3044\u3066\u306f <a href=\"https:\/\/best-biostatistics.com\/toukei-er\/entry\/r-for-restricted-cubic-spline-curve-with-binary-outcome\/\">\u30ed\u30b8\u30b9\u30c6\u30a3\u30c3\u30af\u56de\u5e30\u306b\u304a\u3051\u308bRCS\u66f2\u7dda\u63cf\u753b<\/a> \u3092\u53c2\u7167\u3055\u308c\u305f\u3044\u3002<\/p>\n<\/blockquote>\n\n\n\n<div id=\"biost-3642849084\" 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\">3. \u67fb\u8aad\u8005\u3092\u9ed9\u3089\u305b\u308b\u300c\u975e\u7dda\u5f62\u6027\u306e\u691c\u5b9a\uff08P for non-linearity\uff09\u300d\u306e\u8aad\u307f\u65b9<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8ad6\u6587\u306bRCS\u306e\u7dba\u9e97\u306a\u30b0\u30e9\u30d5\u3092\u8f09\u305b\u308b\u3060\u3051\u3067\u306f\u3001\u7d71\u8a08\u67fb\u8aad\u8005\u3092\u5b8c\u5168\u306b\u7d0d\u5f97\u3055\u305b\u308b\u3053\u3068\u306f\u3067\u304d\u306a\u3044\u3002\u91cd\u8981\u306a\u306e\u306f\u3001<strong>\u300c\u3053\u306e\u66f2\u7dda\u95a2\u4fc2\u306f\u3001\u7d71\u8a08\u5b66\u7684\u306b\u610f\u5473\u306e\u3042\u308b\u975e\u7dda\u5f62\u6027\u3068\u8a00\u3048\u308b\u306e\u304b\uff1f\u300d\u3092\u691c\u5b9a\u3067\u8a3c\u660e\u3059\u308b\u3053\u3068<\/strong>\u3067\u3042\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">\u5168\u4f53\u52b9\u679c\uff08All effects\uff09 vs \u975e\u7dda\u5f62\u52b9\u679c\uff08Non-linear effect\uff09\u306e\u5206\u96e2<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">R\u306e <code>rms<\/code> \u30d1\u30c3\u30b1\u30fc\u30b8\u3067 <code>anova()<\/code> \u3092\u5b9f\u884c\u3059\u308b\u3068\u3001RCS\u30e2\u30c7\u30eb\u306b\u542b\u307e\u308c\u308b\u5404\u5909\u6570\u306e\u52b9\u679c\u3092\u4ee5\u4e0b\u306e2\u3064\u306b\u5206\u96e2\u3057\u3066 $P$ \u5024\u3092\u7b97\u51fa\u3057\u3066\u304f\u308c\u308b\uff1a<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>Overall\uff08\u5168\u4f53\u3068\u3057\u3066\u306e\u95a2\u4fc2\u6027\uff09<\/strong>: \u5909\u6570\u304c\u30a2\u30a6\u30c8\u30ab\u30e0\u306b\u4f55\u3089\u304b\u306e\u5f71\u97ff\u3092\u4e0e\u3048\u3066\u3044\u308b\u304b\uff08\u76f4\u7dda\u304b\u66f2\u7dda\u304b\u3092\u554f\u308f\u306a\u3044\u5168\u4f53\u52b9\u679c\u306e\u691c\u5b9a\uff09\u3002<\/li>\n\n\n\n<li><strong>Non-linear\uff08\u975e\u7dda\u5f62\u52b9\u679c\uff09<\/strong>: \u76f4\u7dda\u30e2\u30c7\u30eb\uff081\u6b21\u5f0f\uff09\u304b\u3089\u306e\u305a\u308c\uff08\u6b6a\u307f\uff09\u304c\u7d71\u8a08\u7684\u306b\u6709\u610f\u304b\u3069\u3046\u304b\u306e\u691c\u5b9a\uff08$P$<strong> for non-linearity<\/strong>\uff09\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u8ad6\u6587\u3067\u306e\u4e3b\u5f35\u30b7\u30ca\u30ea\u30aa<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>$P$<strong> for non-linearity <\/strong>$&lt; 0.05$<strong> \u306e\u5834\u5408<\/strong>:\u300c\u9023\u7d9a\u5909\u6570\u3068\u30a2\u30a6\u30c8\u30ab\u30e0\u306e\u9593\u306b\u306f\u660e\u78ba\u306a\u975e\u7dda\u5f62\u95a2\u4fc2\uff08U\u5b57\u578b\u3084\u95be\u5024\u52b9\u679c\u306a\u3069\uff09\u304c\u5b58\u5728\u3059\u308b\u300d\u3068\u81ea\u4fe1\u3092\u6301\u3063\u3066\u5ba3\u8a00\u3059\u308b\u3002\u5358\u4e00\u306e\u30cf\u30b6\u30fc\u30c9\u6bd4\uff08\u4f8b: $\\text{HR} = 1.02$\uff09\u3092\u8a18\u8f09\u3059\u308b\u3053\u3068\u306f\u4e0d\u9069\u5207\u3067\u3042\u308a\u3001<strong>RCS\u306b\u3088\u308b\u9023\u7d9aHR\u66f2\u7dda\uff08\u56f3\uff09\u3092\u63d0\u793a\u3059\u308b\u3053\u3068\u304c\u4e3b\u305f\u308b\u89e3\u6790\u7d50\u679c<\/strong>\u3068\u306a\u308b\u3002<\/li>\n\n\n\n<li>$P$<strong> for non-linearity <\/strong>$\\ge 0.05$<strong> \u306e\u5834\u5408<\/strong>:\u300c\u975e\u7dda\u5f62\u6027\u306f\u7d71\u8a08\u5b66\u7684\u306b\u6709\u610f\u3067\u306f\u306a\u304b\u3063\u305f\uff08\u76f4\u7dda\u95a2\u4fc2\u3067\u8fd1\u4f3c\u53ef\u80fd\uff09\u300d\u3068\u5224\u65ad\u3057\u3001\u901a\u5e38\u306e\u76f4\u7dda\u30e2\u30c7\u30eb\uff081\u5358\u4f4d\u3042\u305f\u308a\u306e\u5358\u4e00HR\uff09\u3092\u63a1\u7528\u3059\u308b\u6839\u62e0\u3068\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\">4. \u3010\u5b9f\u8df5R\u30b3\u30fc\u30c9\u3011<code>rms<\/code> \u30d1\u30c3\u30b1\u30fc\u30b8\u306b\u3088\u308b Cox\u56de\u5e30 \uff0b RCS \u30e2\u30c7\u30eb\u69cb\u7bc9\u3068\u9023\u7d9aHR\u66f2\u7dda\u306e\u53ef\u8996\u5316\uff08Step by Step\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u304b\u3089\u306f\u3001\u533b\u5b66\u7d71\u8a08\u306b\u304a\u3051\u308b\u4e16\u754c\u6a19\u6e96\u3067\u3042\u308b Frank Harrell \u6559\u6388\u306e <strong><code>rms<\/code> \u30d1\u30c3\u30b1\u30fc\u30b8<\/strong> \u3092\u7528\u3044\u3066\u3001Cox\u56de\u5e30\u3067\u306eRCS\u30e2\u30c7\u30eb\u69cb\u7bc9\u304b\u3089\u975e\u7dda\u5f62\u6027\u691c\u5b9a\u3001\u7f8e\u9e97\u306a\u9023\u7d9aHR\u66f2\u7dda\u306e\u63cf\u753b\u307e\u3067\u3092 Step by Step \u3067\u89e3\u8aac\u3059\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Step 1: \u7591\u4f3c\u81e8\u5e8a\u30c7\u30fc\u30bf\u306e\u4f5c\u6210<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u60a3\u8005500\u4eba\u5206\u3001\u8ffd\u8de1\u6642\u9593\uff08<code>time<\/code>\uff09\u3001\u6b7b\u4ea1\u30a4\u30d9\u30f3\u30c8\uff08<code>status<\/code>\uff09\u3001BMI\u3001\u5e74\u9f62\u3001\u6027\u5225\u306e\u30c7\u30fc\u30bf\u3092\u751f\u6210\u3059\u308b\u3002BMI 22.0 \u8fd1\u8fba\u3067\u6700\u3082\u6b7b\u4ea1\u30ea\u30b9\u30af\u304c\u4f4e\u304f\u3001\u4f4e\u4f53\u91cd\u304a\u3088\u3073\u80a5\u6e80\u3067\u30ea\u30b9\u30af\u304c\u4e0a\u6607\u3059\u308bU\u5b57\u578b\u751f\u5b58\u30c7\u30fc\u30bf\u3092\u610f\u56f3\u7684\u306b\u8a2d\u8a08\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>library(rms)\nlibrary(tidyverse)\n\n# \u4e71\u6570\u30b7\u30fc\u30c9\u306e\u8a2d\u5b9a\nset.seed(123)\nn &lt;- 500\n\n# \u7591\u4f3c\u30c7\u30fc\u30bf\u306e\u751f\u6210\nbmi &lt;- runif(n, min = 18, max = 35)\nage &lt;- round(rnorm(n, mean = 65, sd = 10))\ngender &lt;- factor(sample(c(\"Male\", \"Female\"), n, replace = TRUE))\n\n# U\u5b57\u578b\u306e\u30ea\u30b9\u30af\uff08BMI=22\u3067\u6700\u5c0f\u30cf\u30b6\u30fc\u30c9\uff09\u3092\u8868\u73fe\u3059\u308b\u5bfe\u6570\u30cf\u30b6\u30fc\u30c9\u306e\u751f\u6210\nlog_hazard &lt;- 0.02 * (bmi - 22)^2 + 0.03 * (age - 65) + 0.3 * (gender == \"Male\") - 1.5\nlambda &lt;- exp(log_hazard)\n\n# \u6307\u6570\u5206\u5e03\u306b\u57fa\u3065\u304f\u751f\u5b58\u6642\u9593\u3068\u6253\u5207\u308a\u306e\u751f\u6210\ntime &lt;- rexp(n, rate = lambda * 0.05)\nstatus &lt;- if_else(time &gt; 36, 0, 1)\ntime &lt;- pmin(time, 36)\n\ndf_rcs &lt;- tibble(\n  id = 1:n,\n  time = round(time, 1),\n  status = status,\n  bmi = round(bmi, 1),\n  age = age,\n  gender = gender\n)\n\n# \u30c7\u30fc\u30bf\u306e\u78ba\u8a8d\nhead(df_rcs)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 2: <code>rms::datadist<\/code> \u306b\u3088\u308b\u30c7\u30fc\u30bf\u5206\u5e03\u60c5\u5831\u306e\u8a2d\u5b9a\u3068\u57fa\u6e96\u5024\u6307\u5b9a<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>rms<\/code> \u30d1\u30c3\u30b1\u30fc\u30b8\u3092\u4f7f\u7528\u3059\u308b\u969b\u306f\u3001\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3059\u308b\u524d\u306b <strong><code>datadist()<\/code><\/strong> \u3092\u7528\u3044\u3066\u30c7\u30fc\u30bf\u306e\u5206\u5e03\u60c5\u5831\uff08\u5206\u4f4d\u70b9\u3084\u4e2d\u592e\u5024\uff09\u3092\u4fdd\u6301\u3055\u305b\u308b\u5fc5\u8981\u304c\u3042\u308b\u3002<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">\u3053\u3053\u3067\u3001\u30cf\u30b6\u30fc\u30c9\u6bd4 $\\text{HR} = 1.0$ \u306e\u57fa\u6e96\u70b9\uff08Reference value\uff09\u3068\u306a\u308bBMI\u5024\u3092\u660e\u78ba\u306b\u6307\u5b9a\u3059\u308b\uff08\u4eca\u56de\u306f\u81e8\u5e8a\u7684\u6a19\u6e96\u5024\u3067\u3042\u308b <code>BMI = 22.0<\/code> \u306b\u30bb\u30c3\u30c8\u3059\u308b\uff09\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u30c7\u30fc\u30bf\u5206\u5e03\u60c5\u5831\u306e\u4fdd\u6301\ndd &lt;- datadist(df_rcs)\n\n# BMI\u306e\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u5024\uff08HR=1.0\u306e\u57fa\u6e96\u70b9\uff09\u3092 22.0 \u306b\u56fa\u5b9a\u6307\u5b9a\ndd$limits$bmi&#91;2] &lt;- 22.0\n\n# \u30aa\u30d7\u30b7\u30e7\u30f3\u306b\u767b\u9332\noptions(datadist = \"dd\")\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 3: <code>rms::cph<\/code> + <code>rcs()<\/code> \u306b\u3088\u308bCox\u6bd4\u4f8b\u30cf\u30b6\u30fc\u30c9\u30e2\u30c7\u30eb\u69cb\u7bc9<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>rms::cph()<\/code> \u95a2\u6570\uff08Cox Proportional Hazards\uff09\u3092\u7528\u3044\u3001\u8aac\u660e\u5909\u6570 <code>bmi<\/code> \u3092 <code>rcs(bmi, 4)<\/code> \u3068\u6307\u5b9a\u3057\u30664\u3064\u306eKnots\u3092\u6301\u3064RCS\u30e2\u30c7\u30eb\u3092\u9069\u7528\u3059\u308b\u3002\u5e74\u9f62\u3068\u6027\u5225\u3082\u5171\u5909\u91cf\u3068\u3057\u3066\u8abf\u6574\u3059\u308b\u3002<\/p>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\"><strong>\u203b\u6ce8\u610f<\/strong>: \u5f8c\u3067 <code>Predict()<\/code> \u3084 <code>anova()<\/code> \u3092\u6b63\u3057\u304f\u52d5\u304b\u3059\u305f\u3081\u3001<code>x = TRUE, y = TRUE<\/code> \u30aa\u30d7\u30b7\u30e7\u30f3\u3092\u5fc5\u305a\u4ed8\u4e0e\u3059\u308b\u3053\u3068\u3002<\/p>\n<\/blockquote>\n\n\n\n<pre class=\"wp-block-code\"><code># RCS\u3092\u7d44\u307f\u8fbc\u3093\u3060Cox\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u69cb\u7bc9\nfit_cox_rcs &lt;- cph(\n  Surv(time, status) ~ rcs(bmi, 4) + age + gender,\n  data = df_rcs,\n  x = TRUE,\n  y = TRUE\n)\n\n# \u30e2\u30c7\u30eb\u6982\u8981\u306e\u51fa\u529b\nprint(fit_cox_rcs)\n<\/code><\/pre>\n\n\n\n<h3 class=\"wp-block-heading\">Step 4: <code>rms::anova<\/code> \u306b\u3088\u308b\u975e\u7dda\u5f62\u6027\u691c\u5b9a\uff08$P$ for non-linearity\uff09\u306e\u62bd\u51fa<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u30e2\u30c7\u30eb\u306b\u304a\u3051\u308b\u975e\u7dda\u5f62\u6027\u306e\u6709\u610f\u6027\u3092\u691c\u8a3c\u3059\u308b\u305f\u3081\u3001<code>anova()<\/code> \u95a2\u6570\u3092\u5b9f\u884c\u3059\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># \u975e\u7dda\u5f62\u6027\u306e\u691c\u5b9a\uff08Test for Non-linearity\uff09\nanova_res &lt;- anova(fit_cox_rcs)\nprint(anova_res)\n<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>> print(anova_res)\n                Wald Statistics          Response: Surv(time, status) \n\n Factor     Chi-Square d.f. P     \n bmi        273.40     3    &lt;.0001\n  Nonlinear  41.43     2    &lt;.0001\n age         65.81     1    &lt;.0001\n gender       8.74     1    0.0031\n TOTAL      308.91     5    &lt;.0001\n<\/code><\/pre>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong><code>bmi<\/code> (Factor\u5168\u4f53)<\/strong>: $\\text{Chi-Square} = 273.40, P &lt; 0.001$ $\\rightarrow$ BMI\u5168\u4f53\u3068\u3057\u3066\u6b7b\u4ea1\u30ea\u30b9\u30af\u306b\u5f37\u304f\u95a2\u9023\u3057\u3066\u3044\u308b\u3002<\/li>\n\n\n\n<li><strong><code>Nonlinear<\/code> (\u975e\u7dda\u5f62\u52b9\u679c)<\/strong>: $\\text{Chi-Square} = 41.43, P &lt; 0.001$ $\\rightarrow$ $P$<strong> for non-linearity <\/strong>$&lt; 0.001$ \u3067\u3042\u308a\u3001\u660e\u78ba\u306a\u975e\u7dda\u5f62\u95a2\u4fc2\uff08U\u5b57\u578b\uff09\u304c\u5b58\u5728\u3059\u308b\u3053\u3068\u304c\u7d71\u8a08\u7684\u306b\u8a3c\u660e\u3055\u308c\u305f\u3002<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Step 5: <code>Predict()<\/code> \uff0b <code>ggplot2<\/code> \u306b\u3088\u308b\u9023\u7d9aHR\u66f2\u7dda\uff0895% CI\u5e2f\u4ed8\u304d\uff09\u306e\u63cf\u753b<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\"><code>rms::Predict()<\/code> \u95a2\u6570\u3092\u7528\u3044\u3066\u3001BMI\u306e\u5909\u5316\u306b\u4f34\u3046\u9023\u7d9a\u30cf\u30b6\u30fc\u30c9\u6bd4\u3068\u305d\u306e95%\u4fe1\u983c\u533a\u9593\u3092\u8a08\u7b97\u3059\u308b\u3002<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><code>ref.zero = TRUE<\/code>: \u8a2d\u5b9a\u3057\u305f\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u5024\uff08BMI = 22.0\uff09\u3067\u306e\u5bfe\u6570\u30cf\u30b6\u30fc\u30c9\u3092 0 \u3068\u3059\u308b\u3002<\/li>\n\n\n\n<li><code>fun = exp<\/code>: \u5bfe\u6570\u30cf\u30b6\u30fc\u30c9\uff08Log-hazard\uff09\u3092\u6307\u6570\u5909\u63db\u3057\u3066\u30cf\u30b6\u30fc\u30c9\u6bd4\uff08Hazard Ratio\uff09\u306b\u5909\u63db\u3059\u308b\u3002<\/li>\n<\/ul>\n\n\n\n<pre class=\"wp-block-code\"><code># \u9023\u7d9aHR\u306e\u4e88\u6e2c\u5024\u3092\u8a08\u7b97\npred_hr &lt;- Predict(fit_cox_rcs, bmi, ref.zero = TRUE, fun = exp)\n\n# Predict\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092ggplot2\u3067\u7f8e\u9e97\u306b\u63cf\u753b\nggplot(pred_hr) +\n  geom_hline(yintercept = 1.0, linetype = \"dashed\", color = \"gray50\", size = 0.8) +\n  geom_vline(xintercept = 22.0, linetype = \"dotted\", color = \"red\", size = 0.8) +\n  theme_minimal(base_size = 14) +\n  labs(\n    x = expression(paste(\"Body Mass Index (kg\/m\"^2, \")\")),\n    y = \"Hazard Ratio for All-Cause Mortality (95% CI)\",\n    title = \"Continuous Association between BMI and Mortality Risk\",\n    subtitle = \"Restricted Cubic Spline Cox Regression (Reference: BMI = 22.0 kg\/m\u00b2)\"\n  ) +\n  theme(\n    plot.title = element_text(face = \"bold\"),\n    panel.grid.minor = element_blank()\n  )\n<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u63cf\u753b\u3055\u308c\u305f\u30b0\u30e9\u30d5\u306b\u3088\u308a\u3001\u300cBMI = 22.0 \u3092\u57fa\u6e96\u3068\u3057\u305f\u9023\u7d9a\u7684\u306a\u30cf\u30b6\u30fc\u30c9\u6bd4\u306e\u63a8\u79fb\u300d\u3068\u300c95%\u4fe1\u983c\u533a\u9593\u306e\u5e2f\u300d\u304c\u304d\u308c\u3044\u306b\u53ef\u8996\u5316\u3055\u308c\u3001\u4f4e\u4f53\u91cd\u304a\u3088\u3073\u80a5\u6e80\u306b\u304a\u3051\u308b\u30ea\u30b9\u30af\u4e0a\u6607\u304c\u4e00\u76ee\u3067\u7406\u89e3\u3067\u304d\u308b\u3088\u3046\u306b\u306a\u308b\u3002<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><img decoding=\"async\" width=\"800\" height=\"600\" src=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2026\/08\/image-12.png\" alt=\"\" class=\"wp-image-4749\" srcset=\"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2026\/08\/image-12.png 800w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2026\/08\/image-12-300x225.png 300w, https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2026\/08\/image-12-768x576.png 768w\" sizes=\"(max-width: 800px) 100vw, 800px\" \/><\/figure>\n\n\n\n<pre class=\"wp-block-code\"><code># Predict\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u5909\u63db\npred_df &lt;- as.data.frame(pred_hr)\n\n# 95%\u4fe1\u983c\u533a\u9593\u306e\u4e0b\u9650(lower)\u304c 1.0 \u3092\u8d85\u3048\u3066\u3044\u308b\uff08\uff1d\u7d71\u8a08\u5b66\u7684\u306b\u6709\u610f\u306bHR>1.0\u3067\u3042\u308b\uff09BMI\u9818\u57df\u3092\u62bd\u51fa\npred_df %>% \n  filter(lower > 1.0)<\/code><\/pre>\n\n\n\n<p class=\"wp-block-paragraph\">\u30b0\u30e9\u30d5\u3067\u306f\u3001BMI 25 \u3042\u305f\u308a\u304b\u3089\u300195% \u4fe1\u983c\u533a\u9593\u306e\u4e0b\u9650\u304c 1 \u3092\u8d85\u3048\u3066\u3044\u308b\u3088\u3046\u306b\u898b\u3048\u308b\u3002\u5b9f\u969b\u306b\u3044\u304f\u3064\u3092\u8d85\u3048\u308b\u3068 95% \u4fe1\u983c\u533a\u9593\u306e\u4e0b\u9650\u304c 1 \u3092\u8d85\u3048\u308b\u304b\u306f\u3001\u4e0a\u8a18\u306e\u3088\u3046\u306b\u30ea\u30b9\u30c8\u3092\u51fa\u529b\u3057\u3066\u78ba\u8a8d\u3059\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">5. \u8ad6\u6587\u3067\u305d\u306e\u307e\u307e\u4f7f\u3048\u308b\u82f1\u6587\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\uff08Methods &amp; Results\uff09<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\">\u8ad6\u6587\u306e Methods \u304a\u3088\u3073 Results \u30bb\u30af\u30b7\u30e7\u30f3\u306b\u305d\u306e\u307e\u307e\u8a18\u8ff0\u3067\u304d\u308b\u6a19\u6e96\u7684\u306a\u82f1\u6587\u8868\u73fe\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8\u3092\u63d0\u793a\u3059\u308b\u3002<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Methods \u30bb\u30af\u30b7\u30e7\u30f3\u82f1\u6587\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">&#8220;To evaluate potential non-linear associations between continuous variables (e.g., body mass index [BMI]) and all-cause mortality, restricted cubic splines (RCS) with 4 knots located at the 5th, 35th, 65th, and 95th percentiles were incorporated into Cox proportional hazards models using the <code>rms<\/code> package in R.<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">The reference value for calculating hazard ratios (HRs) was specified at BMI = 22.0 kg\/m\u00b2. Non-linearity was formally evaluated using the Wald test ($P$for non-linearity). All models were adjusted for age and gender.&#8221;<\/p>\n<\/blockquote>\n\n\n\n<h3 class=\"wp-block-heading\">Results \u30bb\u30af\u30b7\u30e7\u30f3\u82f1\u6587\u30c6\u30f3\u30d7\u30ec\u30fc\u30c8<\/h3>\n\n\n\n<blockquote class=\"wp-block-quote is-layout-flow wp-block-quote-is-layout-flow\">\n<p class=\"wp-block-paragraph\">&#8220;Multivariable Cox regression with restricted cubic splines revealed a significant non-linear, U-shaped association between BMI and all-cause mortality ($P$for overall association$&lt; 0.001$,$P$for non-linearity$&lt; 0.001$).<\/p>\n\n\n\n<p class=\"wp-block-paragraph\">Using BMI = 22.0 kg\/m\u00b2 as the reference point ($\\text{HR} = 1.0$), higher BMI levels ($> 24.6 \\text{ kg\/m}^2$) were significantly associated with an increased risk of all-cause mortality.&#8221;<\/p>\n<\/blockquote>\n\n\n\n<h2 class=\"wp-block-heading\">6. \u307e\u3068\u3081\uff06\u4e00\u62ec\u30b3\u30d4\u30da\u7528R\u30b9\u30af\u30ea\u30d7\u30c8<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\">\u672c\u8a18\u4e8b\u306e\u30dd\u30a4\u30f3\u30c8\u304a\u3055\u3089\u3044<\/h3>\n\n\n\n<ol class=\"wp-block-list\">\n<li><strong>\u9023\u7d9a\u5909\u6570\u306e\u30ab\u30c6\u30b4\u30ea\u30fc\u5316\u306f\u60aa\u624b<\/strong>: \u60c5\u5831\u640d\u5931\u3001\u4e0d\u81ea\u7136\u306a\u5883\u754c\u30ea\u30b9\u30af\u3001\u67fb\u8aad\u8005\u304b\u3089\u306e P-hacking \u7591\u3044\u3092\u3082\u305f\u3089\u3059\u3002<\/li>\n\n\n\n<li><strong>RCS\u306f\u975e\u7dda\u5f62\u89e3\u6790\u306e\u6b63\u653b\u6cd5<\/strong>: \u533a\u9593\u30923\u6b21\u5f0f\u3067\u6ed1\u3089\u304b\u306b\u7e4b\u304e\u3001\u30c7\u30fc\u30bf\u306e\u4e21\u7aef\uff08\u30a8\u30c3\u30b8\uff09\u3092\u76f4\u7dda\u306b\u5236\u9650\u3059\u308b\u3053\u3068\u3067\u5b89\u5b9a\u3057\u305f\u30ea\u30b9\u30af\u30ab\u30fc\u30d6\u3092\u63cf\u753b\u3067\u304d\u308b\u3002<\/li>\n\n\n\n<li><strong>\u7d50\u7bc0\uff08Knots\uff09\u306f4\u500b\u304c\u57fa\u672c<\/strong>: \u30d1\u30fc\u30bb\u30f3\u30bf\u30a4\u30eb\u81ea\u52d5\u914d\u7f6e\u306b\u3088\u308a\u3001\u7814\u7a76\u8005\u306e\u4e3b\u89b3\u3092\u6392\u9664\u3057\u3066\u5ba2\u89b3\u7684\u306a\u30e2\u30c7\u30eb\u3092\u69cb\u7bc9\u3059\u308b\u3002<\/li>\n\n\n\n<li>$P$<strong> for non-linearity \u306e\u63d0\u793a\u304c\u5fc5\u9808<\/strong>: <code>rms::anova()<\/code> \u3067\u975e\u7dda\u5f62\u6027\u306e $P$ \u5024\u3092\u7b97\u51fa\u30fb\u63d0\u793a\u3057\u3001\u30b0\u30e9\u30d5\uff08\u9023\u7d9aHR\u30ab\u30fc\u30d6\uff09\u3068\u3068\u3082\u306b\u8aac\u5f97\u529b\u3092\u6301\u3063\u3066\u4e3b\u5f35\u3059\u308b\u3002<\/li>\n<\/ol>\n\n\n\n<h3 class=\"wp-block-heading\">\u4e00\u62ec\u5b9f\u884c\u7528R\u30b9\u30af\u30ea\u30d7\u30c8<\/h3>\n\n\n\n<p class=\"wp-block-paragraph\">\u4ee5\u4e0b\u306e\u30b3\u30fc\u30c9\u3092\u30b3\u30d4\u30fc\uff06\u30da\u30fc\u30b9\u30c8\u3059\u308b\u3053\u3068\u3067\u3001\u7591\u4f3c\u30c7\u30fc\u30bf\u4f5c\u6210\u304b\u3089 <code>datadist<\/code> \u8a2d\u5b9a\u3001<code>cph<\/code> + <code>rcs<\/code> \u30e2\u30c7\u30eb\u69cb\u7bc9\u3001<code>anova<\/code> \u975e\u7dda\u5f62\u6027\u691c\u5b9a\u3001<code>Predict<\/code> + <code>ggplot2<\/code> \u306b\u3088\u308b95% CI\u5e2f\u4ed8\u304d\u9023\u7d9aHR\u30ab\u30fc\u30d6\u51fa\u529b\u307e\u3067\u3092\u4e00\u6c17\u901a\u8cab\u3067\u8d70\u3089\u305b\u308b\u3053\u3068\u304c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># ==============================================================================\n# Restricted Cubic Splines (RCS) \u306b\u3088\u308b Cox\u56de\u5e30 \u9023\u7d9aHR\u30ab\u30fc\u30d6\u63cf\u753b\u30b9\u30af\u30ea\u30d7\u30c8\n# \u30d1\u30c3\u30b1\u30fc\u30b8: rms, tidyverse\n# ==============================================================================\n\nif (!requireNamespace(\"rms\", quietly = TRUE)) install.packages(\"rms\")\nif (!requireNamespace(\"tidyverse\", quietly = TRUE)) install.packages(\"tidyverse\")\n\nlibrary(rms)\nlibrary(tidyverse)\n\n# 1. \u7591\u4f3c\u81e8\u5e8a\u30c7\u30fc\u30bf\u306e\u4f5c\u6210\uff08U\u5b57\u578b\u30ea\u30b9\u30af\u30c7\u30fc\u30bf\uff09\nset.seed(123)\nn &lt;- 500\n\nbmi &lt;- runif(n, min = 18, max = 35)\nage &lt;- round(rnorm(n, mean = 65, sd = 10))\ngender &lt;- factor(sample(c(\"Male\", \"Female\"), n, replace = TRUE))\n\nlog_hazard &lt;- 0.02 * (bmi - 22)^2 + 0.03 * (age - 65) + 0.3 * (gender == \"Male\") - 1.5\nlambda &lt;- exp(log_hazard)\n\ntime &lt;- rexp(n, rate = lambda * 0.05)\nstatus &lt;- if_else(time > 36, 0, 1)\ntime &lt;- pmin(time, 36)\n\ndf_rcs &lt;- tibble(\n  id = 1:n,\n  time = round(time, 1),\n  status = status,\n  bmi = round(bmi, 1),\n  age = age,\n  gender = gender\n)\n\n# 2. \u30c7\u30fc\u30bf\u5206\u5e03\u60c5\u5831\u306e\u8a2d\u5b9a\u3068\u30ea\u30d5\u30a1\u30ec\u30f3\u30b9\u5024\u306e\u56fa\u5b9a\uff08BMI = 22.0\uff09\ndd &lt;- datadist(df_rcs)\ndd$limits$bmi&#91;2] &lt;- 22.0\noptions(datadist = \"dd\")\n\n# 3. rms::cph + rcs \u306b\u3088\u308bCox\u30e2\u30c7\u30eb\u69cb\u7bc9\uff08Knots = 4\uff09\nfit_cox_rcs &lt;- cph(\n  Surv(time, status) ~ rcs(bmi, 4) + age + gender,\n  data = df_rcs,\n  x = TRUE,\n  y = TRUE\n)\n\n# 4. \u975e\u7dda\u5f62\u6027\u306e\u691c\u5b9a\uff08P for non-linearity\uff09\u306e\u62bd\u51fa\ncat(\"\\n--- \u975e\u7dda\u5f62\u6027\u306e\u691c\u5b9a\u7d50\u679c (rms::anova) ---\\n\")\nprint(anova(fit_cox_rcs))\n\n# 5. \u9023\u7d9aHR\u4e88\u6e2c\u5024\u306e\u7b97\u51fa\u3068\u63cf\u753b\npred_hr &lt;- Predict(fit_cox_rcs, bmi, ref.zero = TRUE, fun = exp)\n\np_rcs &lt;- ggplot(pred_hr) +\n  geom_hline(yintercept = 1.0, linetype = \"dashed\", color = \"gray50\", size = 0.8) +\n  geom_vline(xintercept = 22.0, linetype = \"dotted\", color = \"red\", size = 0.8) +\n  theme_minimal(base_size = 14) +\n  labs(\n    x = expression(paste(\"Body Mass Index (kg\/m\"^2, \")\")),\n    y = \"Hazard Ratio for All-Cause Mortality (95% CI)\",\n    title = \"Continuous Association between BMI and Mortality Risk\",\n    subtitle = \"Restricted Cubic Spline Cox Regression (Reference: BMI = 22.0 kg\/m\u00b2)\"\n  ) +\n  theme(\n    plot.title = element_text(face = \"bold\"),\n    panel.grid.minor = element_blank()\n  )\n\n# \u30b0\u30e9\u30d5\u306e\u8868\u793a\nprint(p_rcs)\n\n# \u7d71\u8a08\u5b66\u7684\u306b\u6709\u610f\u306bHR>1.0\u3067\u3042\u308bBMI\u9818\u57df\u3092\u62bd\u51fa\n# Predict\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u3092\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u5909\u63db\npred_df &lt;- as.data.frame(pred_hr)\n\n# 95%\u4fe1\u983c\u533a\u9593\u306e\u4e0b\u9650(lower)\u304c 1.0 \u3092\u8d85\u3048\u3066\u3044\u308b\uff08\uff1d\u7d71\u8a08\u5b66\u7684\u306b\u6709\u610f\u306bHR>1.0\u3067\u3042\u308b\uff09BMI\u9818\u57df\u3092\u62bd\u51fa\npred_df %>% \n  filter(lower > 1.0)<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">\u304a\u3059\u3059\u3081\u66f8\u7c4d<\/h2>\n\n\n\n<p class=\"wp-block-paragraph\"><a href=\"https:\/\/amzn.to\/4hBsY7P\">\u8ab0\u3082\u6559\u3048\u3066\u304f\u308c\u306a\u304b\u3063\u305f\u3000\u533b\u7642\u7d71\u8a08\u306e\u4f7f\u3044\u5206\u3051\u301c\u8ff7\u3044\u3084\u3059\u3044\u89e3\u6790\u624b\u6cd5\u306e\u9078\u3073\u65b9\u304c\uff0cR\u3067\u5b9f\u611f\u3057\u306a\u304c\u3089\u308f\u304b\u308b\uff01<\/a><\/p>\n\n\n\n<p class=\"wp-block-paragraph\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u300c\u5148\u751f\uff01BMI\u3068\u6b7b\u4ea1\u30ea\u30b9\u30af\u306e\u95a2\u4fc2\u3092\u898b\u305f\u304f\u3066\u591a\u5909\u91cfCox\u6bd4\u4f8b\u30cf\u30b6\u30fc\u30c9\u30e2\u30c7\u30eb\u3092\u7d44\u3093\u3060\u306e\u3067\u3059\u304c\u3001$P &gt; 0.05$ \u3067\u6709\u610f\u5dee\u304c\u51fa\u307e\u305b\u3093\u3067\u3057\u305f\u3002\u3067\u3082\u30c7\u30fc\u30bf\u3092\u30b0\u30e9\u30d5\u3067\u898b\u308b\u3068\u3001\u3069\u3046\u898b\u3066\u3082U\u5b57\u578b\uff08\u4f4e\u4f53\u91cd\u3067\u3082\u80a5\u6e80\u3067\u3082\u6b7b\u4ea1\u30ea\u30b9\u30af\u304c [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":4752,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_feature_clip_id":0,"_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},"jetpack_post_was_ever_published":false},"categories":[101],"tags":[],"class_list":["post-4748","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-101"],"jetpack_publicize_connections":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/best-biostatistics.com\/toukei-er\/wp-content\/uploads\/2026\/08\/Restricted-cubic-splines-for-Cox-HR-scaled.jpeg","_links":{"self":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4748","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=4748"}],"version-history":[{"count":2,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4748\/revisions"}],"predecessor-version":[{"id":4751,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/posts\/4748\/revisions\/4751"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media\/4752"}],"wp:attachment":[{"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/media?parent=4748"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/categories?post=4748"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/best-biostatistics.com\/toukei-er\/wp-json\/wp\/v2\/tags?post=4748"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}