Description Usage Arguments Details Value Author(s) See Also Examples
The function produces diagnostics plots for a smooth
model
1 2 3 4 5 6 7 8 9 10 11 12 13 14  ## S3 method for class 'adam'
plot(x, which = c(1, 2, 4, 6), level = 0.95,
legend = FALSE, ask = prod(par("mfcol")) < length(which) &&
dev.interactive(), lowess = TRUE, ...)
## S3 method for class 'smooth'
plot(x, which = c(1, 2, 4, 6), level = 0.95,
legend = FALSE, ask = prod(par("mfcol")) < length(which) &&
dev.interactive(), lowess = TRUE, ...)
## S3 method for class 'msdecompose'
plot(x, which = c(1, 2, 4, 6), level = 0.95,
legend = FALSE, ask = prod(par("mfcol")) < length(which) &&
dev.interactive(), lowess = TRUE, ...)

x 
Estimated smooth model. 
which 
Which of the plots to produce. The possible options (see details for explanations):

level 
Confidence level. Defines width of confidence interval. Used in plots (2), (3), (7), (8), (9), (10) and (11). 
legend 
If 
ask 
Logical; if 
lowess 
Logical; if 
... 
The parameters passed to the plot functions. Recommended to use with separate plots. 
The list of produced plots includes:
Actuals vs Fitted values. Allows analysing, whether there are any issues in the fit. Does the variability of actuals increase with the increase of fitted values? Is the relation well captured? They grey line on the plot corresponds to the perfect fit of the model.
Standardised residuals vs Fitted. Plots the points and the confidence bounds
(red lines) for the specified confidence level
. Useful for the analysis of outliers;
Studentised residuals vs Fitted. This is similar to the previous plot, but with the residuals divided by the scales with the leaveoneout approach. Should be more sensitive to outliers;
Absolute residuals vs Fitted. Useful for the analysis of heteroscedasticity;
Squared residuals vs Fitted  similar to (3), but with squared values;
QQ plot with the specified distribution. Can be used in order to see if the
residuals follow the assumed distribution. The type of distribution depends on the one used
in the estimation (see distribution
parameter in alm);
ACF of the residuals. Are the residuals autocorrelated? See acf for details;
Fitted over time. Plots actuals (black line), fitted values (purple line), point forecast (blue line) and prediction interval (grey lines). Can be used in order to make sure that the model did not miss any important events over time;
Standardised residuals vs Time. Useful if you want to see, if there is autocorrelation or if there is heteroscedasticity in time. This also shows, when the outliers happen;
Studentised residuals vs Time. Similar to previous, but with studentised residuals;
PACF of the residuals. No, really, are they autocorrelated? See pacf function from stats package for details;
Plot of the states of the model. It is not recommended to produce this plot together with the others, because there might be several states, which would cause the creation of a different canvas. In case of "msdecompose", this will produce the decomposition of the series into states on a different canvas;
Absolute standardised residuals vs Fitted. Similar to the previous, but with absolute values. This is more relevant to the models where scale is calculated as an absolute value of something (e.g. Laplace);
Squared standardised residuals vs Fitted. This is an additional plot needed to diagnose
heteroscedasticity in a model with varying scale. The variance on this plot will be constant if
the adequate model for scale
was constructed. This is more appropriate for normal and
the related distributions.
Which of the plots to produce, is specified via the which
parameter.
The function produces the number of plots, specified in the parameter which
.
Ivan Svetunkov, ivan@svetunkov.ru
plot.greybox
1 2 3 4 
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.