I have posted this previously but unfortunately my account got scrambled and I have had to start again. I need to do a domain analysis of some data. Outdoor Team Non-team Leisure Domestic 15 5 0 0 25 60 0 25 10 0 0 25 30 0 0 I need to show the proportions each of these contribute to the whole so results should look like this Outdoor 10% Team 25% Non Team 45% Leisure 15% Domestic 5% I have on previous suggestion tried proc iml proc iml; use domains; read all var _num_ into x[c=vname]; close; ratio=t(x[+,]/sum[,ncol(x)]); print (t(vname)) ratio[f=percent8.2]; quit; but I got this message in the log 114 115 proc iml; NOTE: IML Ready 116 use domains; 117 read all var _num_ into x[c=vname]; 118 close; NOTE: Closing WORK.DOMAINS 119 120 ratio=t(x[+,]/sum[,ncol(x)]); ERROR: (execution) Matrix has not been set to a value. operation : [ at line 120 column 18 operands : sum, , _TEM1002 sum 0 row 0 col (type ?, size 0) _TEM1002 1 row 1 col (numeric) 10 statement : ASSIGN at line 120 column 1 121 122 print (t(vname)) ratio[f=percent8.2]; ERROR: Matrix ratio has not been set to a value. statement : PRINT at line 122 column 1 123 quit; NOTE: Exiting IML. I really don't understand this procedure at all so have no idea how to fix it. Can anyone help? Thanks.
... View more