Hello, everyone.
I'm new to STATA and, more specifically, with the process of transforming STATA code into LaTeX.
So I know my issue seems very small, but no matter how much I read about it, I'm not able to find a solution.
I'm running a code where I calculate values for difference in means between a few variables. I have no problem getting these values out with the eststo 'sum' command and then using it with the esttab.
My problem starts with the fact that with the 'sum' command, I do not get the significance stars on my final table. I get the mean values and sd values that I want, but no significance level.
I would like for the significance levels to be 'automatic' on the code to be put on LaTeX as a way to make it replicable.
The solution would be to perform a t-test between the log differences that I already have. However, as far as I know, the eststo command does not support a ttest without a group variable, and that would be my case.
Right now, with the 'sum' command, my code looks like this:
If I apply the t-test, the model would be like:
So, as it is visible, there is no way I can input this model of ttest with the eststo command.
I would appreciate any help with this.
I was thinking about running a regression for each variable, save the results in a matrix and then, try to use it on esttab. So far, I wasn't able to do so in a way to only get two groups (female and male), and I ended up with a very long and confusing code.
I will appreciate any help with it, and I'm sorry if any part of my question is confusing.
Regards,
Bruna
I'm new to STATA and, more specifically, with the process of transforming STATA code into LaTeX.
So I know my issue seems very small, but no matter how much I read about it, I'm not able to find a solution.
I'm running a code where I calculate values for difference in means between a few variables. I have no problem getting these values out with the eststo 'sum' command and then using it with the esttab.
My problem starts with the fact that with the 'sum' command, I do not get the significance stars on my final table. I get the mean values and sd values that I want, but no significance level.
I would like for the significance levels to be 'automatic' on the code to be put on LaTeX as a way to make it replicable.
The solution would be to perform a t-test between the log differences that I already have. However, as far as I know, the eststo command does not support a ttest without a group variable, and that would be my case.
Right now, with the 'sum' command, my code looks like this:
Code:
eststo rme_male: estpost sum earn45_b_und_marr earn45_r_und_marr earn45_b_gr_marr earn45_r_gr_marr earn45_nongr_marr if female == 0 & rme == 1, detail eststo rme_female: estpost sum earn45_b_und_marr earn45_r_und_marr earn45_b_gr_marr earn45_r_gr_marr earn45_nongr_marr if female == 1 & rme == 1, detail esttab rme_male rme_female, main(mean 2) aux(sd)
Code:
log1 == log 2, if female == 1 & rme == 1
I would appreciate any help with this.
I was thinking about running a regression for each variable, save the results in a matrix and then, try to use it on esttab. So far, I wasn't able to do so in a way to only get two groups (female and male), and I ended up with a very long and confusing code.
I will appreciate any help with it, and I'm sorry if any part of my question is confusing.
Regards,
Bruna
Comment