stan_summary: Compute a summary table for the posterior samples for a...

Description Usage Arguments Value

View source: R/stan_summary.R

Description

Compute a summary table for the posterior samples for a parameter from a Stan model

Usage

1
2
3
4
5
6
7
8
9
stan_summary(
  from_stan,
  par,
  probs = c(0.5, 0.025, 0.975),
  X = NULL,
  W = NULL,
  B = NULL,
  is_cor = F
)

Arguments

from_stan

A stanfit object from a call to rstan::stan() or rstan::sampling() containing posterior samples from the model.

par

Character string naming the parameter on which to compute the summary table.

probs

Vector of probabilities to show as columns in the summary table.

X

Optional contrast matrix as yielded from get_contrast_matrix() indicating the contrasts passed as data when creating the above stanfit object.

W

Optional contrast matrix as yielded from get_contrast_matrix() indicating the within-subjects contrasts passed as data when creating the above stanfit object. If present, X is ignored and B must be present.

B

Optional contrast matrix as yielded from get_contrast_matrix() indicating the between-subjects contrasts passed as data when creating the above stanfit object. W must be present, else B is ignored.

is_cor

A logical indicating whether the parameter is a correlation matrix. If TRUE, returns only the upper-diagonal entries.

Value

A tibble


mike-lawrence/ezStan documentation built on Dec. 29, 2021, 1:30 a.m.