Announcement

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

  • Predict residuals after running a FE / RE model

    How can residual centering be done after running a panel data regression?

    It can be done easily after running a simple linear regression as follows.

    sysuse auto, clear
    generate interact = weight*length
    quietly regress interact weight length
    predict interact_rc, res
    However, after running a fixed effects model, the option residuals (res) does not work.
    What option should be included at the end of the predict command instead of res for panel data regressions?
    Last edited by Sang-Bum Park; 03 Jan 2022, 13:08. Reason: residuals, predict

  • #2
    Sang-Bum:
    Code:
    predict epsilon, e
    Will probably give you back what you're intetested in.
    See for more details -xtreg postestimation- entry in Stata .pdf manual.
    Last edited by Carlo Lazzaro; 03 Jan 2022, 13:16.
    Kind regards,
    Carlo
    (StataNow 18.5)

    Comment


    • #3
      Thank you, Carlo Lazzaro for your answer.

      Is the below code correct for residual centering of the abovementioned interaction term?
      Code:
      predict interact_rc, e

      Comment


      • #4
        Sang-Bum:
        Yes.
        Kind regards,
        Carlo
        (StataNow 18.5)

        Comment


        • #5
          Thank you so much, Carlo Lazzaro.

          Comment

          Working...
          X