Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

st: Plot residuals against predictors.


From   [email protected]
To   [email protected]
Subject   st: Plot residuals against predictors.
Date   Mon, 29 Nov 2004 23:56:49 -0600

Greetings List,

I am completing an analysis of GPA against several high school grade 
variables. I have regressed the GPA on the three high school grade variables, 
and calculated and stored the residuals from this regression. 

My output looks like this so far:


regress gpa hsm hss hse

      Source |       SS       df       MS              Number of obs =     224
-------------+------------------------------           F(  3,   220) =   18.86
       Model |  27.7123302     3  9.23744341           Prob > F      =  0.0000
    Residual |  107.750459   220  .489774812           R-squared     =  0.2046
-------------+------------------------------           Adj R-squared =  0.1937
       Total |  135.462789   223  .607456452           Root MSE      =  .69984

------------------------------------------------------------------------------
         gpa |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
-------------+----------------------------------------------------------------
         hsm |   .1685666   .0354921     4.75   0.000     .0986185    .2385147
         hss |   .0343156   .0375589     0.91   0.362    -.0397057    .1083368
         hse |   .0451018   .0386959     1.17   0.245    -.0311602    .1213638
       _cons |   .5898766   .2942432     2.00   0.046     .0099804    1.169773
------------------------------------------------------------------------------

. predict yhat
(option xb assumed; fitted values)

. predict resid, residuals


Now, I am new to stata, just started learning about it this semester. And I am 
trying to plut the residuals versus each of the three high school grade 
variables and versus the predicted value of GPA. How do I do this? Also, does 
stata have a command to obtain the fitted regression equation>? 


-Thomas J. Flanagan 


*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index