I have variables for 58 questions (q1,q2,...,q58). Each variable has values 1,2,3. I would like to create a dataset with 4 variables (and 58 rows). The first variable, q, should contain a list of q1,...,q58. The second variable (x1) is the percentage of 1s for each question. The third variable (x2) is the percentage of 2s for each question. The fourth variable (x3) is the percentage of 3s fore each question. The following code (after transposing the results) gets the answer for q1, but how would I do this for q1-q58 and then transpose the results so that I have 4 columns? ods output onewayfreqs=percents(keep=q1 percent); proc freq data=test; tables q1; run; ods output close; Thank you.
... View more