as.data.frame.walker_fit: Coerce Posterior Samples of walker Fit to a Data Frame

View source: R/print_fit.R

as.data.frame.walker_fitR Documentation

Coerce Posterior Samples of walker Fit to a Data Frame

Description

Creates a data.frame object from the output of walker fit.

Usage

## S3 method for class 'walker_fit'
as.data.frame(x, row.names = NULL, optional = FALSE, type, ...)

Arguments

x

An output from walker or walker_glm.

row.names

NULL (default) or a character vector giving the row names for the data frame.

optional

Ignored (part of generic as.data.frame signature).

type

Either tiv (time-invariant parameters) or tv (time-varying coefficients).

...

Ignored.

Examples

## Not run: 
 as.data.frame(fit, "tiv") %>% 
 group_by(variable) %>%
 summarise(mean = mean(value),
           lwr = quantile(value, 0.05),
           upr = quantile(value, 0.95))

## End(Not run)


walker documentation built on Sept. 11, 2023, 5:10 p.m.