Populates the $random_effects slot inside each species entry of an
ipm_parameters object. Engines (lambda(), project())
default to c(0, 0, 0) for any species whose slot is NULL.
Arguments
- pars
An
ipm_parametersobject.- values
A numeric vector of length 3 (growth, survival, recruitment offsets), applied to all species named in
species; or a named list keyed by species ID, each element a numeric vector of length 3.- species
Character vector of species IDs. Used only when
valuesis a numeric vector; ignored whenvaluesis a named list. IfNULLandvaluesis a numeric vector, applies to all species.
Examples
df <- data.frame(size_mm = c(150, 200, 350),
species_id = "ABIBAL",
plot_size = 1000)
s <- stand(df)
mod <- species_model(s)
pars <- parameters(mod, draw = "mean")
pars2 <- set_random_effects(pars, values = c(0, 0, 0))