Announcement

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

  • Tabulate the averages of multiple variables (two-way)

    Hi,

    With the following data:

    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input byte(floors baths bedrms q)
    2 3 4 3
    1 2 3 1
    3 2 3 3
    1 1 3 1
    3 2 4 3
    3 2 4 3
    3 3 5 1
    3 2 4 1
    2 2 3 2
    2 3 3 3
    2 2 3 2
    2 1 3 2
    3 3 4 3
    1 2 4 2
    2 3 3 2
    1 2 3 3
    3 1 3 3
    2 2 4 3
    3 2 4 3
    3 2 4 1
    1 2 4 1
    1 1 3 4
    2 2 4 3
    3 3 3 2
    2 3 3 4
    1 2 3 3
    3 3 4 3
    2 3 4 3
    1 1 2 2
    1 2 3 2
    1 2 3 2
    1 1 3 1
    3 2 3 1
    1 1 3 4
    4 2 3 3
    1 1 3 1
    1 2 3 1
    1 2 3 2
    2 3 4 2
    2 2 3 1
    1 2 3 3
    3 2 4 2
    1 2 3 3
    4 1 3 2
    1 2 3 1
    1 2 4 2
    2 2 3 4
    3 3 3 2
    2 3 4 4
    2 2 3 1
    1 4 4 3
    1 2 3 3
    2 2 3 4
    2 2 2 2
    1 2 3 2
    1 1 2 3
    2 2 3 4
    2 3 4 3
    1 2 2 2
    1 3 4 1
    1 1 3 2
    2 2 2 1
    2 1 2 2
    3 2 3 2
    1 2 3 2
    1 2 2 3
    3 3 3 1
    2 2 4 3
    2 2 3 2
    2 2 3 4
    3 1 3 1
    1 2 3 4
    2 2 3 3
    3 3 4 1
    3 2 3 3
    3 2 3 2
    3 2 2 3
    1 2 3 2
    2 2 3 3
    1 1 2 3
    1 2 3 2
    2 2 3 3
    1 2 3 3
    1 2 4 4
    1 2 4 3
    2 4 5 2
    1 2 3 3
    1 2 4 3
    2 2 4 2
    1 2 3 3
    1 1 3 3
    1 1 3 2
    2 1 3 4
    3 1 4 3
    3 1 2 4
    1 1 3 1
    2 3 3 3
    1 2 4 4
    1 2 4 2
    1 1 2 2
    end
    I would like to generate a table with the rows containing different housing characteristics (floors, baths, bedrms,...) and 4 columns with the quarter in which the house was sold based on the averages of these house characteristics.
    The variable quarter of the year in which the house was sold is defined as q= 1,2,3 or 4.

    So it should look like this:

    ------------------------ q1------------ q2------q3----- q4
    -floors: | average= 1.5 ...
    -baths: | average= 2.1 ...
    - bedrms | average=4.2 ...


    How can I tabulate this for multiple housing variables in 1 table?

    Thanks.
    Last edited by Mat Sko; 11 May 2019, 08:30.

  • #2
    Code:
    help tabstat

    Comment


    • #3
      (deleted; duplicates Nick's response)

      Comment


      • #4
        Thanks, tabstat could generate the table I needed.

        Comment

        Working...
        X