Hello!
I am currently writing my master thesis on the implementation of GSCMP on financial performance. To evaluate the effect on financial performance one year later I want to lag my independent variable with one year. However, I only want to include observations that have at least two year of consecutive data available, I used the command indicated below. My initial dataset contains 8508 observations over a 10 year time period (2006-2015). I was wondering how to treat these 1436 generated missing values when doing my regression analyses, should I delete them or what is regular procedure when creating lagged variables?
. xtset ID year
panel variable: ID (unbalanced)
time variable: year, 2006 to 2015, but with gaps
delta: 1 unit
. by ID: gen L1 = GSCMP[_n-1] if year==year[_n-1]+1
(1436 missing values generated)
thank you in advance
Related Posts with treating missing values due to lagged variable creation
using findname varlist to delete some variablesDear All, I might have an easy question, but I could not solve it. I am using Stata 14 on Windows…
colour coding in two-way dropline plotHello, I am trying to distinguish droplines in a two-way dropline plot using different colour codes …
using findname varlist to delete some variablesDear All, I might have an easy question, but I could not solve it. I have many datasets containin…
Legend for a Graph Hello, I made a graphic and now I want to add a legend. the points have the name of the job group,…
Error 909Dear Stalist Members, I need help with how to solve Error 909 where the operating system refuses to…
Subscribe to:
Post Comments (Atom)
0 Response to treating missing values due to lagged variable creation
Post a Comment