Easily Generate Six Diagnostic Plots at Once for a Single Variable
The user-written command sixplot takes 6 graph types and runs them all at once for a single variable. It is useful for investigating the distribution of a variable. The 6 types of graph are as follows:
"Sequence Plot" - This is a scatter graph with a trend line and 95% confidence intervals. The graph is generated by sorting the variable and graphing it on a scatter with the observation numbers on the x-axis.
"Residual vs fitted Plot" - These plots are usually generated after a linear regression using the rvfplot command in Stata. This plot shows the residuals versus the fitted values of a regression with the chosen variable as the dependent variable, and the observation number as the independent variable.
"Boxplot" - This is a box plot showing distribution of the variable.
"First difference plot" - This line graph is generated by taking a given value of the variable and subtracting the previous value from it. These "difference" values are then plotted in a line graph, indicating how much a variable changes between observations.
"Histogram" - This is a simple histogram of the variable showing frequency of values.
"Normal quantile plot" - This plots the quantiles of the variable against the quantiles of a normal distribution. If the trend of the plot points differs greatly from the normal distribution trendline then the variable is not normally distributed.
To create this amalgam graph you first need to download the command sixplot from the SSC, which you do in Stata using the following command:
To generate this graph in Stata, use the following commands: