Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to generate a normal probability plot of residuals after linear regression?

    For some important reasons, after doing a linear regression analysis, a residual plot and a normal probability plot of residuals must be done to check if the data meets the prerequisites of linear regression (see following). The residual plot could be generate by syntax of rvpplot. How about normal probability plot of residuals?

    Last edited by sladmin; 10 Oct 2017, 08:39. Reason: prune copyrighted material

  • #2
    I suspect you're violating copyright in posting that and StataCorp would rather you didn't do that.

    You need a better textbook in that assuming a normal distribution is less crucial than that extract implies.

    rvpplot is not what is usually called a residual plot without qualification; that's more likely to be rvfplot

    Otherwise consider

    Code:
    . sysuse auto, clear
    (1978 Automobile Data)
    
    . regress weight price
    
          Source |       SS           df       MS      Number of obs   =        74
    -------------+----------------------------------   F(1, 72)        =     29.42
           Model |  12791822.9         1  12791822.9   Prob > F        =    0.0000
        Residual |  31302355.5        72  434754.937   R-squared       =    0.2901
    -------------+----------------------------------   Adj R-squared   =    0.2802
           Total |  44094178.4        73  604029.841   Root MSE        =    659.36
    
    ------------------------------------------------------------------------------
          weight |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    -------------+----------------------------------------------------------------
           price |   .1419244   .0261645     5.42   0.000     .0897663    .1940824
           _cons |   2144.459   178.5954    12.01   0.000     1788.436    2500.483
    ------------------------------------------------------------------------------
    
    . predict res, res
    
    . qnorm res

    Comment


    • #3
      If I understood your question correctly, you may use - predict - to create the residuals, then apply - qnorm - as well as - pnorm plots.

      With regards to the debate on the "incontournable" assumptions for linear regression, you may find several thought-provoking threads in this forum.

      P.S: Crossed with Nick's reply.
      Best regards,

      Marcos

      Comment

      Working...
      X