> tree<-read.table("tree.txt",head=T);tree
biomass species soil
1 32 7 0
2 32 8 0
3 32 8 0
4 37 15 3
5 37 15 1
6 37 17 3
7 42 11 8
8 42 28 14
9 42 15 12
10 47 10 10
11 47 12 12
12 47 13 13
13 52 18 18
14 52 19 19
15 52 22 22
> tree.glm<-glm(biomass~species+soil,family="poisson",data=tree)
> summary(tree.glm)
Call:
glm(formula = biomass ~ species + soil, family = "poisson", data = tree)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.4591 -0.3788 0.1119 0.2371 0.5177
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 3.586004 0.116802 30.702 < 2e-16 ***
species -0.005741 0.009559 -0.601 0.548130
soil 0.024686 0.007269 3.396 0.000683 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for poisson family taken to be 1)
Null deviance: 18.0038 on 14 degrees of freedom
Residual deviance: 1.6885 on 12 degrees of freedom
AIC: 91.165
Number of Fisher Scoring iterations: 3
怎样才能做出类似下面的图,请各位不吝赐教,给出详细代码,谢谢


雷达卡



京公网安备 11010802022788号







