BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
shortyofhb
Calcite | Level 5

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? 

1 ACCEPTED SOLUTION
8 REPLIES 8
shortyofhb
Calcite | Level 5

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?

Kurt_Bremser
Super User

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.

shortyofhb
Calcite | Level 5

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

Kurt_Bremser
Super User

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.

shortyofhb
Calcite | Level 5

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? 

shortyofhb
Calcite | Level 5

Great that worked, thank you!

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 ANOVA?

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.

Discussion stats
  • 8 replies
  • 1500 views
  • 0 likes
  • 2 in conversation