Vol. 55 4 275 286 2010 J. Weed Sci. Tech. 275 R : * :,,,, Keywords : generalized linear model, proportion data, binomial distribution, analysis of deviance, likelifood ratio test,,,,,,, 2,, 0 1 0 1,,, Generalized Linear Model, GLM,,GLM RR Development Core Team 2009,,, * 305 8666 3 1 1 toima@affrc.go.jp Toshiyuki Imaizumi : An introductory guide to statistical analysis generalized linear models for proportion data using R. 2010 10 19,,,,, 2010 GLM,,,,, A,GLM, A 1 A,,,, A R, 1, natsua.txt,r R a< read.delim natsua.txt read. delim,
276 Vol. 55 2010 A treatment condition germinated not rate control light 6 19 24.0 control light 9 16 36.0 control light 7 18 28.0 control light 14 9 60.9 control light 7 17 29.2 control light 18 7 72.0 stratification light 17 7 70.8 stratification light 18 6 75.0 stratification light 16 9 64.0 stratification light 18 7 72.0 stratification light 21 6 77.8 stratification light 20 5 80.0 control dark 2 23 8.0 control dark 1 23 4.2 control dark 5 20 20.0 control dark 0 24 0.0 control dark 3 22 12.0 control dark 2 23 8.0 stratification dark 12 12 50.0 stratification dark 15 10 60.0 stratification dark 10 16 38.5 stratification dark 8 16 33.3 stratification dark 6 19 24.0 stratification dark 6 20 23.1 treatment control,stratification, condition light,dark, germinated,not,rate % <,, natsua.txt a a, R,, 1, stratification,light,,glm ControlStratification, light dark 2, 3, 1,, GLM GLM,, GLM,GLM 2010,,,,,,GLM, p x,
: GLM 277, x, p, p 0 1 a+bx p=0,a+bx p=1 /, 1 p,,, p p ln p/ 1 p GLM,,, GLM, R GLM,glm result< glm(cbind(germinated, not)~treatment+ condition+treatment:condition, data=a, family=binomial(link= logit )), GLM, GLM result cbind germinated, not ~treatment+condition+treat ment : condition, germinated not,treat treat mentcondition, treatment : condition cbind germinated, not,,, data=a,, a germinated not treatment condition family=binomial link= logit, binomial link= logit GLM, complementary log log R,link= probit cloglog, complementary log log, 3 Collett 2002, Faraway 2006,,Collett 2002 Dobson 2008 GLM,,,, Snedecor and Cochran 1972,,, GLM,, 0 1,,,, GLM, deviance analysis of deviance
278 Vol. 55 2010,,,,, 2,χ 2 5%,2 2,,, χ 2, χ 2,,F F R, GLM result anova 2 anova(result, test= Chisq ) test= Chisq,χ 2, P > Chi,treatment condition p<0.05, p=0.2299 2 Resid. Dev Residual Deviance,, treatment : condition, 42.253, tretment condition condition, 43.694,condition treatment treatment, 125.837, NULL, 184.738 2, Deviance R, Resid. Dev, Deviance treatment : condition p=0.2299, 1.441 42.253 43.694 χ 2,condition 82.143,treatment 58.901,, 2 Deviance, Type I,Type II,Type III, Type IV 4,1989 anova Type I Type I Type I,,, 2 R,, 2
: GLM 279 = + 2 Type I result< glm cbind germinated, not ~treatment +condition+treatment:condition, data=a, family=binomial link= logit = + 2 Type I result< glm cbind germinated, not ~condition +treatment+treatment:condition, data=a, family=binomial link= logit,,,,, Type II 1989Type II,, 2 R Type II,car, R Anova, 3 library car Anova result, test= LR, type= 2 library car,car Type I Type II Type I = + treatment tre 1 tre 2 58.901 condition con tre tre+con 3 82.143 tre con tre+con tre+con+tre con 4 1.441 = + condition con con 5 73.472 treatment tre con tre+con 67.572 tre con tre+con tre+con+tre con 1.441 Type II = + treatment tre con tre+con 67.572 condition con tre tre+con 82.143 tre con tre+con tre+con+tre con 1.441 = + condition con tre tre+con 82.143 treatment tre con tre+con 67.572 tre con tre+con tre+con+tre con 1.441 1, 2 3 4,, 5
280 Vol. 55 2010 Type II Anova, anova, Anova, test= LR likefood ratio test,anova χ 2 test= Chisq,,χ 2,,,,,,, N y, p 10 2,, p 0.5 0.044,p 0.2 0.302 0<p<1, p p=0.2 4 p 10 N=10 2 6 2, 6,, McCullagh and Nelder 1989, 3 3,,,,McCullagh and Nelder 1989 Dobson 2008 saturated model,, 1, 1 25 6,2 25 9,3 25 7,,24,
: GLM 281,, Σ ij y ij μ i 2,,, maximal model full model,, dispertion parameter, dispertion parameter, dispertion parameter, Everitt and Hothorn 2010,,, =, =1, =1, = 1, =1, =, GLM 2Σ ij y ij log y ij /μ i + m y ij logm y ij / m i 2Σ ij y ij log y ij /μ i y i i μi i,yij i j m, μi μi=m, χ 2,, scaled deviance χ 2 GLM 1,, 3,χ 2, GLM,,,,F Faraway 2006, F, 2, F,test= Chisq test= LR test= F GLM,F, GLM,overdispersion,,,, 5 10, 3.98 7.25 0.398 0.725 2,, 4 7,2 5,2,
282 Vol. 55 2010 10, 3.98 7.25 3.98, 7.25,,summary GLM 6 summary result,glm dispersion parameter, 1 2010 dispersion parameter,, 6 Residual deviance, 42.253, 20, 42.253/20 2.1,,, X 2 X 2,R X 2 sum residuals result, type= pearson ^2 residuals result, type= pearson,result GLM, ^2 2, GLM sum, sum residuals result, type= pearson ^2 X 2 40.668,dispersion parameter X 2 / 40.668/20 2.0dispersion parameter, dispersion parameter
: GLM 283 McCullagh and Nelder 1989Crawley 2008, GLM,dispersion parameter 1.96, 1, 1.96, 0.96,dispersion parameter 1.96 1.96, GLM, GLM dispersion parameter Collett 2002, Faraway 2006 GLM,aod betabin,, McCullagh and Nelder 1989,Collett 2002,dispersion parameter quasi binomial GLM,R GLM,, result2< glm cbind germinated, not ~treatment +condition+treatment:condition, data=a, family=quasibinomial link= logit Anova result2, test= F, type= 2 GLM, family=quasibinomial,f,, quasi poisson GLM GLM, Wiliams 1982,dispmod glm.binomial.disp,,collett 2002 Collett 2002,,,,,, 2, 3,,,complementary log log,,,,,, 2,,,,,,GLM,,,
284 Vol. 55 2010,,,, Rinella and James 2010 GLM, 2010, vs 2,,,, Johnson and Omland 2004, Jasieniuk et al. 2008, 2004,,GLM, GLM,,GLM,,, 49,,,,,, Collett, D. 2002. Modelling Binary Data 2nd Edition. Chapman & Hall/CRC, Boca Raton, pp. 45 101, pp. 195 213. Crawley, M.J. 2008 : R,,,pp. 269 286. Dobson, A.J. 2008 2,,,pp. 81 101. Everitt, B.S. and Hothorn, T. 2010. R 2,,,pp. 123 145. Faraway, J.J. 2006. Extending the Linear Model with R : Generalized Linear, Mixed Effects and Nonparametric Regression Models. Chapman & Hall/CRC, Boca Raton, pp. 25 54, pp. 115 133. Jasieniuk, M., Taper, M.L., Wanger, N.C. Stougaard, R.N. Brelsford, M. and Maxwell, B.D. 2008. Selection of a barley yield model using information theoretic criteria. Weed Sci., 56, 628 636. Johnson and Omland 2004. Model selection in ecology and evolution. Trends Ecol. Evol., 19, 101 108. McCullagh, P., J.A. Nelder 1989. Generalized Linear Models, 2nd Edition. Chapman & Hall, London, pp. 21 47. 2010 GLM 55, 268 274. R Development Core Team 2009. R : A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. ISBN 3 900051 07 0, URL http://www.r project.org. Rinella, M.J. and James, J.J. 2010. Invasive plant researchers should calculate effect sizes, not P values. Invas. Plant Sci. and Manag. 3, 106 112. Snedecor, G.W. and Cochran, W.G. 1972.,,, pp.309 314 2010 R : 55, 287 294. 2004 3,,pp. 1 74. 1989 SAS,,pp. 289 305. Williams, D.A. 1982. Extra binomial variation in logistic linear models. Appl. Statist. 31, 144 148. R,, R,R,R,, R R, 1
: GLM 285,, 1 1, treatment control, condition light, 6, 19, 24% 1,,,, R, NA,,,Type II R,,,R &, read.delim,, read.delim clipboard clipboard " Windows, Mac, read.delim pipe pbpaste txt, xls,, R,,R, R,,, getwd C : /Users/ima/Document,,,,R Console, Mac,, R natsua.txt read.delim natsua. txt,,csv, read.csv natsua.csv R,, R,,,,, R,,,,, R Console,,R Mac,, R,
286 Vol. 55 2010,,,.RData,,R,,,,