BUGS/Stan
ãã¤ãºãã¼ã¿è§£æ(第3ç)森ååºçAmazonå æ¥ã®ãã¨ã§ãããããã¤ãºãã¼ã¿è§£æãã訳è ã®ãä¸äººè 澤ãããããæµè´ããã ãã¾ãããããä¸ç®è¦ãã ãã§ãéå¨ã以å¤ã®èªãåºã¦ããªããããã®ç«æ´¾ãªéå¨ã§ï¼ç¬ï¼ãåèã®BDA3*1ã«è² ããªããããã®éå¨ã£ã·ããâ¦
æ¯å¹´åã®äºã®è¨ããªããæ¸ãã¦ããæ¨è¦æ¸ç±ãªã¹ãè¨äºã§ãããä½ã ããã ã§ä»å¹´ãæ¸ããã¨ã«ãã¾ããããªãæ¨å¹´åº¦çã®è¨äºãä¸ã«ãªã³ã¯ãã¦ããã¾ããã®ã§ã以åã®ãã¼ã¸ã§ã³ãèªã¾ãããæ¹ã¯ãã¡ãããèªã¿ãã ããã ä»åã®ãã¼ã¸ã§ã³ã§ã¯ã趣åãã¡ãã£ã¨â¦
æ¨æº ãã¤ãºçµ±è¨å¦æåæ¸åºAmazonçºåå½æã«è©±é¡ã«ãªã£ã¦ãããæ¨æºãã¤ãºçµ±è¨å¦ããå®ã¯è¨³è ã®ãä¸äººãè 澤ç¿ä¹å©ãããããªãã£ã¹å®ã¦ã§ãæµè´ããã ãã¦ããã®ã§ããã親ç¶ã®æ²¡å¾å¦çããèªåã®DVTããå®å®¶ã®çä»ãããã§å ¨ãæãåãããªãã£ã¹ã«ç½®ããâ¦
å ã¯ã¨è¨ãã°ã¢ããªã¨ã¤ããªã«ãã¼ã«ãã¿ãä½ãããã«åå¼·ãå§ãããã¨ãªã®ã§ãããæè§ã ãã¨ãããã¨ã§æ¯æ¥15æéãã«ãã£ã¦ãããæ¬æ¥ã®æ±äº¬é½ã®COVID-19é½æ§å ±åæ°ãè¸ã¾ããæææ¡å¤§ç¶æ³ææ¡ã®ããã®ãã£ããã£ã³ã°ããã¿ãRããã±ã¼ã¸ã«ã¾ã¨ãã¦ç°¡åã«â¦
COVID-19ãä¸çä¸ã«æææ¡å¤§ããæ¥æ¬å«ãå¤ãã®å½ã§å¤åºãéä¼ã®å¶éï¼èªç²ï¼æªç½®ãåããã¦ä¹ ããæ¨ä»ã§ãããããã«ä¼´ã£ã¦å¤ãã®ã¨ããã§COVID-19ã«é¢é£ãããªã¼ãã³ãã¼ã¿ãå ¬éãããããã«ãªã£ã¦ããããã¼ã¿åæãçæ¥ã¨ãã人éãå®ãã¼ã¿ãæ±ãè¯ãâ¦
å æ¥ã®è¨äºã§ãæ¸ããããã«ãã©ããããæè¿RStanå¨ãã®ç°å¢ãè²ã å³ãããªã£ã¦ããæ°ããã¦ãã¦ãä»®ã«RStanãä»å¾ç°å¢é¢ã§ã®ä¸å ·åããã¹ããããªã©ã§ä½¿ããªããªã£ãããã¤ã¸ã¢ã³ã¢ããªã³ã°ãããªããªã£ã¦å°ããããããã¨ããå±æ§ãæè¿æ±ãã¤ã¤ããã¾ãâ¦
ãã®è¨äºã¯å®å ¨ã«åå¿é²ã§ããå¿ è¦æä½éã®æ å ±ããè¨ããã¦ãã¾ããã®ã§æªãããããäºæ¿ãã ãããè²ã äºæ ããã£ã¦ã¤ãæè¿Rã3.6.1ã«ã¢ãããã¼ããã¦ããã¤ãéãããã±ã¼ã¸ãã¤ã³ã¹ãã¼ã«ãç´ãã¦ããã®ã§ãããããããæã«æ¯åã³ã±ãã®ã¯RStanã¨ç¸å ´â¦
ãã2ã¶æãããã«æ¸¡ã£ã¦å¤ãã®æ¹ã ãããèæ¸ããæµè´ãã¾ãã£ã¦ããã®ã§ããããã®ãã¡ã®ä¸åããã¡ãããã¤ã¦è¨éæç³»ååæãå¦ãã§ããé ã«åã大å¤ãä¸è©±ã«ãªã£ããLogics of Blueããã°ã®é¦¬å ´ããã®æã«ãããRã¨Stanã§ã¯ããããã¤ãºçµ±è¨ã¢ããªã³ã°â¦
ããã¯åãªãåå¿é²ã§ãããè«æã¨ãµã³ãã«ã³ã¼ãèªã¿ãªãã試ãã¾ããã以å¤ã«ä½ãå 容ã®ãªãè¨äºã§ãã®ã§ã注æãã ãããç¹ã«åã ã®å¼ã®å¤æ°ã®èª¬æã«ã¤ãã¦ã¯å人çãªåå¿é²ãã大åã端æãã¾ãã®ã§ãä»®ã«èå³ãæãããæ¹ã¯é©å®è«æã®æ¬æããåç §ä¸ãâ¦
2é±éåã«ãµã¨æãç«ã£ã¦ãããªãã¨ã試ãã¦ã¿ãããã§ããã ããããèãã¦ã¿ããããã¼ã¿ãçæããçã®ã¢ãã«ãæå¤ä¿æ°ï¼ã¢ãã«æ¨å®ãæå¤ä¿æ°ãã§ãã£ã¦ã¿ãçµæã並ã¹ãã ãã§ããããï¼ä¾ãã°ï¼æä¸å¤ä¿æ°ã¢ãã«ã§æ¨å®ãã¦ãã¾ã£ãå ´åãåãªãOLSç·â¦
ããã¯ãã ã®åå¿é²ã§ããç®æ°ããå 容ã¯ç¹ã«ä½ãããã¾ããããã¡ãã¨ããå 容ãå¦ã³ããã¨ããæ¹ã¯ãå æ¥èè ã®è©åãããããæµè´ããã ãããã¡ãã®æ¸ç±ã§å¦ã°ãããã¨ããè¦ããããã¾ããMCMCã«çã¾ãããç²åãã£ã«ã¿ã®å®è£ ï¼å®è·µã¾ã§ã«ãã¼ãã¦ãã¦â¦
ããã¯å®ã¯æ¢ã«å ãã¿ã®ãããã¼ãã§ãã Cross-validation for time series | Rob J Hyndman å人çã«ã¯ãã¬ã³ãã»å£ç¯èª¿æ´ä»ãæç³»åãã¼ã¿ã®å帰ã¢ãã«ãããå ´åã¯ã»ã¼ä¾å¤ãªããã¤ã¸ã¢ã³ã¢ããªã³ã°ã§åããã§ãããä¸è¬ã«ãã¤ãºç³»ã®ã¢ãã«ã¯ä¾ãã°WAICâ¦
ä¸ã®ä¸æ§ã ãªä»å ¥å¹æã»æ½çå¹æãæ¤è¨¼ããããã®experimentãè¡ãªããã¦ããã¨æããã§ãããæå¤ã¨ãã®å¹ææ¤è¨¼ã¨ããã®ã¯é£ãããã®ã§ããç¹ã«ããããçµ±è¨çå ææ¨è«ã®ç«å ´ããè¦ãã°ãwebä¸ã§æ¥è§¦ããä¸è¬ã¦ã¼ã¶ã¼ã«å¯¾ããä»å ¥ãæ½çã¨ãã£ããã®ã®æ¤è¨¼â¦
ãã®è¨äºã¯ããããã¯ã¦ãã稼ãã§ãã¾ã£ãååã®è¨äºã®ç¶ãã§ããASAã®ãã¬ã¹ãªãªã¼ã¹åã³å£°æã®ä¸ã«ã¯ã確ãã«ãpå¤ã«ä¾æ ããªãæ°ããªã¢ããã¼ãã®ä¾ãã¨ãã¦äºæ¸¬å¤ãéè¦ããã¢ããã¼ã*5ããã¤ã¸ã¢ã³ã¢ããªã³ã°ã決å®çè«çã¢ããã¼ã*6ããã³false disâ¦
ããè¨ãã°3å¹´åã«ãããªã¾ã¨ãçã¨ã³ããªãæ¸ããã®ã§ããããã®å 容ã¯ãã®ã¾ã¾ããªãã®é¨åã2å¹´åã«åè¡ããæèã®åæ¡ã«ããªã£ãã¨ãããã¨ã§ãè²ã æãåºæ·±ãã¨ã³ããªã§ãããªã®ã§ãããã»ã»ã»ãã®3å¹´ã®éã«çµ±è¨å¦ã»æ©æ¢°å¦ç¿ã»ãã¼ã¿ãã¤ãã³ã°ã®è«¸ææ³â¦
è¨äºã¿ã¤ãã«ã«åãã¦åã¯å®ã¯çµ±è¨çæ¤å®ã大å«ããªãã§ãããçããããããéããã§ããããï¼ç¬ï¼ãã¨ãããã¨ã§ãä»åã¯ããããã¢ãã¯ãªã¡ã¿ã¢ããªã·ã¹ã®è©±é¡ã§ããã¦ã¿ãããã¨æãã¾ãããt-testã®ã¡ã¿ã¢ããªã·ã¹ãã¿ãããªãããããRosenthal's metâ¦
ä½ããã®ã·ãªã¼ãºãã¡ããã¡ãä¹ ãã¶ããªãã§ããï¼æ±ï¼ãã¡ãã£ã¨æè¿åé¡æèãæ±ãã¦ãã話é¡ãããã®ã§ããã«é¢é£ããå½¢ã§Stanã§ãã£ã¦ã¿ããã¨æãã¾ãã ããã¯æç³»åã®ããã¬ã³ããã®æ±ãããã¸ãã¹ã®ç¾å ´ã§ã¯ãæç³»åãæèããªãã¦ãè¯ã*1ã¯ãã¹ã»â¦
追è¨(2015/03/14) 第7ç« ã®æ±ºå®æ¨ã®ã¨ããã§åãä¸ãã{mvpart}ããã±ã¼ã¸ã®ãµãã¼ããåããCRANããåé¤ããã¦ãã¾ã£ãããinstall.packagesé¢æ°ã§ã¯ã¤ã³ã¹ãã¼ã«ã§ããªããªã£ã¦ãã¾ããç¾å¨ã®ã¤ã³ã¹ãã¼ã«æ¹æ³ãæå¾ã«è¿½è¨ãã¾ããã 追è¨(2014/09/18) å®â¦
æ¬æ¥ãåºçå ã®æè¡è©è«ç¤¾(gihyo)æ§ã®å ¬å¼ãµã¤ãã§ãªã¼ãã³ã«ãªãã¾ããã æãåãããªããå¦ã¶ ãã¸ãã¹ã«æ´»ãããã¼ã¿ãã¤ãã³ã°ï¼æ¸ç±æ¡å ï½æè¡è©è«ç¤¾ ããã¦æ¸å½±ã¯ã¾ã åæ ããã¦ããªãããã§ãããAmazonã§ãäºç´åä»ãå§ã¾ã£ã模æ§ã§ã*1ã æãåãâ¦
ååã®è¨äºã§ã¯ç大ã«ãã¬ã³ãã¤ãã¢ãã«ã®å¼ããã¬ã³ãç´¯ç©å¤ã§ã¢ããªã³ã°ããªãã¨ããéæããªãã¨ããã¦ãã¾ã大å¤å¤±ç¤¼ãã¾ããorz ãã¦ãé層ãã¤ãºã¢ãã«ã§ã¯ééãªãè²ã ãªè¦ç´ ã足ãã¦ãããã¨ã§ãæã¦ããªãè¤éã£ã½ãã¢ãã«ãä½ããã¨ãã§ããããâ¦
ãã®ã·ãªã¼ãºè¨äºãå ¨ç¶çé¢ç®ã«äºååå¸ã®åå¼·ããã¦ããªã人éãStanã§ç¡çãããã«ãã¤ãºããããã¨ããç¡è¬ãªä»£ç©ã§ãããã¾ãããä½ã ããã ã§æ®µã ä½³å¢ã«å ¥ã£ã¦ã¾ããã¾ããã ã¨ãããã¨ã§ãä»åã¯é層ãã¤ãºã¢ãã«ããããªæãã§ãã£ã¦ã¿ã¾ããã¨ããâ¦
ã ãã¶éã空ãã¡ããã¾ãããï¼æ±ï¼ãããã¾ã§ã®è¨äºã§å¤§ä½Stanã§ä½ãã§ãããåãã£ãã®ã§ãã¼ã¡ã¼ã¡Stanããããã¨ããã£ã¦ã¿ããã¨æãã¾ããä¸å¿éå»è¨äºã®ãªã¹ãåºãã¦ããã¾ãã®ã§ãè¯ãã£ãã復ç¿ãå ¼ãã¦ãèªã¿ãã ããã Stanã§çµ±è¨ã¢ããªã³ã°ãå¦â¦
Stanã§çµ±è¨ã¢ããªã³ã°ãå¦ã¶(3): ãã£ã¨ãStanã§ä½ãã§ãããããçºãã¦ã¿ã
å®ã¯æ¥åã§ãStan使ãå§ãã¦ããã§ãããã¾ã ã¾ã åä½æ ¹ããããã«ãã¼ã¿ã®åæã«åããªã©ä½ã¬ãã«ãªãã®ãå¤ããç¡æ å ±äºååå¸ã¨é層äºååå¸ãå·§ã¿ã«ä½¿ãããªãã¦è¯éºã«ãµã³ããªã³ã°ããããªãã¦å¤¢ã®ã¾ã夢ã¨ããæ ããªãç¶æ³ã§ãï¼æ³£ï¼ã ã§ãæ°ãä»ããâ¦
ï¼ååè¨äºã¯ãã¡ãããï¼ ãã¤ã¸ã¢ã³ã®ç¥èãããå æ¸ãªåããããªã·ãªã¼ãºè¨äºãæ¸ãã¨ãã»ã¨ãã©ã®ã£ã°ã®é åãªãã§ããï¼æ±ï¼*1ã2åç®ã®ä»åã®è¨äºã§ã¯ããããMCMCã£ã¦ä½ã ã£ãã£ãï¼ã£ã¦ã¨ããããå§ãããã¨æãã¾ãã ä»ååèã«ããã®ã¯ã主ã«ä¹ ä¿â¦
ï¼â»Stan v2.4.0以éã§ã¤ã³ã¹ãã¼ã«æ¹æ³ã«è¥å¹²å¤æ´ãããã¾ãï¼è©³ããã¯ãã®è¨äºã®ä¸ã»ã©ãã覧ãã ããï¼ ãã¦ãå¹´åã®æ±è² ã§ãèªã£ãããã«ä»å¹´ã¯Stanãé å¼µã£ã¦ä¼å¾ãã¦ãããã¨æãã¾ããçç±ã¯ç°¡åã§ãããã£ããã®è¦ç´ ãè©°ãè¾¼ãã§MCMCãµã³ãã©ã¼ã§ã¬ã³â¦
èå¿ã®MCMCã®åå¼·ã¯ã©ãè¡ã£ãã´ã«ã¡ã¨ãæãããã¨ã¢ã¬ãªãã§ãããå ã«ãã¼ã«ã®ä½¿ãæ¹è¦ãã¦ãã¾ããã¨æã£ã¦Stanã§ç°¡åãªç·´ç¿ããã£ã¦ã¿ã¾ãããã¡ãªã¿ã«åèã«ããè³æã¯ãã¡ãã Stanãã¥ã¼ããªã¢ã«ã®è³æãä½æãã¾ããã - Analyze IT. StanTutorial â¦