Announcement

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

  • How to do tabstat varlist with all variables

    Dear Stata users,

    I have data with long variable names. When I want to use "summarize", it abbreviates the variable names.

    I heard that tabstat works better. However, in contrast to summarize, tabstat requires a varlist
    Code:
    describe, varlist
    works fine. But

    Code:
    tabstat, varlist
    Does not work. It says varlist required.

    Code:
    tabstat varlist
    Gives, varlist not found. How do I get tabstat to display all variables?

    Is there an easy way to put all variables in a varlist?

    Tom

  • #2
    If you click on varlist (in blue) in the help for tabstat you will get an introduction to wildcards. Thus * is in general a way of indicating all variables. However, tabstat will not accept a list including any string variables, so a general way to look at all numeric variables would be

    Code:
    ds, has(type numeric)
    tabstat `r(varlist)'
    See also https://www.statalist.org/forums/for...ables-in-stata

    Comment

    Working...
    X