Dear Stata Users,
I would like to use etable to collect some results from several nlcom commands and turn them into a nice table.
Can anyone tell me how to add significance stars and change the row label from "_nl_1" to something nicer?
I included options in my etable command that should do those things, but they do not seem to be working.
It would also be useful to know how to add the s.e.
Thanks,
Jeremy
I would like to use etable to collect some results from several nlcom commands and turn them into a nice table.
Can anyone tell me how to add significance stars and change the row label from "_nl_1" to something nicer?
I included options in my etable command that should do those things, but they do not seem to be working.
It would also be useful to know how to add the s.e.
Thanks,
Jeremy
Code:
sysuse nlsw88.dta, clear
*examine: race ---> experience ---> wages
gsem (c.ttl_exp <- i.race ) (wage <- c.ttl_exp i.race)
est store model1
*calculate the indirect effect of black on wages and post it to the results
nlcom _b[ttl_exp:2.race]*(_b[wage:ttl_exp]), post
est store iblack
est restore model1
nlcom _b[ttl_exp:3.race]*(_b[wage:ttl_exp]), post
est store other
est dir
*make a table of the indirect effects
etable, estimates(black other) column(estimates) ///
title(Mediation tests: race-->exp--> wages) ///
cstat(_r_b, nformat(%4.3f) label(Indirect_Effect)) ///
showstars showstarsnote
Mediation tests: race-->exp--> wages
----------------------------------
black other
----------------------------------
_nl_1 0.084 0.043
Number of observations 2246 2246
----------------------------------
** p<.01, * p<.05

Comment