My data is like:
ID | class |
ACDC | 1 |
ABCD | 2 |
ADCB | . |
ACBD | . |
ACCD | 2 |
ABBB | 2 |
AAAB | 1 |
ACDA | 2 |
Proc freq give me output like:
Class | Frequency | Percent | Cumulative Frequency | Cumulative Percent |
1 | 2 | 33.33% | 2 | 33.33% |
2 | 4 | 66.67% | 6 | 100.00% |
Frequency missing=2 |
I need output(percent based on entire N of the dataset):
Class | Frequency | Percent |
1 | 2 | 25.00% |
2 | 4 | 50.00% |
. | 2 | 25.00% |
Total | 100.00% |
Please help-thanks in advance!
proc freq data=Have;
tables class / missing;
run;
You'll need to add the MISSING option to your program:
tables class / missing;
Thank you very much!
proc freq data=Have;
tables class / missing;
run;
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
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.