Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

- Home
- /
- Analytics
- /
- Stat Procs
- /
- question about variable selesction

Options

- RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Posted 07-28-2016 05:04 PM
(1639 views)

Hi All,

Here I have a question about variable selesction in SAS. Say I have the following data set:

age gender height weight death

89 0 . 110 1

70 1 58 . 0

50 1 173 130 1;

And I want to fit a logistic regression with backwards variable selection, so I coded like this:

**proc** **logistic** data=have descending;

class gender;

model death = age gender height weight /selection=backward fast ;

**run**;

But since the data has missing value, only the last obs will be used to do this model selection (i.e program will delete entries that has missing values based on full model).

But, I want the program to include more obs when it evaluate model with: age gender height, i.e. use obs 2 and 3. Is there a command to make this haapened in SAS ??

Thank you very much!

Best,

6 REPLIES 6

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

In classical linear models, the regression needs to form the so-called SSCP matrix X`*X. To form this matrix product require removing observations that have missing values.

See a previous discussion about this topic for other options, including multiple imputation with PROC MI.

If you are committed to PROC LOGISTIC, multiple imputation is a good solution. For survey data, SAS provides PROC SURVEYLOGISIC. If you can express your model as a mixed model, PROC GLIMMIX handles missing data differently.

There is extensive literature in this area. I particulalry like the research and suggestions by Paul Allison, and recommend that you do an internet search for

**logistic regression "missing data" site:statisticalhorizons.com**

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Hi Rick,

Thank you for your solution!

Yes, imputation is a way to address missing values. But I'm not looking for imputation. I just want to use the information I collected, for this is patient information I'm dealing with.

I want SAS to add more observations, ( i.e. increase the dim of X) when less covariates are considered. Do you have a suggestion for this?

Thanks again!!!

Best wishes.

Thank you for your solution!

Yes, imputation is a way to address missing values. But I'm not looking for imputation. I just want to use the information I collected, for this is patient information I'm dealing with.

I want SAS to add more observations, ( i.e. increase the dim of X) when less covariates are considered. Do you have a suggestion for this?

Thanks again!!!

Best wishes.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Dear Rick,

I have around 1,000 obs of 26 variables and one outcome. but only 300 obs are complete. So I will lose a lot information, if I only use the complete observations.

Say for first 100 obs, only variable1 is missing, when I run the model outcome=variable2-26, I want the first 100 obs to be added to the matrix. In this way I feel like I can make more use of the information collected.

Is this make sense? If it does, can I use SAS to realize this?

Thank you!!

Best wishes.

I have around 1,000 obs of 26 variables and one outcome. but only 300 obs are complete. So I will lose a lot information, if I only use the complete observations.

Say for first 100 obs, only variable1 is missing, when I run the model outcome=variable2-26, I want the first 100 obs to be added to the matrix. In this way I feel like I can make more use of the information collected.

Is this make sense? If it does, can I use SAS to realize this?

Thank you!!

Best wishes.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

I am not aware of any variable selection technique for logistic regression in which different observations are used for different sets of candidate variables.

There are other predictive models that are more tolerant of missing values. You might look at PROC HPSPLIT, which uses tree-based models for building regression models.

- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content

Dear Rick,

Thank you very much! I will look into it.

Have a nice day~

Best wishes.

Thank you very much! I will look into it.

Have a nice day~

Best wishes.

**Available on demand!**

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

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.