BookmarkSubscribeRSS Feed
Jimbo
Calcite | Level 5
Hi,

Apologies if this is a repeat but can't find the answer searching.

I'm very new to SAS and have inherited a large data set to analyse.

The data is medication records in an Excel sheet. 1000 patients, with up to 15 years data for each.

Some data which should have been collected is missing - this is labelled '.'

However, some data is not recorded 'deliberately' eg because the patient died / was discharged. These observations are labeled '88'.

In the analysis I need to account for data which should have been collected, but the '88' values need to be ignored.

Does anyone have any suggestions as to how I can tell SAS not to include these observations in any analysis?

Many thanks,
Jim
2 REPLIES 2
ballardw
Super User
Type of analysis to be performed would be helpful in answering as some approaches may not work every where.

With that in mind filtering the data in the analysis procedure is a start.

proc xxxxx data= (where=( ne 88));

Some procedures allow analysis of the missing data (the '.') using an option usually MISSING. For example

proc freq data= (where=( ne 88));
table /missing;
run;

will treat missing levels as a valid category and report counts and percents as such.
Jimbo
Calcite | Level 5
Thanks very much!

I'm (planning on!) performing a survival analysis - blood pressure control to time defined end point.

I'll give the code a try now. Many thanks again,

Jim

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

What is Bayesian Analysis?

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1323 views
  • 0 likes
  • 2 in conversation