LV_er_lambdacov_global_effectcov_global_responsecov_global: Effect response Lotka-Volterra model with covariate effects...

View source: R/LV_er_lambdacov_global_effectcov_global_responsecov_global.R

LV_er_lambdacov_global_effectcov_global_responsecov_globalR Documentation

Effect response Lotka-Volterra model with covariate effects on lambda, effect, and response

Description

Note that, as e and r are not pair-specific, all species parameters are fit in the same function.

Usage

LV_er_lambdacov_global_effectcov_global_responsecov_global(
  par,
  fitness,
  target,
  density,
  covariates,
  fixed_parameters
)

Arguments

par

1d vector with initial parameters in the order: lambda,lambda_cov,effect,effect_cov,response,response_cov,sigma

fitness

1d vector with fitness observations

target

matrix with species in rows, observations in columns. Value is 1 if a species is focal for a given observation, 0 otherwise.

density

matrix with species in rows, observations in columns. Value is density of each sp as neighbour for each observation.

covariates

numeric dataframe or matrix with observations in rows and covariates in columns. Each cell is the value of a covariate in a given observation

fixed_parameters

optional list specifying values of fixed parameters, with components "lambda","lambda_cov","effect","effect_cov", "response","response_cov".

Value

log-likelihood value


cxr documentation built on Oct. 27, 2023, 1:08 a.m.