Some generic syntax bits in the TABLE statement of Tabulate:
Commas separate dimensions
* nest items
( ) group items.
So if you want the same statistics for multiple variables (var1 var2 var3) * (n mean max <or other valid statistic keywords)
Grouping variables are CLASS variables and must be declared on a Class statement before use.
Variables for statistics like Mean, Max, Sum etc must be declared on a VAR statement before use.
If no specific statistic is requested then you will get N for class variables if there is no interaction (cross or nest) with var variables, and Sum of var variables.
You must have at least one of a Class or Var statement with at least one variable and ALL variables that appear on the Table statement must be defined as class or var to be used. That is why your code generated a bunch of errors about "type of variablename is unknown"
... View more