Announcement

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

  • table showing parameter values of many variables (percent) seperated by gender

    i want to create a table which shows the frequenzies of many variables in total (row) separeted by gender (=col)

    it should look like this table
    female male
    all (unweighted) 380 420
    motherlanguage
    german
    not german
    30%
    12%
    46%
    20 %
    at school 40% 30%
    blond hair 17 % 15%
    Last edited by Amelie Nickel; 23 Jan 2015, 13:19.

  • #2
    The package -tableout- can be used to make these types of tables.

    You can type ssc install tabout to install the package.

    Once the package is installed, type help tabout for instructions and examples.

    Comment


    • #3
      Oh thanks it was very helpfull, but here is only a description for LATEX users.

      I want to publish a table in word, but the stata output doesn't look like the ones which are shown in the example.

      maybe you can help me with that, thank you a thousend times

      Comment


      • #4
        You may benefit from the unofficial table1 command. Get it by:
        Code:
        ssc install table1

        Comment


        • #5
          re: post #4: note that the -tabout- tutorial has lots of warnings about this issue and instructions for non-Latex users; did you download and read the tutorial (type -ssc d tabout- and follow the instructions)? note, in fact, that along with the tutorial, two sets of example files are available: one for Latex and one using tabs (and thus not for Latex)

          Comment


          • #6
            Hey,

            yeah i realized that working with Latex is better for publishing tables etc.

            I downloaded Latex and tried to do exactly what the tutorial says but i have problems with download/open the bot.tex and top.tex file

            in Stata the files could not be found, i think the latex codes must be changed but i dont know how

            this are the steps in the tutorial

            LaTeX code for top.tex file
            \begin{center}
            \footnotesize
            \newcolumntype{Y}{>{\raggedleft\arraybackslash}X}
            \begin{tabularx} {#} {@{} l Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y Y@{}} \\
            \toprule

            LaTeX code for bot.tex file
            \bottomrule
            \addlinespace[.75ex]
            \end{tabularx}
            \par
            \scriptsize{\emph{Source: }#}
            \normalsize
            \end{center}

            LaTeX code required in preamble
            \usepackage{booktabs}
            \usepackage{tabularx}

            how can i copy them into latex ?

            sorry for my silly questions, i am so thankful for your help, regards Amelie

            Comment


            • #7
              Dear Amelie,

              Getting back to -tableout-, it actually works pretty well with MS Excel if you have access to the software. Try this code.
              Code:
              sysuse nlsw88.dta, clear
              tabout south race smsa coll ///
              using  table.txt, ///
              c(freq row col) f(0c 1p 1p) clab(_ _ _) ///  
              layout(rb) h3(nil)
              Then open table.txt with Excel, choose to use Tab as delimiters, and Excel should separate the columns properly. You can then add further editing features in either MS Excel or Word.
              Hope this helps.

              Aspen

              Comment

              Working...
              X