Compares model implied density and values to observed, for a ctStanFit object.
ctStanPostPredict(
fit,
diffsize = 1,
jitter = 0.02,
wait = TRUE,
probs = c(0.025, 0.5, 0.975),
datarows = "all",
nsamples = 500,
resolution = 100,
plot = TRUE
)
If plot=FALSE, an array containing quantiles of generated data. If plot=TRUE, nothing, only plots.
if plot=TRUE, nothing is returned and plots are created. Otherwise, a list containing ggplot objects is returned and may be customized as desired.
ctStanFit object.
Integer > 0. Number of discrete time lags to use for data viz.
Positive numeric between 0 and 1, if TRUE, jitters empirical data by specified proportion of std dev.
Logical, if TRUE and plot=TRUE
, waits for input before plotting next plot.
Vector of length 3 containing quantiles to plot -- should be rising numeric values between 0 and 1.
integer vector specifying rows of data to plot. Otherwise 'all' uses all data.
Number of datasets to generate for comparisons, if fit object does not contain generated data already.
Positive integer, the number of rows and columns to split plots into for shading.
logical. If FALSE, a list of ggplot objects is returned.
This function relies on the data generated during each iteration of fitting to approximate the model implied distributions -- thus, when limited iterations are available, the approximation will be worse.
#'
ctStanPostPredict(ctstantestfit,wait=FALSE, diffsize=2,resolution=100)
Run the code above in your browser using DataLab