getIndices
Generates a variety of indices describing multifunctionality based on
the number of functions greater than a threshold for many different threshold and coefficients describing
the relationship between diversity and number of functoins greater than a threshold.
getIndices(
slopedata,
threshdata,
eqn,
fun = stats::glm,
divvar = "Diversity",
groupVar = "thresholds",
showNfunc = T
)
A data frame with slopes of the relationship between diversity and number of functions greather than or equal to a threshold
from getCoefTab
.
A data frame with the number of functions greater than a threshold for each plot at each threshold from getFuncsMaxed
.
The formula used for fitting the models in slopedata.
The function used to refit the threshold data at key points to get intercepts, etc., that are needed for the table.
The name of the variable that has the measure of diversity or other driver in the threshdata data frame.
The name of a variable by which data is grouped in the threshdata data frame. Typically "thresholds" from getFuncsMaxed
.
Show the functions at Tmin, Tmax, and Tmde. Defaults to TRUE.
A data frame of indices
See Byrnes et al. In Review.
if (FALSE) {
data(all_biodepth)
allVars <- qw(biomassY3, root3, N.g.m2, light3, N.Soil, wood3, cotton3)
germany <- subset(all_biodepth, all_biodepth$location == "Germany")
vars <- whichVars(germany, allVars)
germanyThresh <- getFuncsMaxed(germany, vars,
threshmin = 0.05,
threshmax = 0.99, prepend = c("plot", "Diversity"), maxN = 7
)
germanyLinearSlopes <- getCoefTab(funcMaxed ~ Diversity,
data = germanyThresh,
coefVar = "Diversity", family = quasipoisson(link = "identity")
)
getIndices(germanyLinearSlopes, germanyThresh, funcMaxed ~ Diversity)
}