f



Percentages in proc tabulate

Folks

I noticed that I get different results for the following 2 table
definitions but I was under the impression that they should be the
same:

Basic table definition is the same for both - only highlighted line
differs:

proc tabulate data=work.hh02v1 format=8. formchar=',        ' noseps;
class state ilodefa /preloadfmt;
var avwt;
table state=" " all, 
ilodefa*avwt=" "*sum=" "*f=18.9
all='total'*avwt=' '*sum= ' ' 
----
Table 1 = ilodefa*avwt=" "*pctn<state all>="ilodefa%"*f=4.2
----
 /printmiss rtspace=20;
format state group. ilodefa active.;
run;

Table 2 = ilodefa*avwt=" "*colpctsum="ilodefa%"*f=pctfmt9.2

Second version is correct. Can anyone explain what the difference is &
why the results of the "pctn" statement give me percentages I can't
replicate in Excel. I would like to be able to use pctn to get at
percents in 3- and higher-way tables.

Thanks
0
6/24/2003 2:31:34 PM
comp.soft-sys.sas 142828 articles. 3 followers. Post Follow

0 Replies
857 Views

Similar Articles

[PageSpeed] 28

Reply: