Hi Tim,
there are two issues to deal with here:
1. How to model the individual species densities.
2. How to construct a "sigma" parameter model that handles
low-prevalence species in a robust way.
For 1., the simplest option is when the same spatial pattern is
assumed for all species, with just a separate Intercept for each
species, but this part can be made much more complex...
In your example code, you're however not modelling the spatial
distribution at all, so you only need separate intercepts to account
for the different relative abundance;
Intercept(species_idx, model = "iid", hyper=list(prec=list(...)))
For 2., one can view the model as a "marked point process, where the
mark influences the detectability". This type of model can be
constructed as a point process on the "product space", which
in your example would be "distance x species". Using the new
"marginal" feature, and without attempting to "borrow strength"
between species:
formula <- distance + species_idx ~ log(hn(distance, sigma)) + Intercept
cmp <- ~
sigma(species_idx,
model = "iid",
hyper=list(prec=list(initial=0, fixed = TRUE)),
marginal = bru_mapper_marginal(qexp, rate = 1 / 8)) +
Intercept(species_idx, model = "iid",
hyper=list(prec=list(initial = -2, fixed = TRUE)))
dfit <- lgcp(
components = cmp,
mexdolphin$points,
domain = list(
distance = fm_mesh_1d(seq(0, 8, length.out = 30)),
species_idx = sort(unique(mexdolphin$points$species_idx))),
formula = formula,
options = list(bru_initial = list(sigma = rep(1, n_species),
Intercept = rep(3, n_species))))
To borrow strength between the sigma parameters, perhaps this?
cmp <- ~
sigma_common(1, prec.linear = 1, marginal =
bru_mapper_marginal(qexp, rate = 1 / 8)) +
sigma_log_factor(species_idx,
model = "iid",
hyper=list(prec=list(initial=0, fixed = FALSE)),
constr = TRUE # For identifiability
) + ...
formula <- distance + species_idx ~ log(hn(distance,
sigma_common*exp(sigma_log_factor))) + Intercept
Finn
> --
> You received this message because you are subscribed to the Google Groups "R-inla discussion group" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to
r-inla-discussion...@googlegroups.com.
> To view this discussion on the web, visit
https://groups.google.com/d/msgid/r-inla-discussion-group/d99ea391-ba31-4c95-b040-b590f3fa213fn%40googlegroups.com.
--
Finn Lindgren
email:
finn.l...@gmail.com