-return list- (or the reference manual [R] ttest) displays the saved
results.  You will need to save of values you want after each -ttest- as a
scalar, macro, or a variable.
One way would:
sysuse auto, clear
levelsof rep, local(levels)
foreach l of loca levels {
	ttest mpg = 20 if rep == `l'
	scalar t_stat_`l' = r(t)
}
scalar list _all
Hope this helps,
Scott
> -----Original Message-----
> From: [email protected] [mailto:owner-
> [email protected]] On Behalf Of Christoph Wolff
> Sent: Thursday, July 07, 2005 11:29 AM
> To: [email protected]
> Subject: st: access and save ttest results
> 
> Hello!
> I am running several tests in Stata and I need to save the results for
> further calculations.
> 
> But how can I access the results of a test (e.g. the t-value from a ttest)
> and save them in a variable?
> 
> Thank you very much, Chris
> 
> *
> *   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/
*
*   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/