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
Quickest Way to convert Int/Flot to StringHello there, what would be the easiest and quickest way to convert int or float to string from the c…
Modeling my own line in OLS / scatter graph for residual values?Hello everyone, I was just wondering whether it is possible to (1) model my own "pseudo-regress line…
Please help me to create a loop to replace missing values to 0Hi all, I have a dataset like this Code: * Example generated by -dataex-. To install: ssc install …
Stata freezing forever after -glm- command*Hi, I am running a simple glm model with -link(log)- function, and it makes both Stata 14 and 15 ir…
How to use psacalc command with the option mcontrol so that to take fixed-effects as unrelated controls ?Hello Dear All, I am trying to use psacalc command in Stata to build an argument for omitted variab…
Subscribe to:
Post Comments (Atom)
0 Response to Keeping a list of observations using foreach
Post a Comment