class_docstr: Diagnostic plots to identify potential problems in a linear regression fit.
  Mainly,
      a. non-linearity of data
      b. Correlation of error terms
      c. non-constant variance 
      d. outliers
      e. high-leverage points
      f. collinearity
  
  Author:
      Prajwal Kafle (p33ajkafle@gmail.com, where 3 = r)
      Does not come with any sort of warranty. 
      Please test the code one your end before using.
class_docstr_tok: ["Diagnostic","plots","to","identify","potential","problems","in","a","linear","regression","fit",".","Mainly",",","a.","non-linearity","of","data","b",".","Correlation","of","error","terms","c.","non-constant","variance","d.","outliers","e.","high-leverage","points","f.","collinearity","Author",":","Prajwal","Kafle","(","p33ajkafle","@","gmail.com",",","where","3","=","r",")","Does","not","come","with","any","sort","of","warranty",".","Please","test","the","code","one","your","end","before","using","."]
docstr: Standarized Residual vs Theoretical Quantile plot
  
  Used to visually check if residuals are normally distributed.
  Points spread along the diagonal line will suggest so.
docstr_tok: ["Standarized","Residual","vs","Theoretical","Quantile","plot","Used","to","visually","check","if","residuals","are","normally","distributed",".","Points","spread","along","the","diagonal","line","will","suggest","so","."]
code: def qq_plot(self, ax=None):
      """
      Standarized Residual vs Theoretical Quantile plot
  
      Used to visually check if residuals are normally distributed.
      Points spread along the diagonal line will suggest so.
      """
      if ax is None:
          fig, ax = plt.subplots()
  
      QQ = ProbPlot(self.residual_norm)
      QQ.qqplot(line="45", alpha=0.5, lw=1, ax=ax)
  
      # annotations
      abs_norm_resid = np.flip(
          np.argsort(np.abs(self.residual_norm)), 0
      )
      abs_norm_resid_top_3 = abs_norm_resid[:3]
      for r, i in enumerate(abs_norm_resid_top_3):
          ax.annotate(
              i,
              xy=(
                  np.flip(QQ.theoretical_quantiles, 0)[r],
                  self.residual_norm[i],
              ),
              ha="right",
              color="C3",
          )
  
      ax.set_title("Normal Q-Q", fontweight="bold")
      ax.set_xlabel("Theoretical Quantiles")
      ax.set_ylabel("Standardized Residuals")
      return ax
  
file_path: statsmodels/examples/python/linear_regression_diagnostics_plots.py
imports: import statsmodels
  import statsmodels.formula.api
  import pandas
  import numpy
  import seaborn
  from statsmodels.tools.tools import maybe_unwrap_results
  from statsmodels.graphics.gofplots import ProbPlot
  from statsmodels.stats.outliers_influence import variance_inflation_factor
  import matplotlib.pyplot
  from typing import Type
label_desc: Use image node_id 4 for calling the Linear_Reg_Diagnostic obj's underlying member method code with example usage: obj.qq_plot(ax) and returns: ax