Announcement

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

  • What to do with missing values after variable creation [panel data]

    Hi,

    I have a panel data and I have created a variable through a 3 years rolling window, which essentially means that the variable takes missing values for the first 3 years of each firm observation. What is the best to do at this point? If I just delete the firm-year observations then I get very weird correlations.

    Thanks in advance.

  • #2
    Why are you surprised here? Unless you have specific grounds for imputing or interpolating the missing values, they are inevitable consequences of what you've done. No shame, no blame. Stata will just ignore the missings.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      Why are you surprised here? Unless you have specific grounds for imputing or interpolating the missing values, they are inevitable consequences of what you've done. No shame, no blame. Stata will just ignore the missings.
      Lets say the variable that is created, is named X.

      I am annoyed with the fact that if I create portfolios sorted by X for each year by each firm or if I create a variable that gives the mean of variable X per year, then there are missing values also for the portfolios because of the missing values for X in the first three years of each firm....

      Thats the biggest problem...
      Last edited by Bram Staniksen; 08 May 2017, 02:47.

      Comment


      • #4
        You don't say how you are calculating means but egen would just ignore the missings (as would many other commands).

        Comment

        Working...
        X