Hello,
in an exploratory analysis I compared two subpopulations (z being a dummy variable taking the values 0/1) on a set of observables by calculating ttests:
foreach xvar in a b c d {
ttest `xvar', by(z)
}
I was wondering whether there exists a command that combines the respective means for the different observables and the respective p-values of the ttests into one table:
a mean_a_0 mean_a_1 p-value_a
b mean_b_0 mean_b_1 p-value_b
etc.
Any hints would be greatly appreciated.
Best, Michael
in an exploratory analysis I compared two subpopulations (z being a dummy variable taking the values 0/1) on a set of observables by calculating ttests:
foreach xvar in a b c d {
ttest `xvar', by(z)
}
I was wondering whether there exists a command that combines the respective means for the different observables and the respective p-values of the ttests into one table:
a mean_a_0 mean_a_1 p-value_a
b mean_b_0 mean_b_1 p-value_b
etc.
Any hints would be greatly appreciated.
Best, Michael
Comment