Help using Base SAS procedures

Ignoring observations

Reply
Occasional Contributor
Posts: 10

Ignoring observations

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
Super User
Posts: 11,343

Re: Ignoring observations

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.
Occasional Contributor
Posts: 10

Re: Ignoring observations

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
Ask a Question
Discussion stats
  • 2 replies
  • 168 views
  • 0 likes
  • 2 in conversation