Creates a scatter plot with marginal density plots to visualize the relationship between two sets of Gaussian shocks.
esgplotshocks(x, y = NULL)
A ggplot2 object containing the scatter plot with marginal densities
The function creates a scatter plot of the shocks with marginal density plots on the top and right sides. If y is provided, both sets of shocks are plotted with different colors (blue for x, red for y). The marginal density plots show the distribution of shocks along each dimension.