Help using Base SAS procedures

Proc tabulate weight statement with counts

Reply
N/A
Posts: 0

Proc tabulate weight statement with counts

Hi all,

I have a continuous weight variable called wgt1. I want to use it in a tabulate procedure to weigh categorical survey data. The problem is that SAS doesn't take wgt1 into account when performing the calculations. The output appears as unweighted...(I checked using SPSS). I know I can do that with proc freq but I must keep the stub and banner layout provided by proc tabulate.

Here is a sample code :

proc tabulate data=TEMPSAS (keep=b1 b2 b3 wgt1 Q01);
class b1 b2 b3 Q01 ;
weight wgt1;
table N='Base' (colpctn='Column Percent Total') (colpctn='Column Percent')*(Q01) N*(Q01), all='Total' b1=b1 b2=b2 b2=b2*b3=b3;
run;

Any advice would be greatly appreciated.

Regards,

Erwan
Ask a Question
Discussion stats
  • 0 replies
  • 299 views
  • 0 likes
  • 1 in conversation