Announcement

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

  • Summary statistics using outreg2

    Click image for larger version

Name:	Schermafbeelding 2022-06-08 130657.jpg
Views:	1
Size:	61.5 KB
ID:	1668337 Hello,
    To generate a nice looking summary table, i'm using the outreg2 command. In this table, I made a distinction whether they participate in the crypto market or not, this is the variable cmp and has a value 0 if they do not participate and value 1 if they participate. To generate the table, I use the command: bysort cmp: outreg2 using descr, word sum(log). However, in my dataset I have multiple categorical variables, for example education. For education i made a distinction between level 1 till level 5 with value 1 till 5. In the table I only see education, and there is no distinction between the different levels. Is there a way to generate in table in which these different levels of education are all seperated? (In the attachment you see that education is one single variable, but is it possible to show it as Level 1, Level 2 etc.)
    Kind regards, Rens
    Last edited by Rens Heinen; 08 Jun 2022, 05:08.

  • #2
    Hello Rens Heinen
    Welcome to Statalist. As per the FAQs, you should post an example dataset and the code you have used. Absent these, very little help can be offered.
    For reporting the levels of a categorical variable, you may consider using asdoc (more on asdoc can be found here https://fintechprofessor.com/2018/01/31/asdoc/ ). Here is an example where never_married is a categorical variable and hence when I add i. to it, the statistics are reported for each level (here 0 and 1).
    Code:
    ssc install asdoc
    sysuse nlsw88
    asdoc sum wage hours ttl_exp tenure i.never_married, save(myfile.doc)
    Click image for larger version

Name:	Capture.PNG
Views:	1
Size:	23.1 KB
ID:	1668341




    asdocx is now available

    A more powerful and flexible version of asdoc is now available. I call it asdocx. You may like to check the details here

    https://fintechprofessor.com/asdocx


    Please do remember to cite asdoc. To cite:

    In-text citation
    Tables were created using asdoc, a Stata program written by Shah (2018).

    Bibliography
    Shah, A. (2018). ASDOC: Stata module to create high-quality tables in MS Word from Stata output. Statistical Software Components S458466, Boston College Department of Economics.


    Regards
    --------------------------------------------------
    Attaullah Shah, PhD.
    Professor of Finance, Institute of Management Sciences Peshawar, Pakistan
    FinTechProfessor.com
    https://asdocx.com
    Check out my asdoc program, which sends outputs to MS Word.
    For more flexibility, consider using asdocx which can send Stata outputs to MS Word, Excel, LaTeX, or HTML.

    Comment

    Working...
    X