Fit models and compute the log marginal likelihood for all clusters
Source:R/model-inla.R
log_mlik_all.RdFit the specified INLA model to each cluster and compute the log marginal likelihood for each cluster specified in the membership vector.
Arguments
- membership
Integer, character or factor vector indicating the cluster membership for each spatial unit.
- data
A long-format data frame as returned by
filter_df(), with columnsid(flat array position),ids(flat spatial position),sid(valid-cell rank, 1 to n_valid, matchingmembershipindices), observation index columns (id_<dimname>), and all response/covariate variables.- correction
Logical value indicating whether a correction for dispersion.
- detailed
Logical value indicating whether to return the INLA model instead of the log marginal likelihood. The argument
correctionis not applied in this case.- inla_args
A named list or pairlist of arguments passed to
inla()(e.g.formula,family,E).