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.
tidy_dpp(model, fit, draw = NULL, cores = NULL)
A list with y, y_rep and vars.
A networkModel object.
A networkModelStanfit object.
Integer, number of draws to sample from the posterior.
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).