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 2)Back to main SAS-L pageJoin or leave SAS-L (or change settings)ReplyPost a new messageSearchProportional fontNon-proportional font
Date:   Sat, 14 Mar 2009 19:35:04 -0400
Reply-To:   Arthur Tabachneck <art297@NETSCAPE.NET>
Sender:   "SAS(r) Discussion" <SAS-L@LISTSERV.UGA.EDU>
From:   Arthur Tabachneck <art297@NETSCAPE.NET>
Subject:   Re: Histogram taking account sampling weights
Comments:   To: SAS User <sasusr@GMAIL.COM>

Is the following similar to what you are asking?:

roc summary data=sashelp.class; var height; class sex age; output out=testdata (where=(_type_ eq 3)) mean=; run;

proc univariate DATA = testdata; BY sex; VAR height; HISTOGRAM / CFRAME=GRAY CAXES=BLACK WAXIS=1 CBARLINE=BLACK CFILL=BLUE PFILL=SOLID ; WEIGHT _freq_; RUN;

If it is, then I'd suggest simply disaggregating your data like:

data need; set testdata; do i=1 to _freq_; output; end; run;

proc univariate DATA = need; class sex; VAR height; HISTOGRAM / CFRAME=GRAY CAXES=BLACK WAXIS=1 CBARLINE=BLACK CFILL=BLUE PFILL=SOLID; RUN;

HTH, Art -------- On Sat, 14 Mar 2009 19:57:33 -0300, SAS User <sasusr@GMAIL.COM> wrote:

>Hi I'm trying to use a simple univariate procedure to produce histogramS >taking account sampling counts but I'm having some problems.PROC UNIVARIATE >DATA = LIBRARY._2_AB; >BY BI; >VAR TOTAL_DEROG; > HISTOGRAM / CFRAME=GRAY CAXES=BLACK WAXIS=1 CBARLINE=BLACK >CFILL=BLUE PFILL=SOLID ; >WEIGHT WEIGHT; >RUN; > >But the in the log I'm having the following msg: ERROR: A WEIGHT variable >cannot be used together with a HISTOGRAM, QQPLOT, or PROBPLOT statement. >What can I do to make that histograms taking the sampling weights into >account? > >Thanks, >Ed.


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