R¤Î°ìÈ̲½Àþ·Á²óµ¢¤Î¥â¥Ç¥ë¼°¤Ë¤Ä¤¤¤Æ |
|
¡¡¡¡Åê¹Æ¼Ô¡§Y 2022/05/26(Thu) 19:29 No. 23187 |
¢¤³¤Î0¤¬¶Ëü¤Ë¿¤¤·×¿ôÃͥǡ¼¥¿¤Ë¤Ä¤¤¤Æ¡¢
0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0
¤³¤ì¤ò¡¢Éé¤ÎÆó¹àʬÉۤ˶á»÷¤µ¤»¡¢Æ±Ê¬ÉۤΥѥé¥á¡¼¥¿(¦Ì,k)¤Îk¤òR¤ò»È¤Ã¤Æ¿äÄꤷ¤¿¤¤¤Ç¤¹¡Ê¦Ì¤Ï»îÎÁÊ¿¶Ñ¤Ç¤è¤¤¤È¤Î¤³¤È¤Ê¤Î¤Ç¡Ë¡£ R¤Îglm.nb¤Ç»»½Ð¤µ¤ì¤ëtheta¤ò¤³¤Îk¤Ë¤¢¤Æ¤ì¤Ð¤è¤¤¤Èʹ¤¤Þ¤·¤¿¡£
¤³¤Î´Ø¿ô¤Ë¤Ä¤¤¤Æ¤Ï¡¢¥â¥Ç¥ë¼°¤¬ y~x1+x2+x3+1 ¤Î¤è¤¦¤ÊÌÜŪÊÑ¿ô¤ÈÀâÌÀÊÑ¿ô¤«¤é¤Ê¤ë¥â¥Ç¥ë¤ÏËÉ٤˾Ҳ𤵤ì¤Æ¤¤¤ë¤Î¤Ç¤¹¤¬¡¢ËÜ·ï¤Î¤è¤¦¤ËÀâÌÀÊÑ¿ô¤¬¤Ê¤¤(?)»È¤¤Êý¤Ë¤Ä¤¤¤Æ¤Ï»öÎ㤬¸«¤Ä¤«¤é¤º¤³¤Þ¤Ã¤Æ¤¤¤Þ¤¹¡£ 1Îã¤Î¤ß¡¡glm.nb(y~1,¡¡¤È¤¹¤ë»öÎã¤ò¸«¤Ä¤±¤¿¤Î¤Ç¤¹¤¬¡¢ËÜ·ï¤â¤³¤Î¥â¥Ç¥ë¼°¤Ç¤è¤¤¤Î¤Ç¤·¤ç¤¦¤«¡£ ¤â¤·¡¢¤è¤¤¤È¤¹¤ì¤Ð¡¢¤³¤Î y~1 ¤È¤¤¤¦¼°¤Ï¤É¤Î¤è¤¦¤Ê°ÕÌ£¤òµ½Ò¤·¤Æ¤¤¤ë¤Î¤Ç¤·¤ç¤¦¤«¡£ ¤´¶µ¼¨¤¤¤¿¤À¤±¤ë¤È¹¬¤¤¤Ç¤¹¡£
|
Re: R¤Î°ìÈ̲½Àþ·Á²óµ¢¤Î¥â¥Ç¥ë¼°¤Ë¤Ä¤¤¤Æ |
¡¡¡¡Åê¹Æ¼Ô¡§aoki 2022/05/26(Thu) 23:39 No. 23188 |
¤¤¤ï¤æ¤ë null model ¤Ç¤¹¤Í¡£
ÆÈΩÊÑ¿ô¤¬¤Ê¤¤¤Î¤Ç¡¤Í½Â¬Ãͤϡ¤¡Ö¤É¤ó¤Ê¾ì¹ç¤Ç¤¢¤Ã¤Æ¤âÁ´¥Ç¡¼¥¿¤ÎÊ¿¶ÑÃ͡פȤ¹¤ë¤â¤Î¤Ç¤¹¡£
> glm(y ~ 1)
Call: glm(formula = y ~ 1)
Coefficients: (Intercept) 0.07964601769912
Degrees of Freedom: 112 Total (i.e. Null); 112 Residual Null Deviance: 16.28318584071 Residual Deviance: 16.28318584071 AIC: 105.7703175934 ¤È¤Ê¤ê¤Þ¤¹¤¬¡¤Intercept = 0.07964601769912 ¤È¤¤¤¦¤³¤È¤Ï¡¤¤É¤Î¤è¤¦¤ÊÆÈΩÊÑ¿ô¤Ç¤¢¤Ã¤Æ¤â¡Ê¼ÂºÝ¤ÏÆÈΩÊÑ¿ô¤Ï¤Ê¤¤¤Î¤Ç¤¹¤¬¡Ëͽ¬ÃÍ¤Ï 0.07964601769912 ¤À¡ª¤È¤¤¤¦¡¤¤É¤¦¤Ç¤â¤è¤¤¥â¥Ç¥ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
¼ÂºÝ¡¤y = c(0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0) ¤ÎÊ¿¶ÑÃͤÏ> mean(y) [1] 0.07964601769911507 ¤Ç¤¹¤«¤é¡£¥â¥Ç¥ë¤â¤Ø¤Ã¤¿¤¯¤ì¤â¤Ê¤¤¤Ç¤¹¡£
¤Þ¤¿¡¤glm ¤Ç¤¢¤í¤¦¤¬ lm ¤Ç¤¢¤í¤¦¤¬¡¤¡Ê¤ª¾þ¤ê¤ÎÉôʬ¤Ï¤Ê¤¯¤Ê¤ê¤Þ¤¹¤¬¡Ë¼çÍפʷë²Ì¤ÏƱ¤¸¤Ë¤Ê¤ê¤Þ¤¹¡£> lm(y ~ 1)
Call: lm(formula = y ~ 1)
Coefficients: (Intercept) 0.07964601769912
¤³¤Î¥Ç¡¼¥¿¡¤¤É¤¦¤¤¤¦¾ò·ï²¼¤ÇÆÀ¤é¤ì¤¿¤â¤Î¤Ç¤¹¤«¡© ¡ÖÆÈΩÊÑ¿ô¤¬¤Ê¤¤¡×¤Ê¤ó¤Æ... |
Re: R¤Î°ìÈ̲½Àþ·Á²óµ¢¤Î¥â¥Ç¥ë¼°¤Ë¤Ä¤¤¤Æ |
¡¡¡¡Åê¹Æ¼Ô¡§Y 2022/05/27(Fri) 09:14 No. 23190 |
¾ÜºÙ¤Ê¤´²óÅú¡¢À¿¤Ë¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£ º¬ËÜŪ¤Ë´Ö°ã¤Ã¤¿¤³¤È¤ò¤·¤Æ¤¤¤¿¤è¤¦¤Ç¤¹¡£
¤³¤Î¥Ç¡¼¥¿¤Ï¡¢¤¢¤ëÀ½ÉʤÎÀ½Â¤¤Ë»ÈÍѤ¹¤ë¿å¤ÎºÙ¶Ý¸¡ºº¤Î·ë²Ì¤Ç¤¹¡£¿ôÃͤϰìÄêÎ̤ο夫¤é¸¡½Ð¤µ¤ì¤¿ºÙ¶Ý¤Î¸Ä¿ô¤Ç¤¹¡£ËèÆü1¥µ¥ó¥×¥ë¤ò¸¡ºº¤·¡¢»þ·ÏÎó¤Ë¤Ê¤é¤Ù¤¿¤â¤Î¤Ç¤¹¡£
Åö¶È³¦¤Ç¤Ï¡¢¤³¤Î¼ï¤Î¥Ç¡¼¥¿¤Ï¡¢Éé¤ÎÆó¹àʬÉÛ¡¢¥¼¥í²á¾ê¥Ý¥¢¥½¥óʬÉÛÅù¤Ë½¾¤¦¤Î¤Ç¡¢¤³¤ì¤é¤ÎÃæ¤Ç¤è¤¯¥Õ¥£¥Ã¥È¤¹¤ë¤â¤Î¤òÁªÂò¤·¡¢¿äÄꤵ¤ì¤¿Ê¬ÉÛ¤ÎÎ㤨¤Ð99.9¥Ñ¡¼¥»¥ó¥¿¥¤¥ëÅÀ¤ò´ÉÍý´ð½àÃͤˤ¹¤ë¡¦¡¦¡¦¤È¤¤¤Ã¤¿¤³¤È¤¬¹Ô¤ï¤ì¤Æ¤¤¤Þ¤¹¡£ źÉÕʸ¸¥¤ÎÊýË¡¡ÊSAS¤Ë¤è¤ë¥Ñ¥é¥á¡¼¥¿¿äÄê¡Ë¤ò¤½¤Î¤Þ¤Þ¤ä¤í¤¦¤È¤·¤Æ¤¤¤ë¤Î¤Ç¤¹¤¬¡¢SAS¤¬¤Ê¤¤¤Î¤ÇR¤Ç¤Î±é»»ÊýË¡¤òÄ´¤Ù¤Æ¤¤¤¿¤Î¤Ç¤¹¡£¤³¤ÎÉôʬ°Ê³°¤Ï¿ô¼°¤¬µºÜ¤µ¤ì¤Æ¤¤¤ë¤Î¤Ç¡¢¥¨¥¯¥»¥ë¤Ç½èÍý¤Ç¤¤Þ¤·¤¿¡£ ¤Þ¤¿¡¢¤³¤Îʸ¸¥¤Î»öÎã¥Ç¡¼¥¿¤Ï¡¢º£²ó¤Î0¤Ð¤«¤ê¤Î¥Ç¡¼¥¿¤È¤Ï°ã¤¦¤¿¤á¡¢¤½¤Î¤Þ¤Þ¤Ç¤Ï¥À¥á¤À¤í¤¦¤È»×¤Ã¤Æ¤Ï¤¤¤¿¤Î¤Ç¤¹¤¬¡¦¡¦¡¦
|
|