A data source have the following fields
@0050 V1028 15. /* Peso COM pÛs estratificaÁ„o */
@0187 V403311 $1. /* Faixa do valor do rendimento hab. */
@0098 V3002A $1. /* A escola que ... frequenta È de */
V1028 is imported correctly into SAS as a Type: Numeric with Length: 8.
However, when I run the following code:
proc tabulate data=pnadc_012019;
class V403311 V3002A;
var V1028;
table V403311, V3002A;
run;
the resulting table shows the count (N), not the sum of variable V1028.
How do I instruct SAS to calculate the sum of this variable within proc tabulate?
There is very little example data but following code is my guess. You can try it out and see it is giving what you want.
proc tabulate data=pnadc_012019;
class V403311 V3002A;
var V1028;
table V403311, V3002A*V1028*SUM;
run;
There is very little example data but following code is my guess. You can try it out and see it is giving what you want.
proc tabulate data=pnadc_012019;
class V403311 V3002A;
var V1028;
table V403311, V3002A*V1028*SUM;
run;
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Lock in the best rate now before the price increases on April 1.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.