dot-tidy_summary: Takes stan summary, returns summary with indices-as-columns.

.tidy_summaryR Documentation

Takes stan summary, returns summary with indices-as-columns.

Description

Creates "tidy" summaries in lieu of the stan rownames.

Usage

.tidy_summary(x, labs = NULL, ...)

Arguments

x

Output of .summarize

labs

The labels for each parameter index. E.g., "predictor", "factor"

...

Optional (but recommended). Mappings for indices. E.g., Index column 1 is replaced by ...[[1]][col1Indices].

Details

.summarize creates an rstan-like summary with rownames, mat[1:R, 1:C]. .tidy_summary(mat, c("rows", "cols")) would then create two new columns, "rows" and "cols" with the indices in them. If arguments are provided in ..., then these indicate the mappings between the indices and labeled values. E.g., .tidy_summary(mat, c("rows", "cols"), c("A", "B"), c("C", "D")) would create two new columns, "rows" and "cols", and replace rows = 1 with rows = A; cols=2 with cols = D, and so on. Useful for going from stan rownames, to labeled columns.

Value

Data frame.

Author(s)

Stephen R. Martin


LMMELSM documentation built on Dec. 28, 2022, 1:32 a.m.