I really think you will be better off getting
to grips with interactive solutions here,
before trying to write a program. This is
a fairly odd problem, and you might as well
tackle it directly.
Suppose you decide that the country in observation
42 is the critical one:
foreach v of var <whatever> {
if `v'[42] < <cutoff> drop `v'
}
That solves 1. You just plug in <whatever> you want.
And 2.
On your sidenote:
help ds
help unab
Nick
[email protected]
Steffen H. Gr�ning
> I have countries in rows and the series in columns. what I
> want it to do
> is to look through all my variables (which are too many to
> list them all by
> hand) and drop those variables which have a smaller value
> than the [if]
> for one country (in this case country 1 on the vertical axis when
> browsing).
>
> so far this thing works quite well, but what i cant figure out:
>
> 1. could I tell it not to take on certain variables/ make an exception
> for some variables? If so, how?
>
> 2. is there a way of specifying which country to look for when calling
> the program? (right now i would have to change the programm
> if i wanted
> it to look for country 2, 3, 4 etc.)
>
> And just on a sidenote: how can i get stata to just make a list of all
> available variables?
*
* For searches and help try:
* http://www.stata.com/support/faqs/res/findit.html
* http://www.stata.com/support/statalist/faq
* http://www.ats.ucla.edu/stat/stata/