Error message in proc logistic

Posts: 1

Error message in proc logistic

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??
SAS Employee
Posts: 5

Re: Error message in proc logistic

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 @@;
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 .

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

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,
Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation