- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
The dataset Contacts is comprised of several entries for each subject (unique identifier is patient_number). You are asked to create a new dataset containing one row per patient with the number of contacts per month. What sample SAS or SQL code would be used to complete this request.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Is it possible to provide actual data or sample data that reflects the actual situation?
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
@11427qvolaf wrote:
The dataset Contacts is comprised of several entries for each subject (unique identifier is patient_number). You are asked to create a new dataset containing one row per patient with the number of contacts per month. What sample SAS or SQL code would be used to complete this request.
Look at documentation for Procs Means, Summary, Freq, Report, Tabulate and SQL. All of these can create such a summary. The preferred choice might come with additional requirements.
Or tasks to COUNT.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Not to forget DATA steps with retained variables or a
do until (last.id);
loop for counting.