Learn R Programming

modelbased (version 0.5.0)

reshape_draws: Reshape estimations with Bayesian posterior draws to long format

Description

Reshape data.frame of estimations with Bayesian posterior draws to long format.

Usage

reshape_draws(draws)

Arguments

draws

data.frame containing posterior draws obtained from estimate_response or estimate_link.

Value

Data frame of reshaped draws in long format.

Examples

Run this code
# NOT RUN {
if (require("rstanarm")) {
  model <- stan_glm(Sepal.Width ~ Species * Petal.Length, data = iris)
  estimates <- estimate_response(model, keep_draws = TRUE, draws = 200)
  reshape_draws(estimates)
}
# }

Run the code above in your browser using DataLab