{"id":161,"date":"2023-11-10T12:29:49","date_gmt":"2023-11-10T03:29:49","guid":{"rendered":"http:\/\/bunseki-data.com\/r-onlinecourse\/?p=161"},"modified":"2023-11-10T15:32:12","modified_gmt":"2023-11-10T06:32:12","slug":"odds%e3%81%a8proportion%e3%81%ae%e9%96%a2%e4%bf%82","status":"publish","type":"post","link":"https:\/\/bunseki-data.com\/r-onlinecourse\/2023\/11\/10\/odds%e3%81%a8proportion%e3%81%ae%e9%96%a2%e4%bf%82\/","title":{"rendered":"Odds\u3068Proportion\u306e\u95a2\u4fc2"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\" id=\"odds-prevalence_1\">\u30aa\u30c3\u30ba(Odds)\u3068\u6709\u75c5\u5272\u5408(Prevalence)<\/h2>\n\n\n\n<p>$$Odds\uff1d\\frac{\u75c5\u6c17\u306e\u4eba\u306e\u4eba\u6570}{\u75c5\u6c17\u3067\u306a\u3044\u4eba\u306e\u4eba\u6570}$$<\/p>\n\n\n\n<p>$$Prevalence = \\frac{\u75c5\u6c17\u306e\u4eba\u306e\u4eba\u6570}{\u96c6\u56e3\u306e\u4eba\u6570}$$<\/p>\n\n\n\n<p>Prevalence\u306f\u3001\u5168\u4f53\u306e\u6570\u304c\u5206\u6bcd\u306b\u304f\u308b\u305f\u3081\u4e00\u822c\u7684\u306b\u7406\u89e3\u3057\u3084\u3059\u3044\u3002\u304c\u3001Odds\u306f\u3001\u75c5\u6c17\u3067\u306a\u3044\u4eba\u304c\u5206\u6bcd\u306b\u304f\u308b\u305f\u3081\u3001\u3061\u3087\u3063\u3068\u7279\u6b8a\u3002<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"odds-prevalence_2\">Odds\u3068Prevalence\u306e\u95a2\u4fc2<\/h2>\n\n\n\n<p>\u6709\u75c5\u5272\u5408\u304c\u5341\u5206\u306b\u4f4e\u3051\u308c\u3070\u3001\u30aa\u30c3\u30ba\u3068\u6709\u75c5\u5272\u5408\u306f\u8fd1\u4f3c\u3067\u304d\u308b\u3002\u5b9f\u969b\u306b\u30b0\u30e9\u30d5\u3067\u898b\u3066\u307f\u308b\u3068\u30011\u4e07\u4eba\u306e\u96c6\u56e3\u3067\u3001\u60a3\u8005\u6570\u30921\u4eba\u304b\u3089\u5897\u3084\u3057\u884c\u304f\u5834\u5408\u306e\u3001Odds\u3068Prevalence\u306e\u95a2\u4fc2\u306f\u3001<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>dat &lt;- tibble(\n  dx = 1:8000,\n  tot = 10000\n) %&gt;% \n  mutate(nondx = tot - dx)\n\ngdat &lt;- dat %&gt;% \n  mutate(\n    odds = dx\/nondx,\n    prevalence = dx\/tot\n  ) %&gt;% \n  pivot_longer(cols = c(odds, prevalence))\n\ngg &lt;- ggplot(gdat) +\n  geom_line(aes(x = dx, y = value, color = name)) +\n  scale_color_discrete(name = NULL) +\n  labs(x = \"\u75c5\u6c17\u306e\u4eba\u306e\u6570\", y = \"\u5024\") +\n  ggthemes::theme_tufte()\n\ngg\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/bunseki-data.com\/r-onlinecourse\/wp-content\/uploads\/2023\/11\/unnamed-chunk-2-1-7.png\" alt=\"plot of chunk unnamed-chunk-2\"\/><\/figure>\n\n\n\n<p>\u3053\u3053\u3067\u3001Prevalence\u304c\u5341\u5206\u306b\u5c0f\u3055\u3051\u308c\u3070\u3001<\/p>\n\n\n\n<p>$$Prevalence \\approx Odds$$<\/p>\n\n\n\n<p>\u3068\u8fd1\u4f3c\u3067\u304d\u308b\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>gg + coord_cartesian(xlim = c(0,2000), ylim = c(0,1)) +\n  geom_vline(xintercept = 1000, linetype = \"dashed\")\n<\/code><\/pre>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"http:\/\/bunseki-data.com\/r-onlinecourse\/wp-content\/uploads\/2023\/11\/unnamed-chunk-3-1-1.png\" alt=\"plot of chunk unnamed-chunk-3\"\/><\/figure>\n\n\n\n<p>\u7279\u306b\u3001prevalence\u304c0.1\u307e\u3067\u306e\u7bc4\u56f2\u3067\u3042\u308c\u3070\u3001\u304b\u306a\u308a\u826f\u3044\u8fd1\u4f3c(\u30b0\u30e9\u30d5\u306e\u70b9\u7dda)<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u30aa\u30c3\u30ba(Odds)\u3068\u6709\u75c5\u5272\u5408(Prevalence) $$Odds\uff1d\\frac{\u75c5\u6c17\u306e\u4eba\u306e\u4eba\u6570}{\u75c5\u6c17\u3067\u306a\u3044\u4eba\u306e\u4eba\u6570}$$ $$Prevalence = \\frac{\u75c5\u6c17\u306e\u4eba\u306e\u4eba\u6570}{\u96c6\u56e3\u306e\u4eba\u6570}$$ Prevalence\u306f\u3001\u5168\u4f53\u306e\u6570\u304c\u5206\u6bcd\u306b\u304f\u308b\u305f\u3081\u4e00\u822c\u7684\u306b\u7406\u89e3\u3057\u3084\u3059\u3044\u3002\u304c\u3001Odds\u306f\u3001\u75c5\u6c17\u3067\u306a\u3044\u4eba\u304c\u5206\u6bcd\u306b\u304f\u308b\u305f\u3081\u3001\u3061\u3087\u3063\u3068\u7279\u6b8a\u3002 Odds\u3068Prevalence\u306e\u95a2\u4fc2 \u6709\u75c5\u5272\u5408\u304c\u5341\u5206\u306b\u4f4e\u3051\u308c\u3070\u3001\u30aa\u30c3\u30ba\u3068\u6709\u75c5\u5272\u5408\u306f\u8fd1\u4f3c\u3067\u304d\u308b\u3002\u5b9f\u969b\u306b\u30b0\u30e9\u30d5\u3067\u898b\u3066\u307f\u308b\u3068\u30011\u4e07\u4eba\u306e\u96c6\u56e3\u3067\u3001\u60a3\u8005\u6570\u30921\u4eba\u304b\u3089\u5897\u3084\u3057\u884c\u304f\u5834\u5408\u306e\u3001Odds\u3068Prevalence\u306e\u95a2\u4fc2\u306f\u3001 \u3053\u3053\u3067\u3001Prevalence\u304c\u5341\u5206\u306b\u5c0f\u3055\u3051\u308c\u3070\u3001 $$Prevalence \\approx Odds$$ \u3068\u8fd1\u4f3c\u3067\u304d\u308b\u3002 \u7279\u306b\u3001prevalence\u304c0.1\u307e\u3067\u306e\u7bc4\u56f2\u3067\u3042\u308c\u3070\u3001\u304b\u306a\u308a\u826f\u3044\u8fd1\u4f3c(\u30b0\u30e9\u30d5\u306e\u70b9\u7dda)<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"swell_btn_cv_data":"","footnotes":""},"categories":[8],"tags":[16],"class_list":["post-161","post","type-post","status-publish","format-standard","hentry","category-8","tag-16"],"_links":{"self":[{"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/posts\/161","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/comments?post=161"}],"version-history":[{"count":2,"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/posts\/161\/revisions"}],"predecessor-version":[{"id":163,"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/posts\/161\/revisions\/163"}],"wp:attachment":[{"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/media?parent=161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/categories?post=161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/bunseki-data.com\/r-onlinecourse\/wp-json\/wp\/v2\/tags?post=161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}