Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

ecospat.varpart

Variation Partitioning For GLM Or GAM


Description

Perform variance partitioning for binomial GLM or GAM based on the deviance of two groups or predicting variables.

Usage

ecospat.varpart (model.1, model.2, model.12)

Arguments

model.1

GLM / GAM calibrated on the first group of variables.

model.2

GLM / GAM calibrated on the second group of variables.

model.12

GLM / GAM calibrated on all variables from the two groups.

Details

The deviance is calculated with the adjusted geometric mean squared improvement rescaled for a maximum of 1.

Value

Return the four fractions of deviance as in Randin et al. 2009: partial deviance of model 1 and 2, joined deviance and unexplained deviance.

Author(s)

Christophe Randin christophe.randin@unibas.ch, Helene Jaccard and Nigel Gilles Yoccoz

References

Randin, C.F., H. Jaccard, P. Vittoz, N.G. Yoccoz and A. Guisan. 2009. Land use improves spatial predictions of mountain plant abundance but not presence-absence. Journal of Vegetation Science, 20, 996-1008.

Examples

library(rms)
data('ecospat.testData')

# data for Soldanella alpina and Achillea millefolium
data.Solalp<- ecospat.testData[c("Soldanella_alpina","ddeg","mind","srad","slp","topo")]

# glm models for Soldanella alpina

glm.Solalp1 <- glm("Soldanella_alpina ~ pol(ddeg,2) + pol(mind,2) + pol(srad,2)", 
                  data = data.Solalp, family = binomial)
glm.Solalp2 <- glm("Soldanella_alpina ~ pol(slp,2) + pol(topo,2)", 
                  data = data.Solalp, family = binomial)
                  
ecospat.varpart (model.1= glm.Solalp1, model.2= glm.Solalp2, model.12= glm.Solalp2)

ecospat

Spatial Ecology Miscellaneous Methods

v3.2
GPL
Authors
Olivier Broennimann [cre, aut, ctb], Valeria Di Cola [aut, ctb], Blaise Petitpierre [ctb], Frank Breiner [ctb], Daniel Scherrer [ctb], Manuela D`Amen [ctb], Christophe Randin [ctb], Robin Engler [ctb], Wim Hordijk [ctb], Heidi Mod [ctb], Julien Pottier [ctb], Mirko Di Febbraro [ctb], Loic Pellissier [ctb], Dorothea Pio [ctb], Ruben Garcia Mateo [ctb], Anne Dubuis [ctb], Luigi Maiorano [ctb], Achilleas Psomas [ctb], Charlotte Ndiribe [ctb], Nicolas Salamin [ctb], Niklaus Zimmermann [ctb], Antoine Guisan [aut]
Initial release
2021-02-17

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.