GLM <- glm(cbind(Dis,Health) ~ TRT + REP , family=binomial(logit), data=Dataset)»ÈÍѤ·¤¿¥Ç¡¼¥¿¤Ï°Ê²¼¤Î¤È¤ª¤ê¤Ç¤¹¡£
Anova(GLM, type="II")
Response: cbind(Dis, Health)
LR Chisq Df Pr(>Chisq)
TRT 6.7399 1 0.009428 **
REP 3.1048 1 0.078064 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
»î¸³¾ì½ê ´ÉÍýÊýË¡ ¥Ö¥í¥Ã¥¯ ȯÉ ·òÁ´
PL TRT REP Dis Health
1 1 1 1 34 12
2 1 1 2 30 12
3 1 1 3 28 9
4 1 2 1 14 28
5 1 2 2 13 36
6 1 2 3 24 22
7 1 3 1 21 24
8 1 3 2 28 16
9 1 3 3 25 15
No.08731¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡ÚÃΤ俤«¤Ö¤ê¡Û¡¡2008/12/24(Wed) 17:12
´ÉÍýÊýË¡(TRT)¤È¥Ö¥í¥Ã¥¯(REP)¤¬¿ôÃͥǡ¼¥¿¤Î¤Þ¤Þ¤Ç¤¹.¤Þ¤º¤Ï,°ø»Ò·¿¤ËÊÑ´¹¤·¤Þ¤·¤ç¤¦.
¿½ÅÈæ³Ó¤Ë´Ø¤·¤Æ¤Ï,´ÉÍýÊýË¡¤ÎÁ´¤Æ¤Î¥Ú¥¢Ëè¤Ë¥í¥¸¥¹¥Æ¥£¥Ã¥¯²óµ¢¤ò¹Ô¤Ã¤Æ,Bonferroni¤ÇÍ°Õ¿å½à¤òÄ´À°¤¹¤ë¤Î¤¬°ìÈÖ´Êñ¤Ç¤Ï¤Ê¤¤¤«¤È»×¤¤¤Þ¤¹.¸¡Äê¤Î²ó¿ô¤ÏÁ´Éô¤Ç3¤Ç¤¹¤«¤é,¸¡½ÐÎϤÎÄã²¼¤ò¤¢¤Þ¤êµ¤¤Ë¤·¤Ê¤¯¤Æ¤â¤è¤¤¤Î¤Ç¤Ï.
ÃÏ°è¤Ë¤è¤ë°ã¤¤¤ò¸¡Æ¤¤·¤¿¤¤¤Î¤Ç¤¢¤ì¤Ð,»î¸³¾ì½ê(PL)¤òÀâÌÀÊÑ¿ô¤Ë²Ã¤¨¤Æ¤ß¤Þ¤·¤ç¤¦(¤½¤ÎºÝ,¥Ö¥í¥Ã¥¯¤Î¿å½à¤Î¤Ä¤±¤«¤¿¤ËÃí°Õ.»î¸³¾ì½êËè¤Ë¥Ö¥í¥Ã¥¯ÈÖ¹æ¤ÏÊѤ¨¤Ê¤±¤ì¤Ð¤¤¤±¤Ê¤¤).
No.08733¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡ÚÀÄÌÚÈË¿¡Û¡¡2008/12/24(Wed) 22:56
°ìÉô·ë²Ì¤¬ºÆ¸½¤Ç¤¤Ê¤¤¤Î¤Ç¤¹¤¬¡¤¤ª»È¤¤¤¤¤¿¤À¤¤¤Æ¤¤¤ëR¤Î¥Ð¡¼¥¸¥ç¥ó¤Ê¤É¤òÊó¹ð¤·¤Æ¤¯¤À¤µ¤¤¡£¤Þ¤¿¡¤¥¿¥¤¥×¥ß¥¹ ¤È¤¤¤¦¤«¡¤¼Â¹Ô·ë²Ì¤ò¥³¥Ô¡¼¡¦¥Ú¡¼¥¹¥È¤·¤Æ¤¤¤Ê¤¤¾ì¹ç¤Ë¤Ï¡¤´Ö°ã¤¤¤¬¤Ê¤¤¤«¡¤ºÆ³Îǧ¤·¤Æ¤¤¤¿¤À¤±¤ë¤È¹¬¤¤¤«¤È¡£¡£¡£Anova ¤Ã¤Æ¡¤¤É¤³¤ÇÄêµÁ¤µ¤ì¤Æ¤¤¤ë´Ø¿ô¤Ç¤·¤ç¤¦¤«¤È¤¤¤¦¤³¤È¤Ê¤Î¤Ç¤¹¤±¤É¡£¡£¡£
No.08735¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡Ú¤Ï¤¿¡Û¡¡2008/12/25(Thu) 01:27
ÃΤ俤«¤Ö¤êÍÍ¡¤ÀÄÌÚÈË¿ÍÍ
¤ªÊÖ»ö¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
ÀÄÌÚ¡¡ÍÍ
¡¡R¤Î¥Ð¡¼¥¸¥ç¥ó¤Ï2.8.0¤Ç¤¹¡£
¡¡²þ¤á¤Æ¡¤Æ±°ì¥Ç¡¼¥¿¤ò½èÍý¤·¤¿¤È¤³¤í¡¤Á°µ¤Î½ÐÎÏ·ë²Ì¤È°ã¤Ã¤Æ¤¤¤Þ¤·¤¿¡£¥ª¥Ö¥¸¥§¥¯¥È¤Î¥¯¥ê¥¢¤¬¤Ç¤¤Æ¤¤¤Ê¤«¤Ã¤¿¤Î¤Ç¤·¤ç¤¦¤«¡£²¼µ¤ÏºÆ¼Â»Ü¤·¤¿·Ð²á¤Ç¤¹¤¬¡¤º£Å٤Ϥ¤¤«¤¬¤Ç¤·¤ç¤¦¤«¡©
¡¡Anova¤Ë¤Ä¤¤¤Æ¤Ï¡¤R¥³¥Þ¥ó¥À¡¼¥á¥Ë¥å¡¼¤Î¡Ö¥â¥Ç¥ë¡×¡Ö²¾À⸡Äê¡×¡Öʬ»¶Ê¬ÀÏɽ¡×¤Ç¸¡Äê¤Î¥¿¥¤¥×¤ò¥Ç¥Õ¥©¥ë¥È¤Î¡ÖType¶¡×¤òÁªÂò¤·¤Þ¤·¤¿¡£
ÃΤ俤«¤Ö¤ê¡¡ÍÍ
¡¡ ¥í¥¸¥¹¥Æ¥£¥Ã¥¯²óµ¢¤È¤Ï¡¤ºÇ½é¤ÎR¥³¥Þ¥ó¥É¤Î´Ø¿ôglm¤Ë¤è¤ë¥í¥¸¥¹¥Æ¥£¥Ã¥¯²óµ¢¤Ç¤è¤¤¤Ç¤·¤ç¤¦¤«¡©¤Þ¤¿¡¤Â¿½ÅÈæ³Ó¤Ï°Ê²¼¤Î¤è¤¦¤Ë¤¹¤ë¤È9¶èÁíÅö¤¿¤ê¤ÎÂÐ Èæ³Ó¤È¤Ê¤Ã¤Æ¤·¤Þ¤¤¤Þ¤¹¡£´ÉÍýÊýË¡(TRT)¤Ë¤è¤ë·²´Ö¤Ç¤Î¸¡Äê¤Ï¤É¤Î¤è¤¦¤Ë¤¹¤ì¤ÐÎɤ¤¤Ç¤·¤ç¤¦¤«¡©°Ê²¼¤ÎR¥³¥Þ¥ó¥É¤Ç¤Ï¥Ç¥Õ¥©¥ë¥È¤ÇHolm¤ÎÊýË¡¤¬¤È ¤é¤ì¤Æ¤¤¤Þ¤¹¤¬¡¤Bonferroni¤ÎÊýË¡¤òÁªÂò¤¹¤Ù¤¤Ê¤Î¤Ç¤·¤ç¤¦¤«¡©> print(pairwise.prop.test(Dis,Dis+Health))¡¡3»î¸³¾ì½ê¤Ç¤Î¥Ö¥í¥Ã¥¯¡ÊREP)ÈÖ¹æ¤Ï¡¤°Ê²¼¤Î¤è¤¦¤ËÊѹ¹¤¹¤ë¤È¤¤¤¦¤³¤È¤Ç¤·¤ç¤¦¤«¡©»î¸³¾ì½ê¡¡´ÉÍýÊýË¡¡¡¥Ö¥í¥Ã¥¯
PL¡¡¡¡¡¡¡¡TRT¡¡¡¡¡¡¡¡REP
1¡¡¡¡¡¡¡¡1¡Á3¡¡¡¡¡¡1¡Á3 ¢ª 1¡Á3¡¡¡¡
2¡¡¡¡¡¡¡¡1¡Á3¡¡¡¡¡¡1¡Á3 ¢ª 4¡Á6
3¡¡¡¡¡¡¡¡1¡Á3¡¡¡¡¡¡1¡Á3 ¢ª 7¡Á9
------------------------------------------------------
¡ÊºÆ¼Â»Ü¤·¤¿½ÐÎÏ¡Ë
> attach(Dataset)
> PL <- as.factor(PL)
> REP <- as.factor(REP)
> TRT <- as.factor(TRT)
> GLM <- glm(cbind(Dis, Health) ~ TRT + REP, family=binomial(logit),
+ data=Dataset)
> summary(GLM)
Call:
glm(formula = cbind(Dis, Health) ~ TRT + REP, family = binomial(logit), data = Dataset)
Deviance Residuals:
1 2 3 4 5 6 7 8
0.62171 -0.06081 -0.69741 0.19819 -1.14686 0.92353 -0.74881 1.19295
9
-0.46186
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.8360 0.2448 3.414 0.00064 ***
TRT[T.2] -1.5942 0.2726 -5.849 4.94e-09 ***
TRT[T.3] -0.7461 0.2718 -2.745 0.00606 **
REP[T.2] 0.1011 0.2576 0.393 0.69464
REP[T.3] 0.5728 0.2691 2.129 0.03330 *
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 46.5522 on 8 degrees of freedom
Residual deviance: 5.2812 on 4 degrees of freedom
AIC: 52.104
Number of Fisher Scoring iterations: 3
> Anova(GLM, type="II")
Anova Table (Type II tests)
Response: cbind(Dis, Health)
LR Chisq Df Pr(>Chisq)
TRT 37.560 2 6.98e-09 ***
REP 5.172 2 0.07531 .
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
No.08736¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡ÚÃΤ俤«¤Ö¤ê¡Û¡¡2008/12/25(Thu) 09:31
Anova()¤Ï,library(car)¤Î´Ø¿ô¤Ç¤¹¤Í.R¥³¥Þ¥ó¥À¡¼¤Ç¤Ï¤³¤ì¤¬¥Ç¥Õ¥©¥ë¥È¤Ê¤ó¤Ç¤¹¤«¡Ä¤Ê¤ó¤Ç¤À¤í¤¦¡©null model¤È¤ÎÈæ³Ó¤Ê¤éanova()¤Ç¤â¤è¤µ¤½¤¦¤Ç¤¹¤¬.
> print(pairwise.prop.test(Dis,Dis+Health))
¤³¤ì¤Ï,ÈæΨ¤Îº¹¤Î¿½ÅÈæ³Ó¤Ç¤¢¤ê,°ìÈ̲½Àþ·Á¥â¥Ç¥ë(¤³¤Î¾ì¹ç¤Ï,¥í¥¸¥¹¥Æ¥£¥Ã¥¯²óµ¢¡Ë¤È¤Ï¡ÖÏÈÁȡפ¬°ã¤¤¤Þ¤¹.ξ¼Ô¤òÊ»ÍѤ¹¤ë¤Î¤Ï¥Þ¥º¥¤¤Ç¤·¤ç¤¦.
¸¦µæ¤ÎÌÜŪ¤Ë¤â¤è¤ê¤Þ¤¹¤¬,¿½ÅÈæ³Ó¤ò¹Í¤¨¤ëÁ°¤Ë¥â¥Ç¥ëÁªÂò(ÊÑ¿ôÁªÂò)¤ò¹Ô¤¦¤Ù¤¤Ç¤Ï¡©ÀâÌÀÊÑ¿ô¤òÁ´¤ÆÅêÆþ¤·¤¿¥â¥Ç¥ë¤òºîÀ®¤·¤Æ,stepAIC()´Ø¿ô¤ò»È¤¨¤Ð,AIC¤Ë¤è¤ë¥â¥Ç¥ëÁªÂò¤ò¹Ô¤¦¤³¤È¤¬¤Ç¤¤Þ¤¹.
library(MASS)
GLM <- glm(cbind(Dis, Health) ~ PL + TRT + REP, family=binomial(logit), data=Dataset)
stepAIC(GLM)
¿½ÅÈæ³Ó¤Ï,¤É¤¦¤¤¤¦¥â¥Ç¥ë¤¬ÁªÂò¤µ¤ì¤ë¤«,¤Ï¤¿¤µ¤ó¤¬²¿¤È²¿¤òÈæ³Ó¤·¤¿¤¤¤«,¤Ë¤è¤ë¤È»×¤¤¤Þ¤¹.ɬ¤º¤·¤â9¶èÁíÅö¤¿¤ê¤Î¸¡Äê¤ò¹Ô¤¦É¬ÍפϤʤ¤¤Ç¤·¤ç¤¦.
¡ä3»î¸³¾ì½ê¤Ç¤Î¥Ö¥í¥Ã¥¯¡ÊREP)ÈÖ¹æ¤Ï¡¤°Ê²¼¤Î¤è¤¦¤ËÊѹ¹¤¹¤ë¤È¤¤¤¦¤³¤È¤Ç¤·¤ç¤¦¤«¡©
¤½¤ÎÄ̤ê¤Ç¤¹.°Û¤Ê¤ë»î¸³¾ì½ê¤ËƱ¤¸¥Ö¥í¥Ã¥¯ÈÖ¹æ¤òÉÕ¤±¤ë¤È,¡ÖƱ¤¸¡×¥Ö¥í¥Ã¥¯¤È¤·¤Æ½èÍý¤µ¤ì¤Æ¤·¤Þ¤¤¤Þ¤¹.
No.08752¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡Ú¤Ï¤¿¡Û¡¡2008/12/25(Thu) 19:14
ÃΤ俤«¤Ö¤ê¡¡ÍÍ
¤´¶µ¼¨¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
¡¡¤³¤Î»î¸³¤Ç¤Ï¡¤Êà¾ì¤Ç¤Î¤Ð¤é¤Ä¤¤ò¹Íθ ¤·¡¤Á°ºî¤Ç¤Î´ÉÍýÊýË¡¡ÊTRT¡§3¿å½à)¤Î°ã¤¤¤Ë¤è¤ê¡¤¸åºî¤Î¿¢Êª¤Îȯɤ¬¾¯¤Ê¤¯¤Ê¤ë¤Î¤«¡£¤Þ¤¿È¯É¤ò¾¯¤Ê¤¯¤µ¤»¤ë¤¿¤á¤Ë¤Ï¡¤¤É¤Î´ÉÍýÊýË¡¤òÁªÂò¤¹¤Ù¤¤« ¤òÌÀ¤é¤«¤Ë¤·¤¿¤¤¤È»×¤Ã¤Æ¤ª¤ê¤Þ¤¹¡£¤µ¤é¤Ë¡¤É¸¹â¤¬°Û¤Ê¤Ã¤Æ¤âƱÍͤʤ³¤È¡Ê°ÂÄꤷ¤¿¸ú²Ì¡Ë¤¬¸À¤¨¤ë¤«¤È¤¤¤¦¤³¤È¤Ç¤¹¡£
¡¡3»î¸³¾ì½ê¤Ç¤Î ¥Ç¡¼¥¿¤Ë¤Ä¤¤¤ÆÀâÌÀÊÑ¿ô¡ÊPL¡¤TRT¡¤REP)¤òÁ´¤ÆÅêÆþ¤·¤¿¥â¥Ç¥ë¤Ë¤ª¤¤¤Æ¡¤´Ø¿ôstepAIC()¤ò¹Ô¤¦¤È¡¤TRT¡ÜREP¤òÀâÌÀÊÑ¿ô¤È¤·¤¿¥â¥Ç¥ë ¤¬ÁªÂò¤µ¤ì¤Þ¤·¤¿¡£¤Þ¤¿¡¤Ê¬»¶Ê¬ÀÏɽ¤Ç¤âÀâÌÀÊÑ¿ô¤È¤·¤Æ¡¤²¼µ¤Î¤è¤¦¤ËTRT¡¤REP¤½¤ì¤¾¤ì¤¬Í°Õ¤Ç¤¢¤ë·ë²Ì¤È¤Ê¤Ã¤Æ¤¤¤Þ¤¹¡£¤³¤Î¾ì¹ç¡¤TRT¤Î¸ú²Ì¤Ë ¤Ä¤¤¤Æ¿½ÅÈæ³Ó¤ò¹Ô¤¤¤¿¤¤¤È¤³¤í¤Ç¤¹¤¬ÊýË¡¤¬È½¤ê¤Þ¤»¤ó¡£¤Þ¤¿¡¤REP¤Î±Æ¶Á¤âÂ礤¤¤è¤¦¤Ç¤¹¤Î¤Ç¤É¤Î¤è¤¦¤Ë²òÀϤò¿Ê¤á¤Æ¹Ô¤Ã¤¿¤é¤è¤¤¤Î¤«º¤¤Ã¤Æ¤¤¤Þ¤¹¡£ ¤è¤í¤·¤¯¤´¶µ¼¨²¼¤µ¤¤¡£> GLM2 <- stepAIC(GLM)
Start: AIC=139.35
cbind(Dis, Health) ~ PL + TRT + REP
Step: AIC=139.35
cbind(Dis, Health) ~ TRT + REP
Df Deviance AIC48.52 139.35
- TRT 2 118.97 205.80
- REP 8 505.35 580.19
> summary(GLM2)
¾Êά
> Anova(GLM2, type="II")
Anova Table (Type II tests)
Response: cbind(Dis, Health)
LR Chisq Df Pr(>Chisq)
TRT 70.45 2 5.551e-16 ***
REP 456.84 8 < 2.2e-16 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
No.08759¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡ÚÃΤ俤«¤Ö¤ê¡Û¡¡2008/12/25(Thu) 23:59
¡äTRT¡ÜREP¤òÀâÌÀÊÑ¿ô¤È¤·¤¿¥â¥Ç¥ë¤¬ÁªÂò¤µ¤ì¤Þ¤·¤¿¡£
¤È¤¤¤¦¤³¤È¤Ï¡¤PL¤ò¹Íθ¤·¤Ê¤¯¤ÆÎɤ¤¤ï¤±¤Ç¤¹¤«¤é¡¤Á´¤Æ¤Î¥Ç¡¼¥¿¤ò¥×¡¼¥ë¤·¤ÆTRT¤Ë¤Ä¤¤¤Æ¿½ÅÈæ³Ó¤ò¹Ô¤¨¤ÐÎɤ¤¤È»×¤¤¤Þ¤¹¡¥
¿½ÅÈæ³Ó¤Î¶ñÂÎŪ¤Ê¼ê½ç¤Ç¤¹¤¬¡¤TRT¤Î3¿å½à¤Ë¤Ä¤¤¤Æ2¿å½à¤´¤È¤òÁȤ߹ç¤ï¤»¤¿¥Ç¡¼¥¿¥»¥Ã¥È¡Ê3ÁȡˤòºîÀ®¤·¤Æ¡¤¤½¤Î¤½¤ì¤¾¤ì¤Ë¤Ä¤¤¤Æ¡¤¥í¥¸¥¹¥Æ¥£¥Ã¥¯²óµ¢¤ò¹Ô¤¨¤ÐÎɤ¤¤Î¤Ç¤Ï¡¥Anova()¤ÏÎɤ¯¤ï¤«¤é¤Ê¤¤¤Î¤Ç¡¤anova()¤ò»È¤¦¤È¡¤
GLM<-glm(cbind(Dis,Health)~TRT+REP,family=binomial(logit),data=dataset)
GLM.REP<-glm(cbind(Dis,Health)~REP,family=binomial(logit),data=dataset)
anova(GLM,GLM.REP,test="Chisq")
¤È ¤¹¤ì¤Ð¡¤REP¤Î¤ß¤Î¥â¥Ç¥ë¤È¤ÎÈæ³Ó¤Ë¤ª¤¤¤Æ¡¤Åö³º¤Î¥â¥Ç¥ë¤¬Í°Õ¤ËÅö¤Æ¤Ï¤Þ¤ê¤¬Îɤ¤¤«Èݤ«¤Î¸¡Ä꤬¹Ô¤ï¤ì¤Þ¤¹¡ÊÌàÅÙÈ渡Äê¡Ë¡¥TRT¤ò´Þ¤á¤¿¥â¥Ç¥ë¤ÎÊý ¤¬Åö¤Æ¤Ï¤Þ¤ê¤¬Îɤ±¤ì¤Ð¡¤TRT¤Î¿å½à´Ö¤Ë¤Ïº¹¤¬¤¢¤ë¤È¤¤¤¦¤³¤È¤Ç¤¹¡¥¤³¤ì¤ò¾åµ¤Î3ÁȤΥǡ¼¥¿¥»¥Ã¥È¤½¤ì¤¾¤ì¤Ë¤Ä¤¤¤Æ¹Ô¤¤¡¤Bonferroni¤ÇÍ°Õ ¿å½à¤òÄ´À°¤¹¤ì¤ÐÎɤ¤¤È»×¤¤¤Þ¤¹¡Ê¸¡½ÐÎϤò¹â¤á¤¿¤¤¤Î¤Ç¤¢¤ì¤Ð¡¤Holm¤ÎÊýË¡¤Ê¤É¤ò»È¤¦¡¥¤Þ¤¢¡¤Â纹¤Ï¤Ê¤¤¤È»×¤¤¤Þ¤¹¤¬¡Ë¡¥
No.08767¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡Ú¤Ï¤¿¡Û¡¡2008/12/26(Fri) 17:56
ÃΤ俤«¤Ö¤ê¡¡ÍÍ
¡¡ÃúÇ«¤Ë¤´ÀâÌÀ¤¤¤¿¤À¤¤¢¤ê¤¬¤È¤¦¤´¤¶¤¤¤Þ¤¹¡£
¡¡¤´¶µ¼¨¤¤¤¿¤À¤¤¤¿ÊýË¡¤ò¤ä¤Ã¤Æ¤ß¤Þ¤·¤¿¡£¤Þ¤¿¡¤ÌàÅÙÈ渡Äê¤È¤¤¤¦ÍѸ줬½Ð¤Æ¤¤Þ¤·¤¿¤Î¤Ç¡¤¤½¤ì¤ò¤¬¤«¤ê¤ËÄ´¤Ù¤Þ¤¹¤ÈÃæß·ÀèÀ¸¤ÎÃø½ñ¡ÖR¤Ë¤è¤ëÊÝ·ò°åÎťǡ¼¥¿²òÀϱ齬¡×¤ÎÃæ¤Ë¤âÌàÅÙÈ渡Äê¤È¤·¤Æ°Ê²¼¤ÎÊýË¡2¤¬¼¨¤µ¤ì¤Æ¤¤¤Þ¤·¤¿¤Î¤Ç»î¤·¤Ë¹Ô¤Ã¤Æ¤ß¤Þ¤·¤¿¡£
¡¡¤È¤â¤ËÍ°Õ¿å½à5%¤è¤ê¾®¤µ¤¤ÃͤǤ¢¤ë¤³¤È¤«¤é¡¤µ¢Ìµ²¾À⤬´þµÑ¤µ¤ì¤ÆREP¤Î¤ß¤è¤ê¤âTRT+REP¤Î¥â¥Ç¥ë¤¬ÁªÂò¤µ¤ì¡¤TRT¤Î¿å½à´Ö¤ÎÈæ³Ó¤Ë°Ü¹Ô¤Ç¤¤ë¤ï¤±¤Ç¤¹¤Í¡£
¡¡ ¤³¤ÎÌàÅÙÈ渡Äê¤Î2ÊýË¡¤ÏƱ¤¸¤Ë»ÈÍѤǤ¤ë¤È¹Í¤¨¤Æ¤è¤í¤·¤¤¤Ç¤·¤ç¤¦¤«¡©°ìÈ̲½Àþ·Á¥â¥Ç¥ë¤Ï½é¤á¤Æ¤Ê¤Î¤Ç¤¹¤¬¡¤ÌàÅÙÈ渡Äê¤Ë¤Ä¤¤¤Æ¤ÏÊ£¿ô¤Î¤ä¤êÊý¤¬¤¢¤ë¤Î ¤Ç¤¹¤Í¡£¤Þ¤¿¡¤ÊÑ¿ôÁªÂò¤ËÍѤ¤¤¿stepAIC¡Ê¡Ë´Ø¿ô¤Ï¡¤REP¤Î¤ß¤Ç¤ÏAIC¤¬Â礤¯¤Ê¤ê¡¤ÁªÂò¤µ¤ì¤Ê¤«¤Ã¤¿·ë²Ì¤È¹Í¤¨¡¤º£²ó¤Î¤è¤¦¤Ê¾ìÌ̤Ǥâ»ÈÍÑ¤Ç ¤¤ë¤È¹Í¤¨¤ë¤³¤È¤Ï̵Íý¤Ê¤Î¤Ç¤·¤ç¤¦¤«¡©ÊýË¡1
> GLM<-glm(cbind(Dis,Health)~TRT+REP,family=binomial(logit),data=Dataset)
> GLM.REP<-glm(cbind(Dis,Health)~REP,family=binomial(logit),data=Dataset)
> anova(GLM,GLM.REP,test="Chisq")
Analysis of Deviance Table
Model 1: cbind(Dis, Health) ~ TRT + REP
Model 2: cbind(Dis, Health) ~ REP
Resid. Df Resid. Dev Df Deviance P(>|Chi|)
1 24 529.47
2 25 534.57 -1 -5.09 0.02
ÊýË¡2
> GLM<-glm(cbind(Dis,Health)~TRT+REP,family=binomial(logit),data=Dataset)
> GLM.REP<-glm(cbind(Dis,Health)~REP,family=binomial(logit),data=Dataset)
> lambda <- -2*(logLik(GLM.REP)-logLik(GLM))
> 1-pchisq(lambda,1)
'log Lik.' 0.02400585 (df=2)
No.08768¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡ÚÃΤ俤«¤Ö¤ê¡Û¡¡2008/12/27(Sat) 00:39
¡ä¤³¤ÎÌàÅÙÈ渡Äê¤Î2ÊýË¡¤ÏƱ¤¸¤Ë»ÈÍѤǤ¤ë¤È¹Í¤¨¤Æ¤è¤í¤·¤¤¤Ç¤·¤ç¤¦¤«¡©
°ã¤Ã¤Æ¤¤¤ë¤è¤¦¤Ë¸«¤¨¤ë¤«¤â¤·¤ì¤Þ¤»¤ó¤¬¡¤¤É¤Á¤é¤ÎÊýË¡¤â¤ä¤Ã¤Æ¤¤¤ë¤³¤È¤ÏƱ¤¸¡¥anova()¤ò»È¤¦¤È´Ø¿ôÆâÉô¤Ç²¿¤ò¤·¤Æ¤¤¤ë¤«¸«¤¨¤Ê¤¤¤À¤±¤Ç¤¹¡¥
anova(GLM,GLM.REP,test="Chisq")$P[2]
¤È¤¹¤ì¤Ð¡¤PÃͤÀ¤±¤¬½ÐÎϤµ¤ì¤Þ¤¹¤¬¡¤ÊýË¡2¤ÎÃͤÈÁ´¤¯Æ±¤¸¤Ë¤Ê¤ë¤Ï¤º¤Ç¤¹¡¥
¡äÊÑ¿ôÁªÂò¤ËÍѤ¤¤¿stepAIC¡Ê¡Ë´Ø¿ô¤Ï¡¤REP¤Î¤ß¤Ç¤ÏAIC¤¬Â礤¯¤Ê¤ê¡¤ÁªÂò¤µ¤ì¤Ê¤«¤Ã¤¿·ë²Ì¤È¹Í¤¨¡¤º£²ó¤Î¤è¤¦¤Ê¾ìÌ̤Ǥâ»ÈÍѤǤ¤ë¤È¹Í¤¨¤ë¤³¤È¤Ï̵Íý¤Ê¤Î¤Ç¤·¤ç¤¦¤«¡©
¡Ö¸¡Äê¡×¤Ë¤³¤À¤ï¤é¤Ê¤¤¤Î¤Ç¤¢¤ì¤Ð¡¤Á´¤Æ¡Ö¥â¥Ç¥ëÁªÂò¡×¤È¤¤¤¦¥Æ¤â¤¢¤ê¤Þ¤¹¡¥¾Ü¤·¤¯¤Ï¡¤¤³¤Á¤é¤ò¡¥
http://hosho.ees.hokudai.ac.jp/~kubo/ce/2004/kubo/kuboJES2004.pdf
http://hosho.ees.hokudai.ac.jp/~kubo/ce/2004/kubo/R.html
No.08794¡¡Re: È¿Éü¤¬¤¢¤ë¿·²¤ÎÈæΨ¤Îº¹¤Î¸¡Äê¤Ë¤Ä¤¤¤Æ¡¡¡¡¡Ú¤Ï¤¿¡Û¡¡2008/12/29(Mon) 03:39
¾Ò²ð¤¤¤¿¤À¤¤¤¿¥µ¥¤¥È¤Ï¤¿¤¤¤Ø¤ó»²¹Í¤Ë¤Ê¤ê¤Þ¤·¤¿¡£
¤µ¤Æ¡¤TRT2¿å½à¤ÎÁȤ߹ç¤ï¤»3Ä̤ê¤Ç°Ê²¼¤ò¼Â»Ü¤·¤Æ¤ß¤Þ¤·¤¿¡£> GLM<-glm(cbind(Dis,Health)~TRT+REP,family=binomial(logit),data=Dataset)¥Ü¥ó¥Õ¥§¥í¡¼¥Ë¤ÎÊýË¡¤Ë¤è¤ëÍ°Õ¿å½à¤ÎÊäÀµ(Á´ÂΦÁ=0.05¤Þ¤¿¤Ï0.01¡¤Áí¸¡Äê¿ô3²ó¡Ë
> GLM.REP<-glm(cbind(Dis,Health)~REP,family=binomial(logit),data=Dataset)
> anova(GLM,GLM.REP,test="Chisq")
Analysis of Deviance Table
Model 1: cbind(Dis, Health) ~ TRT + REP
Model 2: cbind(Dis, Health) ~ REP
TRT¿å½à(1,2)¤Î¾ì¹ç
Resid. Df Resid. Dev Df Deviance P(>|Chi|)
1 15 336.45
2 16 379.71 -1 -43.26 4.789e-11
TRT¿å½à(1,3)¤Î¾ì¹ç
Resid. Df Resid. Dev Df Deviance P(>|Chi|)
1 15 239.361
2 16 245.161 -1 -5.800 0.016
TRT¿å½à(2,3)¤Î¾ì¹ç
Resid. Df Resid. Dev Df Deviance P(>|Chi|)
1 15 403.28
2 16 420.41 -1 -17.13 3.483e-05
¡¡¡¡¡¡ÊäÀµ¤·¤¿Í°Õ¿å½à¤Ï3Áȶ¦ÄÌ¤Ç ¦Á=0.05/3=0.0167¡¤¦Á=0.01/3=0.0033TRT¿å½à(1,2) p=4.789e-11 **¡¡¢ª¡¡TRT¿å½à1¤È2¤Î´Ö¤Ëº¹¤¬¤¢¤ë¤È¤¤¤Ã¤¿Íý²ò¤Ç¤è¤¤¤Ç¤·¤ç¤¦¤«¡©
TRT¿å½à(1,3) p=0.016 *¡¡ ¢ª¡¡TRT¿å½à1¤È3¤Î´Ö¤Ëº¹¤¬¤¢¤ë¡ÊÈù̯?¡Ë
TRT¿å½à(2,3) p=3.483e-05 **¡¡¢ª¡¡TRT¿å½à2¤È3¤Î´Ö¤Ëº¹¤¬¤¢¤ë
¡¡ ºÇ½é¤ÎÁ´ÀâÌÀÊÑ¿ô¤òÅêÆþ¤·¤¿¥í¥¸¥¹¥Æ¥£¥Ã¥¯²óµ¢¤Ë¤ª¤¤¤Æ¡¤»î¸³¾ì½êPL¤¬ÁȤ߹þ¤Þ¤ì¤Þ¤»¤ó¤Ç¤·¤¿¤¬¡¤¥Ç¡¼¥¿¤ò¸«¤ë¤È3²Õ½ê¤Î¤¦¤Á1²Õ½ê¤Ï¾¤Î¾ì½ê¤È°ã¤¤¡¤ ³Æ¶è¤È¤â¤Û¤Ü100%¤¬È¯É¤·¤Æ¤¤¤ë¾õÂ֤Ǥ¹¡£¤³¤Î1²Õ½ê¤ò½ü¤¤¤ÆTRT¤Î¸ú²Ì¤òºÆ¸¡Æ¤¤·¤Æ¤ß¤ëɬÍפ¬¤¢¤ë¤È¤â¹Í¤¨¤é¤ì¤Þ¤¹¤¬¡¤¾¡¼ê¤Ë½ü¤¯¤Î¤Ç¤Ï¤Ê¤¯¡¤²¿ ¤«Ê¬Î¥¤·¤Æ¹Í¤¨¤ë¤Ù¤º¬µò¤ò¼¨¤·¤ÆÀè¤Ë¿Ê¤á¤ëÊýË¡¤Ï¤¢¤ë¤Î¤Ç¤·¤ç¤¦¤«¡©¾Ò²ð¤¤¤¿¤À¤¤¤¿¥µ¥¤¥È¤Ç¤Ï°ìÈ̲½Àþ·Áº®¹ç¥â¥Ç¥ë¤Ï¾ì½ê¤Îº¹¤ò¥â¥Ç¥ë¤ËÁȤ߹þ¤ó¤ÇÀâÌÀ ¤Ç¤¤ë¤è¤¦¤Ê¤Î¤Ç¤¹¤¬¡¤º£²ó¤Î¤è¤¦¤Ê¾ìÌ̤ÇŬÍѤǤ¤ë¤Ç¤·¤ç¤¦¤«¡©
¡ü ¡ÖÅý·×³Ø´ØÏ¢¤Ê¤ó¤Ç¤â¤¢¤ê¡×¤Î²áµî¥í¥°--- 042 ¤ÎÌܼ¡¤Ø¥¸¥ã¥ó¥×
¡ü ¡ÖÅý·×³Ø´ØÏ¢¤Ê¤ó¤Ç¤â¤¢¤ê¡×¤ÎÌܼ¡¤Ø¥¸¥ã¥ó¥×
¡ü ľÁ°¤Î¥Ú¡¼¥¸¤ØÌá¤ë