Dear everyone,
I have trouble when create a loop to generate a new variable for my dataset. My data is presented as below.
For subset of data that var Y =1, I want to create a new_var for each industry(sic) such that new_var in year t = total value of X from year t+1 to t+3.
I a new beginner in Stata and I think that I should work with loop. I try but still can not find a solution for that.
Can anyone help me? I am really appreciate for that. Thank you so much
Related Posts with Loops within loops
Looking for a way to do local regressions on data with many zeroesI want to run a nonparametric or semiparametric regression on data which I suspect to be non-linear.…
twoway scatter plot with bar overlay — opacity issuesHi everyone, I'm trying to create a bar plot using the twoway command with scatterplots "behind" th…
Point transparency in spmapHi all, I wonder if its possible control the Point transparency using spmap: Code: spmap relig1 …
generating a count using stratified dataI am working with a stratified dataset involving clinic data, specifically, patient characteristics …
How to draw Chinese map in stata?Dear statalisits, I recently puzzeled by using stata to draw Chinese map. "How to draw Chinese map i…
Subscribe to:
Post Comments (Atom)
0 Response to Loops within loops
Post a Comment