First thing is to address bits like this that result from your code:
WARNING: A class variable is crossed with itself in the table statement at line 807. This may
cause unpredictable results.
WARNING: A class variable is crossed with itself in the table statement at line 807. This may
cause unpredictable results.
WARNING: A class variable is crossed with itself in the table statement at line 807. This may
cause unpredictable results.
WARNING: A class variable is crossed with itself in the table statement at line 807. This may
cause unpredictable results.
WARNING: A class variable is crossed with itself in the table statement at line 807. This may
cause unpredictable results.
Tabulate is not intended to summarize a variable with itself. So this
table (H Costat)*(Mean STD P25 P50 P75 MIN MAX),
(X1 - X5)*costat;
is really not right in any form. If you want to get a separate column for COSTAT under each value of X1 to X5 then better would be to add another variable to your data set an use that instead in the second position
You do need to describe what is not correct about the output. It has rows of data for the levels of the COSTAT variable. You did not SHOW any values in the body of the picture so it is not possible to tell what was intended.
HINT: pick 1 variable such as X1, maybe 2 statistics, and two levels of H. Create a small data set with just that where you can calculate the results by relatively easily, (MAX and MIN are usually easy) may 10 rows of data. The show the entire results for that example data. Exclude for now any variables that are not involved in the specific problem.
... View more