I'm computing conditional frequency of two variables in a dataset with this:
proc freq data=input noprint;
tables VAR1 * VAR2 / out=output;
run;
I want to know if for every VAR1-i
there are more than one type of VAR2-i
. But in the output there is count
that count how many times VAR2-i
is present for VAR-1-i
(as I want) while percent
is the percent of count
on the total number of records of the dataset
instead I want the percent on the total of records of VAR1-i
.
How can I fix?
You are missing the outpct option.
proc freq data=input noprint;
tables VAR1 * VAR2 / out=output outpct;
run;
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.