Hello,
I am running several two independent sample t-tests and I would like to export the output directly to MS excel in a table that would look like the table below.
Anybody could help? Thanks in advance.
Silvia
The command to run multiple ttest at the same time:
foreach var of varlist h_worked net_inc {
ttest `var', by(gender)
}
The output I would like to obtain:
------------------------------------------------------------------------------------------------
Obs(men) Obs(women) Mean(men) Mean(women) Difference (p-value)
------------------------------------------------------------------------------------------------
Hours worked 749 106 19.83 24.77 -4.95 0.00
Net income 749 106 3,317.12 2,315.91 1,001.21 0.00
------------------------------------------------------------------------------------------------
I am running several two independent sample t-tests and I would like to export the output directly to MS excel in a table that would look like the table below.
Anybody could help? Thanks in advance.
Silvia
The command to run multiple ttest at the same time:
foreach var of varlist h_worked net_inc {
ttest `var', by(gender)
}
The output I would like to obtain:
------------------------------------------------------------------------------------------------
Obs(men) Obs(women) Mean(men) Mean(women) Difference (p-value)
------------------------------------------------------------------------------------------------
Hours worked 749 106 19.83 24.77 -4.95 0.00
Net income 749 106 3,317.12 2,315.91 1,001.21 0.00
------------------------------------------------------------------------------------------------
Comment