Unfortunately -for3- does not replicate the basic, and only functionality of the old -for- I use.
The basic and only functionality of the old -for- I use is to repeat a series of actions for a given list. The -for3- does not accept the backslash \ to specify that consecutive actions need to be performed on the list:
The basic and only functionality of the old -for- I use is to repeat a series of actions for a given list. The -for3- does not accept the backslash \ to specify that consecutive actions need to be performed on the list:
Code:
. sysuse auto, clear (1978 Automobile Data) . for var price mpg headroom: summ X \ sca SX = r(mean) -> summ price Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- price | 74 6165.257 2949.496 3291 15906 -> sca Sprice = r(mean) -> summ mpg Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- mpg | 74 21.2973 5.785503 12 41 -> sca Smpg = r(mean) -> summ headroom Variable | Obs Mean Std. Dev. Min Max -------------+--------------------------------------------------------- headroom | 74 2.993243 .8459948 1.5 5 -> sca Sheadroom = r(mean) . sca list Sheadroom = 2.9932432 Smpg = 21.297297 Sprice = 6165.2568 . for3 price mpg headroom, ltype(varlist): summ @ \ sca S@ = r(mean) -> summ price \ sca Sprice = r(mean) \ invalid name r(198); .
Originally posted by Nick Cox
View Post
Comment