Hello again,
I'm having some problems creating a cross-tabulated frequency table for variables (cesdg242 and mhspec2) with dichotomous values (0 or 1) and two class variables, (ethnic and random).
I've been trying to use proc tabulate, because although these values are easy to determine in proc freq, I haven't been able to figure out how to construct tables with the desired structure.
Using proc tabulate, I can't, however, figure out how to display all the information I need.
Here's the code of what I have so far:
However, rather than specifiy how many 0 and 1 responses there are for each variable in each category, I only have the mean and n. Of course the actual frequency of responses is readily determined from mean and n--the mean being the percent of obs with values of 1, but that's not how I'd like to display the data ideally.
Any thoughts are appreciated--
Jane
I'm having some problems creating a cross-tabulated frequency table for variables (cesdg242 and mhspec2) with dichotomous values (0 or 1) and two class variables, (ethnic and random).
I've been trying to use proc tabulate, because although these values are easy to determine in proc freq, I haven't been able to figure out how to construct tables with the desired structure.
Using proc tabulate, I can't, however, figure out how to display all the information I need.
Here's the code of what I have so far:
Code:
proc tabulate data=month6.ypic06_reg missing;
class ethnic random;
var cesdg242 mhspec2;
table ethnic*random,
cesdg242*(n mean nmiss) mhspec2*(n mean nmiss);
run;
However, rather than specifiy how many 0 and 1 responses there are for each variable in each category, I only have the mean and n. Of course the actual frequency of responses is readily determined from mean and n--the mean being the percent of obs with values of 1, but that's not how I'd like to display the data ideally.
Any thoughts are appreciated--
Jane