12-02-2015 10:38 PM
Iam using Proc Report for creating a table. I have created a small dataset. i have 4 levels of a variable (L,P,S,W) and then sub_types within each level
the desired output is attached. Iam trying to find frequencies of only the 1's, Iam not interested in the 0's
Also, is there a way to output the data in a desired fashion, for eg.,
i want par6, par7 and part8 to be followed by part1 etc.,
12-02-2015 11:01 PM
12-03-2015 06:53 AM
12-03-2015 08:57 AM
When you have a variable that is always 0 or 1, change the approach. To get a single statistic per variable:
To get the frequencies of the "1" values, get the sum.
To get the percentage of "1" values, get the mean.
You may have to adjust your computations, if your variable could take on other values, such as a missing value.
12-03-2015 10:33 AM
12-03-2015 02:34 PM
i think i figured it out, i ran a means within the table statement.
proc tabulate data = test out = test1; by procedure1;
var par1 par2....;
class type sub_type;
table all*n (par1 par2 ) *mean = '' *f=pct100fmt.
, type = '' * sub_type= '' /nocellmerge;