tidy_dpp: Prepare tidy data and posterior predictions

View source: R/ui_predictions.R

tidy_dppR Documentation

Prepare tidy data and posterior predictions

Description

This function prepares both tidy data from a model and tidy posterior predictions from a model fit. Having those two tibbles prepared at the same time allows to merge them to ensure that observed data, predicted data and original variables other than observations are all in sync when using y and y_rep objects for bayesplot functions.

Usage

tidy_dpp(model, fit, draw = NULL, cores = NULL)

Arguments

model

A networkModel object.

fit

A networkModelStanfit object.

draw

Integer, number of draws to sample from the posterior.

cores

Number of cores to use for parallel calculations. Default is NULL, which means to use the value stored in options()[["mc.cores"]] (or 1 if this value is not set).

Value

A list with y, y_rep and vars.


isotracer documentation built on Sept. 22, 2023, 1:07 a.m.