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
Count observationsHello, I am trying to count observations which have the same value for some variable but different I…
How to estimate data that are censored by different criteriaDear Statalists, I have an outcome variable y, which records a company's transaction value. The var…
F statistics for excluded instruments after re ec2slsDear Statalisters, I am running Baltagi's ec2sls random effects model. xtivreg investment (favoriti…
rangejoin reversed?Hi all, Working with two different datasets, and wondering if it is possible to perform rangejoin w…
How to Combine Categorical Variables into One Variable?Greetings Stata Users: I am trying to generate a variable that has the categories of the outcome of…
Subscribe to:
Post Comments (Atom)
0 Response to Loops within loops
Post a Comment