Announcement

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

  • How does Stata compute R-square in an OLS with no constant and a dependent variable with no variation?

    To replicate this, please see the code below:

    Code:
    clear
    set seed 123
    set obs 1000
    gen x=rnormal()
    gen one=1
    reg one x, noconstant

    I can understand the beta coeffients as the least squares estimate in this setup. But R-square has SS(Total) in the denominator, which is 0 in this setup. Then, what is stata outputting here?
    There are some other related issues I have with this output but I think I can resolve them if I understand what Stata is doing to compute R-square.

  • #2
    Dear Aditya Kashikar,

    Because the model does not include a constant, SS(Total) is 1000, not 0. Note that the R2 does not have the usual interpretation in models without a constant.

    Best wishes,

    Joao

    Comment


    • #3
      Thank you Joao Santos Silva

      Comment

      Working...
      X