Creates a Diagnostic Plot
diagnostics_plot(mod, variable = 1, dates = NULL)
mod
: VAR model estimated using sparseVAR
, sparseVARMA
, or sparseVARX
variable
: Variable to show. Either numeric (which column) or character (variable name)dates
: Optional Date vector.Returns a ggplot2 plot
# VAR example dat <- simVAR(periods=200, k=2, p=5, decay = 0.1, seed = 6150533, sparsity_pattern = "hvar") mod <- sparseVAR(Y=scale(dat$Y), selection = "bic", h = 1) diagnostics_plot(mod, variable = 1) # Plotting the first variable ## Not run: # VARMA example data(varma.example) varma <- sparseVARMA(Y=scale(Y.varma), VARMAselection="cv") diagnostics_plot(varma, variable = 2) # Plotting the second variable ## End(Not run) ## Not run: # VARX example data(varx.example) varx <- sparseVARX(Y=scale(Y.varx), X=scale(X.varx), selection="cv") diagnostics_plot(varx, variable = 1) # Plotting the first variable ## End(Not run)