Announcement

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

  • Renaming Statistical parameters

    renaming table properties and using labels in place of variable names

    Yesterday, 10:57
    I made this table with the code "tabstat x1 x2 x3, statistics( count ) columns(statistics)"

    variable | N
    -------------+----------
    x1 | 1645
    x2 | 1645
    x3 | 1645
    ------------------------

    But I would like that the N column be renamed to a different name such as "Number of People". Also, instead of using the variable names x1, x2, and x3, I would like stata to use the labels instead. the lables are in the data and they are First, second, and third. How do i generate a single code to do that?

    Code:
    * Example generated by -dataex-. To install: ssc install dataex clear input byte(x1 x2 x3) 1 1 2 1 1 2 1 2 2 3 3 2 1 1 2 2 2 2 2 2 2 1 1 2 1 1 2 2 2 2 2 2 2 2 2 2 1 1 2 1 1 2 1 2 4 1 1 4 2 2 4 2 2 4 1 1 4 2 2 4 end
    ------------------ copy up to and including the previous line ----

  • #2
    This was presented better in the original post yesterday, especially the sample data. Anyone interested in helping should see

    https://www.statalist.org/forums/for...variable-names

    Comment

    Working...
    X