Hello, I have a series of loops. Right now they are set to display, but I want them to write the data to a xls file to create a table. I have tried messing around with eststo but I can't seem to get it yet. I guess I would have to replace the display with a different command...
egen id=group(thing otherthing)
forvalues i=1989(1)2003{
display `i' distinct id if year1==`i'
}
forvalues i=1989(1)2003{
display `i' distinct id if urban==1 & year1==`i'
}
forvalues i=1989(1)2003{
display `i' distinct id if urban==3 & year1==`i'
}
Related Posts with create a table from loops
Problem with dummy variable in PMG modelHello, I'm running PMG model with one dummy veritable of (0 or 1) (xtpmg d.y d.x1 d.x2 d.x3 d.x4 DU…
Question about using if flag + tab togetherHi all, I am trying to create a Table 1 using Medicare claims to compare demographics among people …
How toI have quite a simple problem. But STATA is new to me. my code is : y age gender: egen UIdur_mean …
plotI have quite a simple problem. But STATA is new to me. my code is : y age gender: egen UIdur_mean …
Finding the sum of a variable within an ID is not workingHi all, For the following example data set below, I am trying to create a new variable (let's call …
Subscribe to:
Post Comments (Atom)
0 Response to create a table from loops
Post a Comment