Dear All,
First of all I need to thank everyone here whos posts I've used to help me learn more about SAS. At the moment I am building some applications to help me create tables out of a dataset. However, a problem with proc transpose arose on which I need your help.
Let's say that I've made this crossed table (results over 2 questions), where there is no-one who awnsered question 1 with a 2 AND question 2 with a 2. I get this table:
Q1 Q2 freq
1 1 2
1 2 2
1 3 3
2 1 2
2 3 1
3 1 2
3 2 2
3 3 3
Using:
proc transpose data = ... out = ... prefix = vari;
BY Q1;
var freq;
run;
I get this table:
Q2 vari1 vari2 vari3
1 2 2 3
2 2 1 .
3 2 2 3
Where the "." should actually be on (Q2 = 2, vari2); instead the 1 from (Q2=2,vari3) is placed there.
How can I overcome this problem? Is there a simple command for it? Or should I go back to the proc freq I used to create the first table and solve the problem there?
Any help would be welcome! Have a nice day