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
Graph Observed versus PredictedDear Statalisters, I work on prediction of outcome (neurological outcome 0 or 1) with a score which…
Comparing median at 2 pointsDear Stata users, I am wondering, is it possible to compare the median of continuous variable (V1-s…
the regression command with moderate variableHi all I am new using Stat and I have problem with multiple regression with a moderating variable. a…
How to interpret goodness of fit for multivariate logistic regression modelDear STATA technicians, I am Hatem Ali, STATA user. Serial number: 301506305680 I am attaching to t…
"Decode" Command on Numeric Variables - Grave IssuesHello, I am appending several rounds/datasets from different demographic and health surveys. The va…
Subscribe to:
Post Comments (Atom)
0 Response to treating missing values due to lagged variable creation
Post a Comment