rdeltanci: The deltaNCI distribution

Description Usage Arguments Value Examples

View source: R/rdeltanci.R

Description

Random generator of deltaNCI based on a proability p to be negative used in a Bernoulli distribution. Negative deltaNCI follow an exponential distribution of parameter lambda. Positive deltaNCI follow a lognormal distribution of parameters mu and sigma. Default parameters correspond to values inferred in the control and biodiversity plots of Paracou.

Usage

1
2
3
4
5
6
7
8
rdeltanci(
  NCI = rnorm(1, mean = 122.73, sd = 25.806),
  alpha = -1.32,
  beta = 0.003,
  mu = 0.749,
  sigma = 2.651,
  lambda = 0.31
)

Arguments

NCI

double. Vector of previous NCI (size of the vector determines number of generated deltaNCI).

alpha

double. Intercept for the Bernoulli distribution determining the risk to have a negative deltaNCI.

beta

double. Slope of previous NCI for the Bernoulli distribution determining the risk to have a negative deltaNCI.

mu

double. mu parameter for the lognormal distribution used for positive deltaNCI.

sigma

double. sigma parameter for the lognormal distribution used for positive deltaNCI.

lambda

double. lambda parameter for the exponential distribution used for negative deltaNCI.

Value

A vector of n generated delta nci.

Examples

1

sylvainschmitt/ecoevosimulator documentation built on Nov. 19, 2020, 8:04 a.m.