{"id":17240,"date":"2023-05-18T06:00:00","date_gmt":"2023-05-17T21:00:00","guid":{"rendered":"https:\/\/www.muscle-hypertrophy.com\/?p=17240"},"modified":"2023-05-18T07:17:26","modified_gmt":"2023-05-17T22:17:26","slug":"%e3%83%9d%e3%82%a2%e3%82%bd%e3%83%b3%e5%9b%9e%e5%b8%b0%e3%83%a2%e3%83%87%e3%83%ab%e3%81%ae%e5%9b%9e%e5%b8%b0%e6%9b%b2%e7%b7%9a%e3%82%92r%e3%81%a7%e6%8f%8f%e3%81%8f","status":"publish","type":"post","link":"https:\/\/www.muscle-hypertrophy.com\/?p=17240","title":{"rendered":"\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u56de\u5e30\u66f2\u7dda\u3092R\u3067\u63cf\u304f"},"content":{"rendered":"\n<p>\u3000\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f<a href=\"https:\/\/www.muscle-hypertrophy.com\/?p=17193\" target=\"_blank\" rel=\"noopener\">\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u306b\u5bfe\u3059\u308b\u65e5\u6700\u9ad8\u6c17\u6e29\u3068\u5e73\u5747\u6c34\u84b8\u6c17\u5727\u306e\u5f71\u97ff\u3092\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\u30e2\u30c7\u30eb\u307e\u305f\u306f\u8ca0\u306e\u4e8c\u9805\u5206\u5e03\u30e2\u30c7\u30eb\u3092\u7528\u3044\u3066\u56de\u5e30\u4fc2\u6570\u3092\u6c42\u3081<\/a>\u305f\uff0e\u4eca\u56de\u306f\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u56de\u5e30\u66f2\u7dda\u3092R\u3067\u63cf\u304f\uff0e<\/p>\n<p><!--more--><\/p>\n<h2>\u30c7\u30fc\u30bf\u3092\u6e96\u5099\u3059\u308b<\/h2>\n<p>\u3000\u4e0b\u8a18\u30b3\u30fc\u30c9\u306e\u3088\u3046\u306bHeatStroke.xlsx\u3092\u30a4\u30f3\u30dd\u30fc\u30c8\u3059\u308b\uff0e<\/p>\n<pre>&gt; library(readxl)\n&gt; HeatStroke &lt;- read_excel(\"C:\/Users\/****\/HeatStroke.xlsx\", \n+     col_types = c(\"date\", \"numeric\", \"text\", \n+         \"numeric\", \"numeric\", \"numeric\"))<\/pre>\n<p>\u3000x, y \u306b\u305d\u308c\u305e\u308c\u65e5\u6700\u9ad8\u6c17\u6e29(Temp), \u5e73\u5747\u6c34\u84b8\u6c17\u5727(Vapor)\u3092\u683c\u7d0d\u3059\u308b\uff0e<\/p>\n<pre>&gt; y = HeatStroke$HeatStroke\n&gt; x = HeatStroke$Temp<\/pre>\n<p>\u3000z\u306bglm()\u95a2\u6570\u3092\u7528\u3044\u3066\u30dd\u30a2\u30bd\u30f3\u5206\u5e03\u3092\u6307\u5b9a\u3059\u308b\uff0e<\/p>\n<pre>&gt; z = glm(y ~ x, family = poisson(link = \"log\"))<\/pre>\n<p>\u3000z\u3092\u5c55\u958b\u3057\u3066\u56de\u5e30\u4fc2\u6570\u3092\u6c42\u3081\u308b\uff0e<\/p>\n<pre>&gt; z\nCall:  glm(formula = y ~ x, family = poisson(link = \"log\"))\nCoefficients:\n(Intercept)            x  \n     -7.475        0.306  \nDegrees of Freedom: 82784 Total (i.e. Null);  82783 Residual\nNull Deviance:\t    1464000 \nResidual Deviance: 698400 \tAIC: 915500<\/pre>\n<h2>\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u30d9\u30af\u30c8\u30eb\u3092\u683c\u7d0d\u3059\u308b<\/h2>\n<p>\u3000\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0p\u306bx\u8ef8\u306e\u30d9\u30af\u30c8\u30eb\u3092\u683c\u7d0d\u3059\u308b\uff0e<\/p>\n<pre>&gt; p = data.frame(Temp = seq(0, 40, length.out = 100))<\/pre>\n<p>\u3000\u5f0f y = exp(-7.475 + 0.306*x)\u306e\u5f62\u306b\u306a\u308b\u3088\u3046\u306by\u8ef8\u306e\u30d9\u30af\u30c8\u30eb\u3092\u30c7\u30fc\u30bf\u30d5\u30ec\u30fc\u30e0\u306b\u683c\u7d0d\u3059\u308b\uff0e<\/p>\n<pre>&gt; p$Num = exp(-7.475 + 0.306 * p$Temp)<\/pre>\n<h2>\u30d7\u30ed\u30c3\u30c8\u3059\u308b<\/h2>\n<p>\u3000\u4e0b\u8a18\u30b3\u30fc\u30c9\u3067\u30d7\u30ed\u30c3\u30c8\u3059\u308b\uff0e<\/p>\n<pre>&gt; plot(x, y) + lines(p$Temp, p$Num, type = \"l\", col = \"red\")<\/pre>\n<h2>\u7d50\u679c<\/h2>\n<p>\u3000\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u901a\u308a\u3067\u3042\u308b\uff0e<\/p>\n<figure id=\"attachment_17241\" aria-describedby=\"caption-attachment-17241\" style=\"width: 862px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/02\/50.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-17241\" src=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/02\/50.png\" alt=\"\u6563\u5e03\u56f3\u306b\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\u30e2\u30c7\u30eb\u56de\u5e30\u66f2\u7dda\u3092\u8ffd\u52a0\" width=\"862\" height=\"666\" srcset=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/02\/50.png 862w, https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/02\/50-300x232.png 300w, https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/02\/50-768x593.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption id=\"caption-attachment-17241\" class=\"wp-caption-text\">\u6563\u5e03\u56f3\u306b\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\u30e2\u30c7\u30eb\u56de\u5e30\u66f2\u7dda\u3092\u8ffd\u52a0<\/figcaption><\/figure>\n<h2>ggplot2\u3067\u63cf\u304f<\/h2>\n<p>\u3000\u4e0b\u8a18\u30b3\u30fc\u30c9\u53c2\u7167\uff0e\u51e1\u4f8b\u306e\u8a18\u8ff0\u306b\u554f\u984c\u304c\u3042\u308b\uff0e<\/p>\n<pre>&gt; library(ggplot2)\n&gt; w = ggplot(data = HeatStroke, aes(x = x, y = y)) + geom_point(alpha = 0.1)\n&gt; w + geom_line(data = p, aes(x = p$Temp, y = p$Num, col = \"red\"))<\/pre>\n<figure id=\"attachment_17245\" aria-describedby=\"caption-attachment-17245\" style=\"width: 862px\" class=\"wp-caption aligncenter\"><a href=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/05\/50.png\"><img loading=\"lazy\" decoding=\"async\" class=\"size-full wp-image-17245\" src=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/05\/50.png\" alt=\"ggplot2\u306b\u3088\u308b\u56de\u5e30\u66f2\u7dda\u306e\u63cf\u753b\" width=\"862\" height=\"666\" srcset=\"https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/05\/50.png 862w, https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/05\/50-300x232.png 300w, https:\/\/www.muscle-hypertrophy.com\/wp-content\/uploads\/2023\/05\/50-768x593.png 768w\" sizes=\"auto, (max-width: 767px) 89vw, (max-width: 1000px) 54vw, (max-width: 1071px) 543px, 580px\" \/><\/a><figcaption id=\"caption-attachment-17245\" class=\"wp-caption-text\">ggplot2\u306b\u3088\u308b\u56de\u5e30\u66f2\u7dda\u306e\u63cf\u753b<\/figcaption><\/figure>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3000\u6563\u5e03\u56f3\u306b\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u56de\u5e30\u66f2\u7dda\u3092\u8ffd\u52a0\u3057\u305f\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u524d\u56de\u306e\u8a18\u4e8b\u3067\u306f\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u306b\u5bfe\u3059\u308b\u65e5\u6700\u9ad8\u6c17\u6e29\u3068\u5e73\u5747\u6c34\u84b8\u6c17\u5727\u306e\u5f71\u97ff\u3092\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\u30e2\u30c7\u30eb\u307e\u305f\u306f\u8ca0\u306e\u4e8c\u9805\u5206\u5e03\u30e2\u30c7\u30eb\u3092\u7528\u3044\u3066\u56de\u5e30\u4fc2\u6570\u3092\u6c42\u3081\u305f\uff0e\u4eca\u56de\u306f\u30dd\u30a2\u30bd\u30f3\u56de\u5e30\u30e2\u30c7\u30eb\u306e\u56de\u5e30\u66f2\u7dda\u3092R\u3067\u63cf\u304f\uff0e<\/p>\n","protected":false},"author":1,"featured_media":17241,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[13317,13311,13329,2884,13318,13331,13333,13338,13308,13312,13327,13336,13332,13334,13330,13307,13328,13316,5596,13337,4329,4330,13305,4328,13335,13299,13326,11240,5852,13325,13320],"class_list":["post-17240","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-technology","tag-aic","tag-coefficients","tag-col_types","tag-date","tag-degrees-of-freedom","tag-family-poisson","tag-formula","tag-ggplot2","tag-glm","tag-intercept","tag-library","tag-lines","tag-link-log","tag-null-deviance","tag-numeric","tag-plot","tag-read_excel","tag-residual-deviance","tag-text","tag-type-l","tag-x","tag-y","tag-13305","tag-4328","tag-13335","tag-13299","tag-13326","tag-11240","tag-5852","tag-13325","tag-13320"],"_links":{"self":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/17240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17240"}],"version-history":[{"count":4,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/17240\/revisions"}],"predecessor-version":[{"id":17615,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/17240\/revisions\/17615"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/media\/17241"}],"wp:attachment":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17240"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}