N is always unweighted in SAS, as far as I know. SUMWGT would be the sum of
the weights (effectively the weighted N). SUM would be the weighted sum [so
if you want to base it on the value of Q01]. I don't know about COLPCTN
unfortunately, whether you can get that weighted or not, it's not a
statistic I've used; perhaps you can use COLPCTSUM in some manner? That
should be weighted, I imagine.
On Mon, Mar 2, 2009 at 8:10 AM, Erwan LE DU <firstname.lastname@example.org> wrote:
> 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;
> Your help would be greatly appreciated.