# 一种简单易行的方差分解方法

Y=b0+b1*x1+b2*x2+…

Y=b0+b1*x1

Y=b0+b1*standard_x

SD(Y) = SD(b1*standard_x) = b1*SD(standard_x)

SD(standard_x) = 1

SD(Y) = SD(b1*standard_x) = b1*SD(standard_x) = b1*1 = b1

Y=b0+b1*x1+b2*x2+b3*x3+…

案例来源(Gross et al. 2017,  PNAS)

mod12<-lm(logM5 ~ LAT + SINLONG + COSLONG +

ARIDITY + SLO + SAND + PH + I(PH^2) + ELEVATION+

CWM_logSLA + I(CWM_logSLA^2)+ CWV_logSLA + I(CWV_logSLA^2) +  CWS_logSLA + CWK_logSLA + I(CWK_logSLA^2) +CWM_logH + I(CWM_logH^2)+ CWV_logH + I(CWV_logH^2) +  CWS_logH + CWK_logH + I(CWK_logH^2) +

SR ,  data=datatotal)

########模型选择

dd12<-dredge(mod12,  subset = ~ LAT & SINLONG & COSLONG & ARIDITY & SLO & SAND & PH &SR & ELEVATION & dc(CWM_logSLA, I(CWM_logSLA^2)) & dc(CWV_logSLA, I(CWV_logSLA^2)) & dc(CWK_logSLA, I(CWK_logSLA^2)) & dc(CWM_logH, I(CWM_logH^2)) & dc(CWV_logH, I(CWV_logH^2)) & dc(CWK_logH, I(CWK_logH^2)),  options(na.action = "na.fail"))

######提取最优模型集, 以AIC值差值小于2为临界点

subset(dd12, delta<2)

de12<-model.avg(dd12,  subset = delta < 2)

summary(de12)

原图结果                                                                      重现结果

100%结果完全一样（细节大家自己调吧,  我要哄娃,  就不费这劲了）！

########求各类型参数贡献的百分比

d1<-summary(de12)

d2<-d1\$coefficients

d3<-d2[1, ]

d4<-d3[c(2:22)]

d5<-abs(d4)

sum(d5)

Richness的贡献为：

1)     García-Palacios,  P.,  N. Gross,  J. Gaitán,  and F. T. Maestre. 2018. Climate mediates the biodiversity–ecosystem stability relationship globally. Proceedings of the National Academy of Sciences.

2)     Gross,  N.,  Y. L. Bagousse-Pinguet,  P. Liancourt,  M. Berdugo,  N. J. Gotelli,  and F. T. Maestre. 2017. Functional trait diversity maximizes ecosystem multifunctionality. Nature Ecology &Amp; Evolution 1:0132.

3)     Le Provost,  G.,  I. Badenhausser,  Y. Le Bagousse-Pinguet,  Y. Clough,  L. Henckel,  C. Violle,  V. Bretagnolle,  M. Roncoroni,  P. Manning,  and N. Gross. 2020. Land-use history impacts functional diversity across multiple trophic groups. Proceedings of the National Academy of Sciences 117:1573-1579.

4)     Sirami,  C.,  N. Gross,  A. B. Baillod,  C. Bertrand,  R. Carrié,  A. Hass,  L. Henckel,  P. Miguet,  C. Vuillot,  A. Alignier,  J. Girard,  P. Batáry,  Y. Clough,  C. Violle,  D. Giralt,  G. Bota,  I. Badenhausser,  G. Lefebvre,  B. Gauffre,  A. Vialatte,  F. Calatayud,  A. Gil-Tena,  L. Tischendorf,  S. Mitchell,  K. Lindsay,  R. Georges,  S. Hilaire,  J. Recasens,  X. O. Solé-Senan,  I. Robleño,  J. Bosch,  J. A. Barrientos,  A. Ricarte,  M. á. Marcos-Garcia,  J. Miñano,  R. Mathevet,  A. Gibon,  J. Baudry,  G. Balent,  B. Poulin,  F. Burel,  T. Tscharntke,  V. Bretagnolle,  G. Siriwardena,  A. Ouin,  L. Brotons,  J.-L. Martin,  and L. Fahrig. 2019. Increasing crop heterogeneity enhances multitrophic diversity across agricultural regions. Proceedings of the National Academy of Sciences 116:16442-16447.

https://blog.sciencenet.cn/blog-3442043-1253775.html

## 全部精选博文导读

GMT+8, 2024-4-14 13:31