weight_allom: Attribute weights to equations

Description Usage Arguments Details Value See Also Examples

View source: R/weight_allom.R

Description

This function attributes a weight to each equation based on its sampling size, and taxonomic and climatic similarity with the species/site combination considered.

Usage

1
2
3
4
5
6
7
8
weight_allom(
  genus,
  coords,
  species = NULL,
  new_eqtable = NULL,
  wna = 0.1,
  w95 = 500
)

Arguments

genus

a character value, containing the genus (e.g. "Quercus") of the tree.

coords

a numeric vector of length 2 with longitude and latitude.

species

a character vector (same length as genus), containing the species (e.g. "rubra") of the tree. Default is NULL, when no species identification is available.

new_eqtable

Optional. An equation table created with the new_equations() function.

wna

a numeric vector, this parameter is used in the weight_allom() function to determine the sample-size related weights attributed to equations without a specified sample size. Default is 0.1.

w95

a numeric vector, this parameter is used to determine the value at which the sample-size-related weight reaches 95% of its maximum value (max=1). Default is 500.

Details

Each equation is given a weight by the function weight_allom(), calculated as the product of the following components:

(1) sample-size weight, calculated as:

1-exp(-n*(log(20)/w95))

where n is the sample size of the equation; the weight given to equations with no sample size information is determined by argument wna (0.1 by default).

(2) climate weight, based on the similarity between the climatic conditions of the equation site and the target location, using the three-letter system of Koppen's climate scheme. Climate weights associated with each combination of two Koppen climates are provided in data("koppenMatrix"). The resulting weight has a value between 1e-6 (different climate groups) and 1 (exactly the same climate classification). When an equation was calibrated with trees from several locations with different Koppen climates, the maximum value out of all pairwise equation-site climate weights is used.

(3) taxonomic weight: equal to 1 for same species equations, 0.8 for same genus equations, 0.5 for same family equations and for equations calibrated for the same broad functional or taxonomic group (e.g. shrubs, conifers, angiosperms). All other equations are given a low taxonomic weight of 1e-6: these equations will have a significant relative weight in the final prediction only when no other more specific equation is available.

Value

A named "numeric" vector with one weight for each equation.

See Also

get_biomass(), new_equations().

Examples

1
2
3
4
5
6
7
x <- weight_allom(
  genus = "Acer",
  species = "negundo",
  coords = c(-78.2, 38.9)
)
str(x)
head(x)

forestgeo/allodb documentation built on Oct. 25, 2021, 9:33 p.m.