Hello stata community,
I have a panel set of law effective data for state by year , and I need to create a one year lagged variable for that law panel variable since it takes a year to see the effect of law.
out of the mentioned 2 commands which one I should follow :
sort state year
by state: gen law_lag = law[_n-1] or ############## sort state
by state: gen law_lag = law[_n-1] if year==year[_n-1]+1
Related Posts with Creating one year lagged variable for law ( state by year panel data)
Create an indexI need to group 3 variables to build an index in Stata. Each variable refers to a question in a ques…
Interpreting results: 1-standard-deviation increase in an explanatory variableThis table provides results of the analysis of the role of tax avoidance on returns. The dependent v…
Help with two way fixed effect and event study?Hello, I'm currently working on a project where I asses whether or not a program has made an impact …
Detrending in Dynamic Panel Data regressionHello, I am running a dynamic panel data regression. However 3 out of my 7 variables are stationary…
OLS vs FE vs RE? Tests results conflicts.Dear Stata specialists, Hope you can help me solve my problem. I recently run OLS, FE, RE for my p…
Subscribe to:
Post Comments (Atom)
0 Response to Creating one year lagged variable for law ( state by year panel data)
Post a Comment