This function computes the likelihood associated to a specific set of parameters, i.e. a specific. Note that the parameters included determine the ecological processes considered.

getLikelihood(pars, obs, zero_infl = FALSE, neigh = NULL,
  disp = NULL, favo = NULL, SDBH = NULL, kernel = "kern_lognormal",
  pstr = NA, ppz = NA, pscal = NA, pshap = NA, pfav = NA,
  pneigh = NA, quiet = TRUE, record = NULL)

Arguments

pars

vector of parameters values.

obs

vector of observations of recruitment for each plots of the stand.

zero_infl

a logical. If TRUE then a zero-inflated poisson distribution is used, otherwise a poisson distribution is used.

neigh

a vector of the size of obs describing the surrounding neighborhood. If NULL (the default setting) then neighborhood is not included in the model.

disp

a vector of the size of obs of the surrounding trees of the focal species where seeds may be dispersed from. If NULL then dispersal is not included in the model.

favo

a vector of the size of obs describing the composition of all parcel. If NULL then the soil favourability is not included in the model.

SDBH

a numeric vector of standardized DBH (Diameter at breast heights).

kernel

a character string indicating which kernel should be used (either diskers::kern_lognormal() or diskers::kern_exponential_power().

pstr

position of parameter str in the vector of parameter values.

ppz

position of pz parameter within the vector of parameter values.

pscal

position of the scale parameter (of the dispersal kernel) within the vector of parameter values.

pshap

the position of the shape parameter (of the dispersal kernel) within the vector of parameter values.

pfav

the position of the five favourability values within the vector of parameter values.

pneigh

position of the parameter associated to the neighborhood effect in the vector of parameter values.

quiet

a logical. If FALSE then parameters and likelihood estimations are printed.

record

a connection, or a character string naming the file to print to. If NULL then this step is skipped.

Value

The log-likelihood values associated to a given set of parameters.

Details

The parameter pz have a value even if it is not included in the analysis (meaning a poisson distribution is used).