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
Diamond | Level 26
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.

Catch up on SAS Innovate 2026

Nearly 200 sessions are now available on demand with the SAS Innovate Digital Pass.

Explore 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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

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