there are many ways to specify a varlist, see: -help varlist-. If
you're not sure you can always name the variables, e.g.:
foreach var of varlist boardcomp compensation tech march {
Hope this helps,
Maarten
--- Claude Francoeur <[email protected]> wrote:
> The variables I am using are : pw (dichotomic dependent), boardcomp,
> compensation, tech, march, etc.
>
> Can you help me convert the following commands to fit my variables?
>
> foreach var of varlist varname? {
> di "`var'"
> ttest `var', by(pw)
> }
-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands
visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434
+31 20 5986715
http://home.fsw.vu.nl/m.buis/
-----------------------------------------
Send instant messages to your online friends http://uk.messenger.yahoo.com
*
* 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/