How can I create a higher dimensional table?

Felix Schleef

I want to create a table in Stata 14, where the relative frequencies of the sexes are conditioned on whether the person is employed or not:

table example

I have tried to use the community-contributed command tabout, but I have not found a specific example that deals with this. As a workaround, I generated a variable with levels for a person that is "Male & Employed", "Female & Employed" and so on.

Is there a solution that does not require generating additional variables?

user8682794

Consider the following example using Stata's auto toy dataset:

sysuse auto, clear

egen price2 = cut(price), group(4)
label variable price2 "Price Category"
label define price2 0 "Lower" 1 "Middle" 2 "Upper" 3 "Luxury"
label values price2 price2

recode rep78 (3=1) (4=2) (5=2)
label define rep78 1 "Good" 2 "Poor"
label values rep78 rep78

The community-contributed command tab3way provides the means to create such cross-tabulations:

tab3way price2 rep78 foreign, rowpct nofreq rowtot format(%5.2f)

Table entries are row percentages
Missing categories ignored

------------------------------------------------------------
          |         Car type and Repair Record 1978         
Price     | ------ Domestic ------    ------- Foreign ------
Category  |   Good    Poor   TOTAL      Good    Poor   TOTAL
----------+-------------------------------------------------
    Lower |  53.85   46.15  100.00     25.00   75.00  100.00
   Middle |  76.92   23.08  100.00     25.00   75.00  100.00
    Upper |  45.45   54.55  100.00     14.29   85.71  100.00
   Luxury |  63.64   36.36  100.00            100.00  100.00
------------------------------------------------------------

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

How can I create a two dimensional array in JavaScript?

From Dev

How can i create an n-dimensional array in c

From Dev

How can i create a trigger to verify if a record exists on another table?

From Dev

How to create lower dimensional matrix from higher dimensional array in R?

From Dev

How can i create a function with two-dimensional arrays and adding elements in the same position?

From Dev

How can I create a decorator for a set of models with use the same table?

From Dev

How i can sort 2 dimensional array?

From Dev

How can I create a two-dimensional array containing ArrayLists?

From Dev

How can I create a YearMonths table from a Years table?

From Dev

How can I parameterize the tablename in a CREATE TABLE expression?

From Dev

How can I create an n-dimensional grid in numpy to evaluate a function for arbitrary n?

From Dev

how can I get the sql statements used to create a specific table?

From Dev

How to create a HTML table with a multi-dimensional array with SMARTY?

From Dev

How can I extrapolate to higher values in Matlab?

From Dev

How can I create a table with names of directories and subdirectories in R?

From Dev

How can I create a simple 4x3 two dimensional array in Java?

From Dev

How can I create two dimensional SplitPane in Java Swing

From Dev

Create three (or higher) dimensional array with Julia

From Dev

How can I create a two-dimensional dynamic array in C#?

From Dev

How can I create the correct path to create images in a gt table

From Dev

How can I create a fixed table header

From Dev

I can not create the table structure

From Dev

How to create a table based on a two-dimensional array?

From Dev

How can I create an array of pointers point to a 2 dimensional array

From Dev

How can I access a multi-dimensional associative array to print a table?

From Dev

how can i create a table for this array?

From Dev

How can I create and reference a table in WebAssembly?

From Dev

How can I create a table in SQLite?

From Dev

can i make a two dimensional table in django-tables2?

Related Related

  1. 1

    How can I create a two dimensional array in JavaScript?

  2. 2

    How can i create an n-dimensional array in c

  3. 3

    How can i create a trigger to verify if a record exists on another table?

  4. 4

    How to create lower dimensional matrix from higher dimensional array in R?

  5. 5

    How can i create a function with two-dimensional arrays and adding elements in the same position?

  6. 6

    How can I create a decorator for a set of models with use the same table?

  7. 7

    How i can sort 2 dimensional array?

  8. 8

    How can I create a two-dimensional array containing ArrayLists?

  9. 9

    How can I create a YearMonths table from a Years table?

  10. 10

    How can I parameterize the tablename in a CREATE TABLE expression?

  11. 11

    How can I create an n-dimensional grid in numpy to evaluate a function for arbitrary n?

  12. 12

    how can I get the sql statements used to create a specific table?

  13. 13

    How to create a HTML table with a multi-dimensional array with SMARTY?

  14. 14

    How can I extrapolate to higher values in Matlab?

  15. 15

    How can I create a table with names of directories and subdirectories in R?

  16. 16

    How can I create a simple 4x3 two dimensional array in Java?

  17. 17

    How can I create two dimensional SplitPane in Java Swing

  18. 18

    Create three (or higher) dimensional array with Julia

  19. 19

    How can I create a two-dimensional dynamic array in C#?

  20. 20

    How can I create the correct path to create images in a gt table

  21. 21

    How can I create a fixed table header

  22. 22

    I can not create the table structure

  23. 23

    How to create a table based on a two-dimensional array?

  24. 24

    How can I create an array of pointers point to a 2 dimensional array

  25. 25

    How can I access a multi-dimensional associative array to print a table?

  26. 26

    how can i create a table for this array?

  27. 27

    How can I create and reference a table in WebAssembly?

  28. 28

    How can I create a table in SQLite?

  29. 29

    can i make a two dimensional table in django-tables2?

HotTag

Archive