Announcement

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

  • How to put frequency, mean and other specific values into WORD and EXCEL

    Hi there,

    I am currently dealing with descriptive analysis. In my dataset, there are many categorical variables and I created dummy variables to indicate them.
    For instance, for variable age_cat , I created many binary dummy variables (age1, means the group aged 15 years to 24 years, age2, means the group aged 25 years to 34, and so on. They all only have two value [0]No, [1]Yes ) to indicate it.

    I tried to show the frequency, mean, std, skewness, median or other specific data of these dummy variables

    At first, I used the code below, but stata said "factor-variable and time-series operators not allowed".
    Code:
    asdoc sum ibn.age_cat, title(Table 1: ) stat(N mean sd min max skewness) replace
    Then I tried another code. It works, but the result doesn't include median, skewness. And I'm not interested in Observations, I only want to know how many dummy variables equal to 1 for each age group.

    Code:
    asdoc sum ibn.age_cat , title(Table 1: ) replace

    Variable | Obs Mean Std. Dev. Min Max
    -------------+---------------------------------------------------------
    age_cat |
    15-24 | 14,009 .1912312 .3453453 0 1
    25-34 | 14,009 .1123123 .3776558 0 1
    35-44 | 14,009 .1768678 .6575756 0 1
    45-54 | 14,009 .1454644 .5675765 0 1
    55-64 | 14,009 .1453455 .3434338 0 1
    -------------+---------------------------------------------------------
    65-74 | 14,009 .0865755 .2835341 0 1
    75-84 | 14,009 .0356751 .245341 0 1
    85+ | 14,009 .0167552 .1337743 0 1


    asdoc and putexcel are both good tools to do descriptive analysis, but I wonder how to put the frequency, mean, std, median, skewness or even q25 q50 to doc and excel.

  • #2
    I have added support for customized statistics for factor variables in asdocx. There are several other advanced features in asdocx, you can explore them here https://fintechprofessor.com/asdocx/
    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