Announcement

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

  • Adding value label to title of a table

    Hi all,

    I'm generating summary statistics for different groups within a dataset. The groups are defined by a variable, _assignment, in which there are 5 groups. In my output table, I am able to get the title to display the number of the group, from 1-5, but unable to display the value label instead! Would appreciate any help!

    In addition, if anyone knows how I could combine each set of tables that would also be amazing. Currently, the following code generates 5 seperate tables next to each other, for each variable. Would be wonderful to combine those 5 into one.

    Thanks so much in advance!

    Code:
            use "${blml}/01_C1-XXX/01_Data/CX+HLM_Treatment.dta", clear
                            foreach var of varlist $C1_LIST {
            foreach i in 1 2 3 4 5 {
                eststo: estpost sum `var' if _assignment==`i', d
                esttab . using "${blml}/01_CXXXX/01_Data/tex_files/C1_spec3/C1_sum_`var'.tex" , tex ///
                append cells("count mean sd min p50 max") label width(\hsize) ///
                 nomtitles nonumbers float title(Assignment `i'\label{tab1})
            }
        }

    Click image for larger version

Name:	Screenshot 2020-03-04 at 17.04.21.png
Views:	1
Size:	132.1 KB
ID:	1539740
Working...
X