add_fitted_sims: Generate fitted simulations from a fit model

View source: R/predict_sims.R

add_fitted_simsR Documentation

Generate fitted simulations from a fit model

Description

Generate simulations from a fit model incorporating either error in fitted error. Simulations explore the possible space of what a model might predict rather than an interval for use in comparison to Bayesian posteriors for non-Bayesian models. The output format and functions draw inspiration from the tidybayes::tidybayes() library and merTools::predictInterval()

Usage

add_fitted_sims(newdata, mod, n_sims = 1000, seed = NULL, ...)

Arguments

newdata

a data.frame of new data to predict

mod

An model to simulate from.

n_sims

number of simulation samples to construct

seed

numeric, optional argument to set seed for simulations

...

Additional arguments to prediction simulation method.


jebyrnes/sinterval documentation built on March 18, 2023, 5:05 a.m.