R/log_lik_occupancy.R
log_lik_flocker.RdCompute unit-wise or series-wise log-likelihood matrix for a flocker_fit object
log_lik_flocker(
flocker_fit,
new_data = NULL,
allow_new_levels = FALSE,
sample_new_levels = "uncertainty",
draw_ids = NULL
)A flocker_fit object
optional new data at which to compute log likelihood
allow new levels for random effect terms in 'new_data'? Will error if set to 'FALSE' and new levels are provided in 'new_data'.
If new_data is provided and contains random effect levels not present in the original data, how should predictions be handled? See '?brms::prepare_predictions' for options.
the draw ids to compute log-likelihoods for. Defaults to using the full posterior.
A posterior log-likelihood matrix, where iterations are rows and units, series, or species are columns.
In single-season models, rows are units (e.g. points or species-points; suitable for leave-one-unit-out CV). In multiseason models, rows are series (i.e. points or species-points, suitable for leave-one-series-out CV). In augmented models, rows are species (suitable for leave-one-species-out CV).
if (FALSE) { # \dontrun{
log_lik_flocker(example_flocker_model_single)
} # }