posterior_summary_inla: Write a summary of posterior distribution using marginals

Description Usage Arguments Details Value Examples

View source: R/summaries.R

Description

Write a summary of posterior distribution using marginals.

Usage

1
posterior_summary_inla(.result, ren = TRUE)

Arguments

.result

inla object.

ren

Rename the variable with rename_brms.

Details

Write a summary of posterior distributions with a format similar to brms::posterior_summary.

Value

Dataframe with summaries.

Examples

1
2
3
4
5
6
7
8
df <- data.frame(
 x1 = rnorm(50, mean = 1, sd = 0.5),
 x2 = rnorm(50, mean = 2, sd = 1),
 sigma = rexp(50, rate = 1))
df$mu <- df$x1 + df$x2
df$y <- rnorm(nrow(df), mean = df$mu, sd = df$sigma)
the_fit <- INLA::inla(formula = y ~ x1 + x2, data = df)
posterior_summary_inla(the_fit)

FrankLef/eflINLA documentation built on Dec. 17, 2021, 8:30 p.m.