- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi All,
Please can you provide generic sas code for following:
1. Computing Percentage and Percentiles for specific variables
2. Compute Total Sum and Cumulative Sum for specific variables
3. Creating Indicator variable for non-missing values.
Thank you!
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hi:
What code or procedures have you tried? What does your data look like? PROC FREQ will calculate percentages, but so will PROC TABULATE and PROC REPORT. You can get PERCENTILES from several procedures. Many people use PROC UNIVARIATE. To create an indicator variable for non-missing values, you most likely will need a DATA step program and/or a user-defined format....it sort of depends on your data and what you want the new variable to be named and the name of the variable you want to test for non-missing values. For computing Total sums, again, PROC PRINT, PROC MEANS, PROC REPORT, PROC TABULATE, PROC SQL will all work. For computing cumulative sums, however, you will need either a DATA step program or PROC REPORT.
cynthia