Among other alternatives, -statsby- springs
to mind.
Nick
[email protected]
Scott Merryman
> -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
Christoph Wolff
> > 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?
*
* 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/