现有若干变量y1,y2,y3,y4,y5,y6. 有两分组变量:A,B。A,B分别有三个取值1,2,3
需要对每一个y输出如下ttest (数值和p-value)表格:
                               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==3 & A˜=2, 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 
需要用esttab对每一个y输出如上表格,每一个单元格显示分组均值(或差值)和p-value(如上ttest命令的结果)
哪位高人有什么好办法么?非常感谢!
由于网页版面格式受限,示例的格式不清楚,下面的excel文档是格式的要求