{"id":17568,"date":"2023-08-03T06:00:00","date_gmt":"2023-08-02T21:00:00","guid":{"rendered":"https:\/\/www.muscle-hypertrophy.com\/?p=17568"},"modified":"2023-03-22T14:12:28","modified_gmt":"2023-03-22T05:12:28","slug":"%e7%a9%ba%e9%96%93%e7%9b%b8%e9%96%a2%e3%82%92%e8%80%83%e6%85%ae%e3%81%97%e3%81%9f%e4%b8%80%e8%88%ac%e5%8c%96%e7%b7%9a%e5%bd%a2%e3%83%a2%e3%83%87%e3%83%ab%e3%81%a7%e7%86%b1%e4%b8%ad%e7%97%87%e6%90%ac","status":"publish","type":"post","link":"https:\/\/www.muscle-hypertrophy.com\/?p=17568","title":{"rendered":"\u7a7a\u9593\u76f8\u95a2\u3092\u8003\u616e\u3057\u305f\u4e00\u822c\u5316\u7dda\u5f62\u30e2\u30c7\u30eb\uff08\u30dd\u30a2\u30bd\u30f3CAR\u30e2\u30c7\u30eb\uff09\u3067\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u3092\u30d9\u30a4\u30ba\u63a8\u5b9a\u3057\u3066\u307f\u305f\u304c&#8230;"},"content":{"rendered":"\n<p>\u3000\u3000\u524d\u56de\u306f<a href=\"https:\/\/www.muscle-hypertrophy.com\/?p=17556\" target=\"_blank\" rel=\"noopener\">\u30de\u30eb\u30b3\u30d5\u9023\u9396\u30e2\u30f3\u30c6\u30ab\u30eb\u30ed\u6cd5\u306b\u3066\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u3092\u30d9\u30a4\u30ba\u63a8\u5b9a<\/a>\u3057\u305f\uff0e\u4eca\u56de\u306f\u7a7a\u9593\u76f8\u95a2\u3092\u8003\u616e\u3057\u305f\u4e00\u822c\u5316\u7dda\u5f62\u30e2\u30c7\u30eb\uff08\u30dd\u30a2\u30bd\u30f3CAR\u30e2\u30c7\u30eb\uff09\u3067\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u3092\u30d9\u30a4\u30ba\u63a8\u5b9a\u3057\u3088\u3046\u3068\u8a66\u307f\u305f\uff0e\u7d50\u8ad6\u304b\u3089\u8a00\u3046\u3068\u3046\u307e\u304f\u884c\u3063\u3066\u3044\u306a\u3044\uff0e\u9014\u4e2d\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u30e2\u30c7\u30eb\u69cb\u7bc9\u306b\u5931\u6557\u3059\u308b\uff0e\u305d\u306e\u7d4c\u904e\u3092\u8a18\u4e8b\u3068\u3057\u305f\uff0e<\/p>\n<p><!--more--><\/p>\n<h2>spdep\u306b\u3088\u308b\u8fd1\u63a5\u884c\u5217\u306e\u751f\u6210<\/h2>\n<p>\u3000\u4f7f\u7528\u3059\u308bR\u30d1\u30c3\u30b1\u30fc\u30b8sf, NipponMap, spdep\u3092\u547c\u3073\u51fa\u3059\uff0e<\/p>\n<pre>&gt; library(NipponMap)\n&gt; library(sf)\nLinking to GEOS 3.9.3, GDAL 3.5.2, PROJ 8.2.1; sf_use_s2() is TRUE\n&gt; library(spdep)\n \u8981\u6c42\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8 spData \u3092\u30ed\u30fc\u30c9\u4e2d\u3067\u3059 \nTo access larger datasets in this package, install the spDataLarge package with:\n`install.packages('spDataLarge', repos='https:\/\/nowosad.github.io\/drat\/', type='source')`<\/pre>\n<p>\u3000NipponMap\u306e\u30c7\u30fc\u30bf\u3092\u8aad\u307f\u8fbc\u307f\uff0cCRS\u3092\u6307\u5b9a\u3059\u308b\uff0e<\/p>\n<pre>&gt; shp=system.file(\"shapes\/jpn.shp\", package = \"NipponMap\")[1]\n&gt; pref=read_sf(shp)\n&gt; st_crs(pref)=4326<\/pre>\n<p>\u3000EPSG4326\u3067\u306f\u4f4d\u7f6e\u60c5\u5831\u304c\u7def\u5ea6\u7d4c\u5ea6\u3067\u4e0e\u3048\u3089\u308c\u308b\u305f\u3081\u9069\u5207\u306a\u8ddd\u96e2\u8a08\u7b97\u304c\u56f0\u96e3\u3067\u3042\u308b\uff0e\u305d\u306e\u305f\u3081\u6295\u5f71\u5909\u63db\u306b\u3088\u308a\u5ea7\u6a19\u7cfb\u3092\u5e73\u9762\u76f4\u89d2\u5ea7\u6a19\u7cfb\u7b2c9\u7cfb\u306b\u5909\u63db\u3059\u308b\uff0e<\/p>\n<pre>&gt; pref=st_transform(pref, crs=6677)<\/pre>\n<p>\u3000\u30eb\u30fc\u30af\u578b\u307e\u305f\u306f\u30af\u30a4\u30fc\u30f3\u578b\u306e\u8fd1\u63a5\u884c\u5217\u306fspdep\u306epoly2nb\u95a2\u6570\u3067\u6b21\u306e\u3088\u3046\u306b\u751f\u6210\u3059\u308b\uff0e\u3057\u304b\u3057\u3053\u306e\u8fd1\u63a5\u884c\u5217\u306f\u5f8c\u306bnb2mat\u95a2\u6570\u306e\u3068\u3053\u308d\u3067\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u4f7f\u3048\u306a\u304b\u3063\u305f\uff0e<\/p>\n<pre>&gt; nb=poly2nb(pref)<\/pre>\n<p>\u3000\u5404\u90fd\u9053\u5e9c\u770c\u306e\u91cd\u5fc3\u70b9\u306e\u4f4d\u7f6e\u5ea7\u6a19coords\u3092\u62bd\u51fa\u3057\uff0c\u6700\u8fd1\u96a3\uff14\u30be\u30fc\u30f3\u3067\u8fd1\u63a5\u884c\u5217\u3092\u5b9a\u7fa9\u3059\u308b\uff0eknearneigh\u95a2\u6570\u3067\u63a2\u7d22\u3057\u3066\u8fd1\u63a5\u60c5\u5831\u3092knn\u5f62\u5f0f\u306e\u30aa\u30d6\u30b8\u30a7\u30af\u30c8\u306b\u307e\u3068\u3081\uff0cknn2nb\u95a2\u6570\u3067nb\u5f62\u5f0f\u306b\u5909\u63db\u3059\u308b\uff0e<\/p>\n<pre>&gt; coords=st_coordinates(st_centroid(pref))\nWarning message:\nIn st_centroid.sf(pref) :\n  st_centroid assumes attributes are constant over geometries of x\n&gt; knn=knearneigh(coords,4)\n&gt; nb2=knn2nb(knn)\n<\/pre>\n<h2>CARBasyes\u30e9\u30a4\u30d6\u30e9\u30ea\u3067\u30d9\u30a4\u30ba\u63a8\u5b9a<\/h2>\n<p>\u3000CARBayes\u30e9\u30a4\u30d6\u30e9\u30ea\u3092\u8aad\u307f\u8fbc\u3080\uff0e<\/p>\n<pre>&gt; library(CARBayes)\n \u8981\u6c42\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8 MASS \u3092\u30ed\u30fc\u30c9\u4e2d\u3067\u3059 \n \u8981\u6c42\u3055\u308c\u305f\u30d1\u30c3\u30b1\u30fc\u30b8 Rcpp \u3092\u30ed\u30fc\u30c9\u4e2d\u3067\u3059 \nRegistered S3 method overwritten by 'GGally':\n  method from   \n  +.gg   ggplot2<\/pre>\n<p>\u3000\u30dd\u30a2\u30bd\u30f3CAR\u30e2\u30c7\u30eb\u306e\u8aac\u660e\u5909\u6570\u306f\u65e5\u6700\u9ad8\u6c17\u6e29(x1)\uff0c\u5e73\u5747\u6c34\u84b8\u6c17\u5727(x2)\uff0c\u30ed\u30b8\u30b9\u30c6\u30a3\u30c3\u30af\u95a2\u6570\u3092\u9069\u7528\u3057\u305f\u6708(x3)\uff0c\u4eba\u53e3\u5bc6\u5ea6\u306e\u5bfe\u6570(x4)\u3068\u3057\uff0c\u30aa\u30d5\u30bb\u30c3\u30c8\u5909\u6570\u306f65\u6b73\u4ee5\u4e0a\u4eba\u53e3(p)\u306e\u5bfe\u6570\u3067\u3042\u308b\uff0e\u7a7a\u9593\u76f8\u95a2\u5909\u6570\u3092Leroux\u30e2\u30c7\u30eb\u3067\u4e0e\u3048\u308b\u5834\u5408\uff0cS.CARLeroux\u95a2\u6570\u3092\u7528\u3044\u3066\u4e0b\u8a18\u306e\u3088\u3046\u306b\u63a8\u5b9a\u3059\u308b\uff0e<\/p>\n<pre>&gt; formula=y~offset(log(p))+x1+x2+x3+x4\n&gt; W=nb2mat(nb2, style = \"B\")\n&gt; resLex=S.CARleroux(formula = formula, data=HeatStroke9, family = \"poisson\", W=W, burnin = 5000, n.sample = 20000)\n<\/pre>\n<p>\u3000\u3057\u304b\u3057\uff0c\u7d50\u679c\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u30a8\u30e9\u30fc\u304c\u51fa\u3066\u5931\u6557\u3059\u308b\uff0e<\/p>\n<pre>Setting up the model.\nError: W is not symmetric.<\/pre>\n<h2>\u307e\u3068\u3081<\/h2>\n<p>\u3000\u30dd\u30a2\u30bd\u30f3CAR\u30e2\u30c7\u30eb\u306b\u3088\u308a\u7a7a\u9593\u76f8\u95a2\u3092\u8003\u616e\u3057\u305f\u4e00\u822c\u5316\u7dda\u5f62\u30e2\u30c7\u30eb\u3067\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u3092\u30d9\u30a4\u30ba\u63a8\u5b9a\u3057\u3088\u3046\u3068\u8a66\u307f\u305f\u304c\uff0c\u30a8\u30e9\u30fc\u306e\u305f\u3081\u5b8c\u4e86\u3067\u304d\u306a\u304b\u3063\u305f\uff0eCAR\u3067\u7528\u3044\u308b\u7a7a\u9593\u91cd\u307f\u884c\u5217\u306f\u5bfe\u79f0\u884c\u5217\u3067\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u304c\uff0c\u7a7a\u9593\u91cd\u307f\u884c\u5217\u3092\u5bfe\u79f0\u5316\u3067\u304d\u306a\u3044\u5834\u5408\uff08\u4f8b\u3048\u3070\u65b9\u5411\u3092\u8003\u616e\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u5834\u5408\u306a\u3069\uff09CAR\u306e\u9069\u7528\u306f\u4e0d\u9069\u5207\u3067\u3042\u308b\uff08\u8c37\u6751\u664b\u300e\u5730\u7406\u7a7a\u9593\u30c7\u30fc\u30bf\u5206\u6790\u300fp152\uff09\uff0e\u30a8\u30e9\u30fc\u306e\u539f\u56e0\u306fCAR\uff08\u6761\u4ef6\u4ed8\u304d\u81ea\u5df1\u56de\u5e30\u30e2\u30c7\u30eb\uff09\u3092\u9069\u7528\u3057\u3088\u3046\u3068\u3057\u305f\u3053\u3068\u306b\u3042\u308b\u3088\u3046\u3060\uff0e<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u3000\u3000\u524d\u56de\u306f\u30de\u30eb\u30b3\u30d5\u9023\u9396\u30e2\u30f3\u30c6\u30ab\u30eb\u30ed\u6cd5\u306b\u3066\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u3092\u30d9\u30a4\u30ba\u63a8\u5b9a\u3057\u305f\uff0e\u4eca\u56de\u306f\u7a7a\u9593\u76f8\u95a2\u3092\u8003\u616e\u3057\u305f\u4e00\u822c\u5316\u7dda\u5f62\u30e2\u30c7\u30eb\uff08\u30dd\u30a2\u30bd\u30f3CAR\u30e2\u30c7\u30eb\uff09\u3067\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u3092\u30d9\u30a4\u30ba\u63a8\u5b9a\u3057\u3088\u3046\u3068\u8a66\u307f\u305f\uff0e\u7d50\u8ad6\u304b\u3089\u8a00\u3046\u3068\u3046\u307e\u304f\u884c\u3063\u3066\u3044\u306a\u3044\uff0e\u9014 &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.muscle-hypertrophy.com\/?p=17568\" class=\"more-link\"><span class=\"screen-reader-text\">&#8220;\u7a7a\u9593\u76f8\u95a2\u3092\u8003\u616e\u3057\u305f\u4e00\u822c\u5316\u7dda\u5f62\u30e2\u30c7\u30eb\uff08\u30dd\u30a2\u30bd\u30f3CAR\u30e2\u30c7\u30eb\uff09\u3067\u71b1\u4e2d\u75c7\u642c\u9001\u4eba\u54e1\u6570\u3092\u30d9\u30a4\u30ba\u63a8\u5b9a\u3057\u3066\u307f\u305f\u304c&#8230;&#8221; \u306e<\/span>\u7d9a\u304d\u3092\u8aad\u3080<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[2],"tags":[12918,13464,13497,11356,13333,13495,13489,13490,13496,13491,13501,13327,13465,13503,13492,13477,5465,13479,13309,13486,13480,13502,13476,13474,13494,13493,13481,13483,13507,13478,13506,2498,13499,13485,13473,13498,13377,13484,13407,13370,10953,4071,13509,11240,9408,7271,13482,13300,5852,13488,8130,13510,2893,13457,13500,13508,9271,13475,13487],"class_list":{"0":"post-17568","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"hentry","6":"category-technology","7":"tag-12918","8":"tag-burnin","9":"tag-carbasyes","10":"tag-family","11":"tag-formula","12":"tag-knearneigh","14":"tag-knn","15":"tag-knn2nb","17":"tag-leroux","18":"tag-library","19":"tag-n-sample","20":"tag-nb2mat","21":"tag-nb","22":"tag-nipponmap","23":"tag-offset","24":"tag-package","25":"tag-poisson","26":"tag-poly2nb","27":"tag-read_sf","28":"tag-s-carleroux","29":"tag-sf","30":"tag-spdep","31":"tag-st_centroid","32":"tag-st_coordinates","33":"tag-st_crs","34":"tag-st_transform","35":"tag-symmetric","36":"tag-system-file","37":"tag-w","38":"tag-2498","39":"tag-13499","40":"tag-13485","41":"tag-13473","42":"tag-car","43":"tag-13377","44":"tag-13484","45":"tag-13407","46":"tag-13370","47":"tag-10953","48":"tag-4071","49":"tag-13509","50":"tag-11240","51":"tag-9408","52":"tag-7271","53":"tag-13482","54":"tag-13300","55":"tag-5852","56":"tag-13488","57":"tag-8130","58":"tag-13510","59":"tag-2893","60":"tag-13457","61":"tag-13500","62":"tag-13508","63":"tag-9271","64":"tag-13475","65":"tag-13487"},"_links":{"self":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/17568","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=17568"}],"version-history":[{"count":10,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/17568\/revisions"}],"predecessor-version":[{"id":17596,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=\/wp\/v2\/posts\/17568\/revisions\/17596"}],"wp:attachment":[{"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17568"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17568"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.muscle-hypertrophy.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17568"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}