Get posterior values
get_posterior(
fit = NULL,
data = NULL,
param = c("all", "connectance", "preference", "plant.abund", "animal.abund",
"int.prob", "link")
)
Fitted model (from fit_model()
)
Data list (from prepare_data()
)
character. Name of the parameter to retrieve the posterior samples.
A data frame
if (FALSE) { # interactive()
data(web)
dt <- prepare_data(mat = web, sampl.eff = rep(20, nrow(web)))
fit <- fit_model(dt, refresh = 0)
get_posterior(fit, dt, param = "connectance")
int.prob <- get_posterior(fit, dt, param = "int.prob")
int.prob
int.prob |> tidybayes::mean_qi() # mean edge probability
# all posteriors
get_posterior(fit, dt, param = "all")
}