Generates comprehensive diagnostic plots for a fitted AddiVortesFit
object.
This function creates multiple diagnostic plots including residuals,
MCMC traces for sigma, and tessellation complexity over iterations.
Arguments
- x
An object of class
AddiVortesFit
, typically the result of a call toAddiVortes()
.- x_train
A matrix of the original training covariates.
- y_train
A numeric vector of the original training true outcomes.
- sigma_trace
An optional numeric vector of sigma values from MCMC samples. If not provided, the method will attempt to extract it from the model object.
- which
A numeric vector specifying which plots to generate: 1 = Residuals plot, 2 = Sigma trace, 3 = Tessellation complexity trace, 4 = Predicted vs Observed. Default is c(1, 2, 3).
- ask
Logical; if TRUE, the user is asked to press Enter before each plot.
- ...
Additional arguments passed to plotting functions.
Details
The function generates up to four diagnostic plots:
Residuals Plot: Residuals vs fitted values with smoothed trend line
Sigma Trace: MCMC trace plot for the error variance parameter
Tessellation Complexity: Trace of average tessellation size over iterations
Predicted vs Observed: Scatter plot with confidence intervals
Examples
if (FALSE) { # \dontrun{
# Assuming 'fit' is a trained AddiVortesFit object
plot(fit, x_train = x_train_data, y_train = y_train_data)
# Show only specific plots
plot(fit, x_train = x_train_data, y_train = y_train_data, which = c(1, 3))
# With custom sigma trace
plot(fit, x_train = x_train_data, y_train = y_train_data,
sigma_trace = my_sigma_samples)
} # }