Can foreach be used to keep a group of observations of a specific variable?
I need to keep a group of around 1000 individuals within dataset (eg id=1 id=2.....id=1000) and was trying to work out the most efficient way of doing this.
A search has brought up the "inlist" command but it looks like only 10 or so observations can be listed at a time, and each one needs to be typed out (rather than just id=1 - id=1000)
Any solutions to this would be greatly appreciated, thank you in advance
Related Posts with Keeping a list of observations using foreach
How to loop over columns of 70 to get the categorical counts based on a particular observation?Hi all, I've a hospital cases dataset having 30 columns and 70 observations. Based on the types of …
How to import tabstat results to data editor?Hello, I want to know to import the tabstat results to a stata data editor. I am using the followin…
-order(c.(A C B)#c.X) option does not work with esttab?Dear all, I use the following commands to make a table: eststo: reg Y c.(A B C)#c.X esttab, order(…
mhtexpI am not being able to interpret the output of 'mhtexp' command. The following is what I have when I…
how to systemmatically change data entry 200thousand alike into 200000many thanks! …
Subscribe to:
Post Comments (Atom)
0 Response to Keeping a list of observations using foreach
Post a Comment