efficiency: Efficiency Functions

efficiencyR Documentation

Efficiency Functions

Description

Compute efficiency values depending on distance and plant marks, for use in assimilation().

Note: In previous versions of siplab the function names had .eff in place of _eff.

Usage

flat_eff(dx, dy, marks)

tass_eff(dx, dy, marks, par = list(b = 3.52 * 0.975, c = 6.1,
    smark = 1))

gates_eff(dx, dy, marks, par = list(a = 1, b = 4, smark = 1))

gnomon_eff(dx, dy, marks, par = list(a = 1, b = 4, smark = 1))

power_eff(dx, dy, marks = NULL, par = list(a = 1, b = 0.25, smark = NULL))

Arguments

dx

Vector of x-distances. Coordinates x for a number of points minus coordinate x of the subject plant.

dy

Vector of y-distances. Coordinates y for a number of points minus coordinate y of the subject plant.

marks

Mark data for the subject plant.

par

Optional vector or list of parameters.

Details

The user can program her/his own efficiency function. It must take the arguments dx, dy, marks, and optionally par.

Efficiency function values are normally non-negative. Otherwise, they are set to 0 in assimilation().

The values of par are taken from the argument effpar of assimilation(), if not NULL. Otherwise the default is used.

smark in par must be 1 or “mark” if there is only one mark. If the marks are a data frame, smark must be the number or name of the column with the plant size variable.

flat_eff() returns 1, independently of plant size or distance.

tass_eff(), gates_eff(), and gnomon_eff() are proportional to their influence function counterparts (see influence), scaled to be 1 at the origin.

power_eff() is max{0, 1 - b R^a}, where R = sqrt(dx^2 + dy^2) is the plant-to-point distance. It does not depend on plant size, as in Garcia (2022). On second thoughts, this might make more sense than the functions above. Parameters marks and smarks are ignored.

Value

Vector of efficiency values, of length equal to the length of dx and dy.

Author(s)

Oscar García.

References

https://github.com/ogarciav/siplab

García, O. “A generic approach to spatial individual-based modelling and simulation of plant communities”. Mathematical and Computational Forestry and Nat.-Res. Sci. (MCFNS) 6(1), 36-47. 2014.

García, O. “Plasticity as a link between spatially explicit, distance-independent, and whole-stand forest growth models”. Forest Science 68(1), 1-7. 2022.

See Also

assimilation, influence

Examples

# Example multi-species efficiency function (spruce/hardwoods)
multi_eff <- function (dx, dy, marks, par) {
    out <- numeric(length(dx))
    s <- marks$SPECIES == "Spruce"
    out[s] <- gnomon_eff(dx[s], dy[s], marks[s, ], par=list(a=par$aS,
        b=par$bS, smark=par$smark))
    out[!s] <- gnomon_eff(dx[!s], dy[!s], marks[!s, ], par=list(a=par$aH,
        b=par$bH, smark=par$smark)) # Hardwoods
    return(out)
}

siplab documentation built on March 18, 2022, 6:53 p.m.