BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm new to using the REPORT procedure and am looking for help showing weighted data. I'm creating a cross-tab and have been able to see the sums weighted, but I can't see the percentages weighted.

Any suggestions?

Here is my syntax and the resulting output:

PROC REPORT DATA=trash.BOLiesTR1 NOWD;
COLUMN post (userfin fage301), PCTN;
DEFINE post / GROUP;
WEIGHT weights;
RUN;

post userfin fage302
1 0.38 0.36
2 0.30 0.24
3 0.18 0.19
4 0.08 0.14
5 0.05 0.07


And here it is without the weights (same results):

PROC REPORT DATA=trash.BOLiesTR1 NOWD;
COLUMN post (userfin fage301), PCTN;
DEFINE post / GROUP;
RUN;

post userfin fage302
1 0.38 0.36
2 0.30 0.24
3 0.18 0.19
4 0.08 0.14
5 0.05 0.07


But this is what I get from a PROC FREQ statement:

PROC FREQ DATA=trash.BOLiesTR1;
TABLES post*(userfin fage302)/norow nocol nofreq;
WEIGHT weights;
RUN;

post userfin fage302
1 0.39 0.38
2 0.30 0.23
3 0.18 0.18
4 0.08 0.13
5 0.05 0.07
2 REPLIES 2
Cynthia_sas
SAS Super FREQ
Hi:
Every time I have used the WEIGHT statement with PROC REPORT, I have tested the REPORT results against PROC MEANS -- so I can use the same VARDEF= value for both procedures.

It seems to me that this is a question for Tech Support -- because either the weight statement works differently for PROC REPORT than PROC FREQ or it can't be used with PCTN stat in PROC REPORT or ???

Tech Support is your best resource for this question.

cynthia
deleted_user
Not applicable
Thanks for the advice, Cynthia. I'll contact Tech Support. Have a wonderful day.

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 2 replies
  • 757 views
  • 0 likes
  • 2 in conversation