BookmarkSubscribeRSS Feed
Agate
Calcite | Level 5

Hello!

I am preparing data for Survival analysis.I have noticed that my data (predictor variables) has many missing values (some variables 15%  of data is missing observations).

Do I need to delete missing observations?

Thanks,

Best regards.

1 REPLY 1
ballardw
Super User

Most procedures by default will ignore missing values and the regression type procedures will generally ignore records with "required" variables, such as predictors, that have missing values. You will generally get a diagnostic that says something along the lines of "n records used". That is why SAS has the special value of "missing".

If you want to test this behavior try running the procedure twice once with all of the data and again selecting records without the problem:

data =yourdataset name (where=(not missing(variablename ))) ;

The where dataset option can, when the selection is not too complex, filter the data for tests like this to see if the results change without modifying the dataset. Some procedures also have a separate where statement that can be a bit more flexible than the dataset option as it may allow use of functions involving one or more variables instead of just a list of values.


I wouldn't delete the records for the first passes through the data.

You may want to investigate imputation if too many variable combinations are missing.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 1 reply
  • 723 views
  • 0 likes
  • 2 in conversation