Announcement

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

  • Help Creating New Variable Equal to the Square of the Residuals

    Dear all,

    I am using Stata 16, on mac. I want to create a new variable called resid_sq that is equal to the square of the residuals. I used the following command: predict resid_sq, residuals. Would that be the correct way to achieve my goal?

    Thank you in advance for your help

    Jason Browen

  • #2
    With your predict command, you already have the residuals themselves. All you need now is to square it:
    Code:
    replace resid_sq = resid_sq*resid_sq

    Comment


    • #3
      Awesome thank you so very much Clyde! I greatly appreciate your time and efforts!

      Comment

      Working...
      X