BookmarkSubscribeRSS Feed
znhnm
Quartz | Level 8

Hello, 

 

I am creating a Logistic Regression Model in VA; I have results when I select certain set of independent variabes but using the same response variable, when I change the independent variables I have an error saying: "the analytic requires a categorical response variable with at least two levels". The response variable I selected is a binary variable with 2 categories and again the exact same response variable works on another logistic regression with different set of independet variables. What would be the reason for this error and how could I solve this? Thank you! 

1 REPLY 1
FreelanceReinh
Jade | Level 19

Hello @znhnm,

 

If one of the independent variables has a missing value, SAS excludes that observation from the analysis by default. So, different combinations of independent variables lead to different sets of observations used in the analysis (i.e., those observations where all independent variables and the response variable are non-missing). In "extreme" cases, typically involving one or more variables with many missing values, the resulting analysis set is reduced to a point where the response variable is constant rather than having "at least two levels," as the error message says.

 

To avoid this error, do not include (too many) independent variables with many missing values. In some cases of categorical independent variables a missing value might be a valid level. In the CLASS statement of PROC LOGISTIC there is the MISSING option to prevent the exclusion of such observations. I assume that SAS VA offers a similar option for this case. If some or all missing values of an important independent variable could be imputed in a preliminary step, this would help as well.