For regression output, I usually use a combination of eststo
to store estimations, estadd
to add the R2 and additional tests, then estab
to output the lot.
I need to do the same with the table
command. I need the mean, median and N for a variable across three by variables
and would like to add stars for the result of a ttest==1 on the mean and signtest==1 on the median. I have three by variables
, so I've been using table
to collate the mean, median and N, which I'm calling like the following pseudo-code:
sysuse auto,clear
table foreign rep78 , ///
contents(mean price median price n price) format(%9.2f)
ttest price==1, by(foreign rep78)
signtest price=1, by(foreign rep78)
I've tried esttab
and estpost
to no avail. I've also looked at tabstat
, tablemat
and summarize
as alternatives to table
, but they don't allow three by variables
.
How can I create this table, add the stars for the ttest
and signtest
p-values and output the full table?