tab1 tab2 and tab commands

Re: tab1 tab2 and tab commands

by Eduardo Rodriguez Almaraz -
Number of replies: 0

Hello Laura,

The difference between this three commands is the tables that STATA returns for you.  'tab1' and 'tab2' are used in case you want to produce several tables with one command.

If you specify 'tab1' and list, say 3 variables (sex, heartatk and diabetes) STATA will return 1 one-way table for each variable.

If you use the 'tab2' command with the same variables it will display 3 two-way tables (diabetes by sex, heartatk by diabetes, and heartk by sex).

If you use the 'tab' command, you can only use up to 2 variables because it displays 1 table at the time.

And of course, the options that you can use with each command are different.

Hopefully this was clear and helpful.