Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

tidy_to_matrix

Convert from tidy to matrix


Description

Converts from the output of tidy_samples() or pp_eval(fit, samples_format = "tidy") to an N_draws X nrows(newdata) matrix with fitted/predicted values. This format is used y brms and it's useful as yrep in bayesplot::ppc_* functions.

Usage

tidy_to_matrix(samples, returnvar)

Arguments

samples

Samples in tidy format

returnvar

An rlang::sym() object.

Value

An N_draws X nrows(newdata) matrix.

Author(s)

Jonas Kristoffer Lindeløv jonas@lindeloev.dk


mcp

Regression with Multiple Change Points

v0.3.0
GPL-2
Authors
Jonas Kristoffer Lindeløv [aut, cre] (<https://orcid.org/0000-0003-4565-0595>)
Initial release
2020-07-27

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.