Hello everyone,
I use the next code to do t-tests on the means of variables between the treatment group and the control group in my sample:
Now I want to extract in into Excel file in the customary way: column A for the variables name, column B for the means and SE of the control group (treatment == 0) which are the first row of the ttest command output, column C for the means and SE of the treatment group (treatment == 1), column D for the difference. Of curse I would like that row 1 will be headlines, asterisks for the statistical significance level, SE's in parenthesis in a row below the means and row gap between variables.
I would really love of if you can tell me what I should add to the code, it's the first time I extract outputs from Stata to Excel.
Thank you very much,
Fitzgerald
I use the next code to do t-tests on the means of variables between the treatment group and the control group in my sample:
Code:
local variables var1 var2 var3 var4 var 5 var6 var7 var8 var9 var10 var11 var12 var13 var14 var15 var16 var17 var18 var19 var20 var21 vr22 var23 var24 var25 var 26 var27 var28 var29 var30 var31 var32 vae33 var34 var35 var36 var37 var38 var39 var40 var41 var42 var43 var44 var45 var46 var47 foreach i in `variables' { disp "`i'" ttest `i', by(treatment) }
I would really love of if you can tell me what I should add to the code, it's the first time I extract outputs from Stata to Excel.
Thank you very much,
Fitzgerald
Comment