Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • How to esttab scalars side by side

    I am trying to export the p values for several subgroup comparisons into one file and put them side by side . Here are the codes


    Code:
    xi:svy:mean $descp, over(group)
    test [age_g1]1=[`age_g1]2          
     estadd local age_g1_p_dif12= r(p)
     eststo age_g112
    
    test [age_g1]3=[`age_g1]4          
     estadd local age_g1_p_dif34 = r(p)
     eststo age_g134
    
     esttab age_g112 age_g134 , scalars ("age_g1_p_dif12 age_g1_p_dif34") not drop (*) noobs nonum nodep  nomtitle plain collabels(none) b(3)
    the results are this: age_g1_p_~34 .1604724086841665 .1604724086841665, which only gave the scalars for age_g134

    if I change the code to
    Code:
    esttab age_g112 age_g134 , scalars ("age_g1_p_dif12" "age_g1_p_dif34") not drop (*) noobs nonum nodep  nomtitle plain collabels(none) b(3)
    it gave results for both comparison but in two rows instead of side by side in one row: age_g1_p_~12 .1604724086841665 .1604724086841665
    age_g1_p_~34 .2609089770047454


    How can I have the two p values side by side?

    Thanks!
Working...
X