Announcement

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

  • Understanding the plot of y-hat vs y-mean

    Dear Statalist community,

    My original task is shown in the picture below. I first simply regressed the variable "change":
    reg change heir lsc int_heir_lsc mb avg_opass_after avg_assets_after avg_mval_after own, vce(r)
    *outreg2 using change.xls, append ctitle(Model 4) addtext(Controls, YES, FE, NO) keep (heir lsc lnagein)
    predict change_predict
    label variable change_predict "change predicted"
    scatter change change_predict
    I have now quite problems in understanding the plot and hoped you can help me to figure out what the meaning is behind. First I don't understand, why the scaling is different, how is this even possible? Second, As this looks rather crowded, I feel like that change_predicted is not a really good estimate, or rather saying required is probably low, as the fitted values don't really match change, right?

    And then I tried to find the sum of squares explained by:
    predict change_hat, xb
    label variable change_hat "predicted change"
    scatter change change_hat

    egen change_bar = mean(change_hat)
    gen sse_component = (change_hat - change_bar)^2
    summarize
    //45998.915
    di r(sum)
    Unfortunately this number (45998.915) Doesn't match the regression table outcome where it says that SS - Model = 45569.6674. How is there a difference possible, I don't see the mistake..

    Best,
    Pauline
    Click image for larger version

Name:	Screenshot 2022-11-23 at 07.57.45.png
Views:	1
Size:	69.3 KB
ID:	1690625

    Click image for larger version

Name:	Screenshot 2022-11-23 at 08.08.37.png
Views:	1
Size:	143.9 KB
ID:	1690626

    Last edited by Pauline Mueller; 23 Nov 2022, 02:10.

  • #2
    Pauline:
    please see https://www.statalist.org/forums/help#adviceextras, #4.
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      I am so sorry.
      It's not that I not tried. I thought this forum is to also clarify misunderstandings. Even if this is for university, I am interested in that space and wanted to actually know why my tryings didn't work. I hoped for advise, how to solve. Thanks anyway..

      Comment


      • #4
        Pauline:
        while it's true that this forum is also useful to clarify misunderstandings/mistakes/popular misconceptions (and I benefit from the skillfulness of many posters on a daily basis), it also true that questions should be posed in a proper way.
        You complain about the fact that numbers do not behave as expected, but you do not provide any evidence of this issue via the usual rule (reminded by the FAQ) "please show what you typed and what Stata gave you back".
        In addition, I guess that, knowing a bit of the OLS machinery, you can propose yourself an answer to your main question, that you may want to post on this forum. This is, in my humble opinion, the main meaning of "giving it a shot". Thanks.
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment

        Working...
        X