Creates a comprehensive set of diagnostic plots for an AME (Additive and Multiplicative Effects) model, including MCMC diagnostics, parameter estimates, and goodness-of-fit checks. This is the default plot method for AME objects.
Arguments
- x
an object of class "ame" from fitting an AME model
- which
numeric or character vector specifying which plots to produce: 1 or "trace" = MCMC trace plots, 2 or "density" = posterior density plots, 3 or "gof" = goodness-of-fit plots, 4 or "effects" = additive and multiplicative effects. Default is c(1,2,3,4) to show all plots.
- ask
logical; if TRUE, user is prompted before each plot page
- pages
character string specifying how to arrange plots: "single" = one comprehensive page (default), "multiple" = separate pages for each plot type
- ...
additional arguments (currently not used)
Details
The function produces a multi-panel plot containing:
- MCMC trace plots
Shows mixing and convergence of key parameters
- Posterior distributions
Density plots of regression coefficients and variance components
- Goodness-of-fit
Comparison of observed network statistics to posterior predictive distributions (if gof=TRUE in model fit)
- Effect visualizations
Plots of additive sender/receiver effects and multiplicative effects if present
The plot adapts to the model specification:
Shows only relevant variance components (e.g., omits cab for symmetric networks)
Includes multiplicative effects plots only if R > 0
Includes GOF plots only if computed during model fitting
Examples
if (FALSE) { # \dontrun{
# Fit an AME model
fit <- ame(Y, X, R = 2, gof = TRUE)
# Default comprehensive plot
plot(fit)
# Only MCMC diagnostics
plot(fit, which = c("trace", "density"))
# Only effects plots
plot(fit, which = "effects")
# Separate pages for each plot type
plot(fit, pages = "multiple")
} # }