BookmarkSubscribeRSS Feed
mscott
Calcite | Level 5
I'm trying to run a model using Proc Logistic but I get an error message saying "no valid observations". I read that including a variable whose values are 100% missing in a proc logistic model results in this error. I went back and found that some of my variables did indeed have values that were 95 - 100% missing, so I took them out of the model but I'm still getting this error message. Can someone tell me any other reasons as to what might be causing this??
1 REPLY 1
TimTrussell_sas
SAS Employee
I am not sure if this is something that you have thought about but it may be possible that people with answers to one of your indicator variables may not have responses to another variable. This was the case in one of my examinations where people who responded to one question in my survey often skipped a question later on.

This may look like what you have already said, but when a large number of variables are used as indicators, it is possible for each variable to have a high response rate yet still get the error message. One requirement for an observation to be included in the logistic regression is that it must have a complete response to ALL variables in the model. Take the below as an example.

data one;
input result age height weight BMI WHR @@;
datalines;
1 . 52 75 23 0.4
0 50 . 60 15 0.99
0 65 46 . 29 0.6
1 18 72 80 . 1.4
1 29 88 72 31 .
1 . 40 79 22 0.75
1 46 . 59 19 0.88
0 25 64 . 24 0.55
0 47 54 68 . 0.92
1 29 62 74 29 .
;
run;

proc logistic data=one;
model result=age height weight BMI WHR;
run;

Although this is a small dataset it outlines that while no individual variable has lower than an 80% response rate, because each observation has a missing for at least one of the model variables I get the error message you mentioned.

You might want to think about doing some investigation into imputation, where the responses you do know can help you impute the missing values and you can still utalize the variables in the model.

Hope this helps, if not I can look deeper.

Tim Trussell, tim.trussell@sas.com

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

New Learning Events in April

 

Join us for two new fee-based courses: Administrative Healthcare Data and SAS via Live Web Monday-Thursday, April 24-27 from 1:00 to 4:30 PM ET each day. And Administrative Healthcare Data and SAS: Hands-On Programming Workshop via Live Web on Friday, April 28 from 9:00 AM to 5:00 PM ET.

LEARN MORE

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