LISTSERV at the University of Georgia
Menubar Imagemap
Home Browse Manage Request Manuals Register
Previous messageNext messagePrevious in topicNext in topicPrevious by same authorNext by same authorPrevious page (March 2009, week 1)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Mon, 2 Mar 2009 08:22:28 -0600
Reply-To:   Joe Matise <snoopy369@GMAIL.COM>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Joe Matise <snoopy369@GMAIL.COM>
Subject:   Re: Proc tabulate weight statement with counts
Comments:   To: Erwan LE DU <dotker@gmail.com>
In-Reply-To:   <2c8557a00903020610j4280c3dfh6a8f169de7c81f5a@mail.gmail.com>
Content-Type:   text/plain; charset=ISO-8859-1

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.

-Joe

On Mon, Mar 2, 2009 at 8:10 AM, Erwan LE DU <dotker@gmail.com> 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; > run; > > Your help would be greatly appreciated. > > Regards, > > Erwan >


Back to: Top of message | Previous page | Main SAS-L page