Hello all,
I am trying to use a Proc Logistic to run a regression, but am getting stuck.
I keep getting a note in the log that says:
NOTE: The REF= option for the response variable is ignored.
NOTE: PROC LOGISTIC is fitting the cumulative logit model. The probabilities modeled are summed over the responses having the lower
Ordered Values in the Response Profile table. Use the response variable option DESCENDING if you want to reverse the
assignment of Ordered Values to the response levels.
NOTE: Convergence criterion (GCONV=1E-8) satisfied.
I know that when running a proc logistic the outcome variable should be dichotomous right? I believe the issue is that I have values coded for No (1) and Yes (2), but also have 9 set to missings, I see in my Proc Logisitc output its reading the 9, how would I make it not read this extra value and only the 1 and 2?
where=(variable ne 9)
as dataset option.
Use a WHERE= dataset option to exclude certain observations.
So I would have
Proc data=x;
Class Gender (Param=Ref Ref="Male") Outcome (Param=Ref Ref="No");
Where Outcome = "No", "Yes";
Model Outcome=Gender;
run;
Or how would I use the where to only read "No" and "Yes" but not the 9 that codes for missing?
My personal preference is the dataset option:
proc logistic data=x (where=(Outcome in ("No","Yes")));
Note that
Outcome = "No", "Yes"
is invalid comparison syntax anywhere in the SAS language.
Hello when I tried it the way you suggested I get an error in the log:
ERROR: WHERE clause operator requires compatible variables.
Note: I must use the Param=Ref Ref="Male" ... etc line
In the WHERE statement and WHERE= dataset option, you need to use the raw values stored in the dataset, not the formatted ones.
Maxim 3: Know Your Data; run a PROC CONTENTS to see variable attributes (including assigned formats), and then look at the formats to see which raw values are expected.
Ah okay maybe I didn't ask the question clearly.
So I need to run a logistic regression model using the parameterization method. I know my outcome variable of interest should be Yes=1 and No=2. (These are my newly formatted variables however, I used an array to recode No=0 to No=2)
In my data set, for my outcome variable of interest, I have Yes=1, No=2, and Missing=9. If I run a proc freq, I have 1,2, and 9 pop up. Is there a way for my to run this proc logistics while ignoring the 9?
where=(variable ne 9)
as dataset option.
Great that worked, thank you!
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.