BookmarkSubscribeRSS Feed
sjmoussa
Calcite | Level 5
When I perform a logistic regression model using about 50 predictor variables my sample size decreases from n=18500 to n=7468 due to missing data on some of the variables. I want to create a new dataset that only includes the complete cases (n=7468). Is there an easy way to do this in SAS?
2 REPLIES 2
Peter_C
Rhodochrosite | Level 12
if these predictor variables are
1 : all numeric
and
2 : listed in macro variable &predictors
data new_dataset ;
set old_dataset ;
if nmiss( of &predictors ) > 0 then delete ;
run ;
Doc_Duke
Rhodochrosite | Level 12
You could output a dataset that includes the predicted risk and then subset on that value being non-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!

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.

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
  • 2 replies
  • 728 views
  • 0 likes
  • 3 in conversation