# kernel: Competition Kernel Functions In siplab: Spatial Individual-Plant Modelling

## Description

Functions representing the effect of a competitor on a subject plant, depending on distance and plant marks. For use in `pairwise`.

## Usage

 ```1 2 3 4 5 6 7 8``` ```powers.ker(imarks, jmarks, dists, dranks, par = list(pi=1, pj=1, pr=1, smark = 1)) staebler.ker(imarks, jmarks, dists, dranks, par = list(k=0.1, p=1, smark=1)) spurr.ker(imarks, jmarks, dists, dranks, par = list(type=1, smark=1)) ```

## Arguments

 `imarks` Marks for the subject plant, a 1-row data frame. `jmarks` Data frame with marks for competitors `dists` Vector of distances between the subject plant and the competitors. `dranks` Distance ranks. `par` List of parameters.

## Details

The values of `par` must be given in the argument `kerpar` of `pairwise`, they are shown here as examples.

`smark` in `par` indicates the location of the plant size variable in `marks`. It can be a data frame column number, or a string id like "dbh".

Competition kernels seem to be limited only by the researchers imagination. `powers.ker` is a general form that includes many examples from the literature. If Si is the size of the subject plant, Sj the size of the competitor, and R is the distance between them, this kernel is (Sj^pj / Si^pi) / R^pr. For instance, the popular Hegyi's index corresponds to `pi=1, pj=1, pr=1`. This and other examples could be coded directly if computational efficiency is important.

`staebler.ker` is the width of the overlap of zones of influence (ZOI), used by Staebler in 1951. Assumes that the ZOI radius is related to size S by k S^p + c.

`spurr.ker` is an example of an index that depends on distance ranks: equations (9.5a), (9.5b) of Burkhart and Tomé (2012).

## Value

Vector of length equal to the length of `dists`.

Oscar García.

## References

Burkhart, H. E. and Tomé, M. (2012) Modeling Forest Trees and Stands. Springer.

García, O. “Siplab, a spatial individual-based plant modelling system”. Computational Ecology and Software 4(4), 215-222. 2014.

`pairwise`