Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.

st: esttab results of univariate tests

 From XIAOFEI XING To statalist@hsphsun2.harvard.edu Subject st: esttab results of univariate tests Date Sun, 26 May 2013 13:27:29 +0100

```Dear all,

There is dependent variable y and two categorial variable A and B. Each categorial variable has three values: 1, 2 and 3.

I want to output the following table (show mean value and p-value of ttest) by using esttab:
A1                                              A2                                            A3                                     A1-A3
B1         ttest y==0 if A==1&B==1      ttest y==0 if A==2&B==1      ttest y==0 if A==3&B==1      ttest y if B==1&A˜=2, by A
B2         ttest y==0 if A==1&B==2      ttest y==0 if A==2&B==2      ttest y==0 if A==3&B==2      ttest y if B==2&A˜=2, by A
B3         ttest y==0 if A==1&B==3      ttest y==0 if A==2&B==3      ttest y==0 if A==3&B==3      ttest y if B==2&A˜=3, by A
B1-B3   ttest y if A==1&B˜2, by B      ttest y if A==2&B˜2, by B      ttest y if A==3&B˜2, by B

Is there any good idea to solve this problem?

Thanks a lot

Best wishes,

Xiaofei Xing

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/faqs/resources/statalist-faq/
*   http://www.ats.ucla.edu/stat/stata/
```