BookmarkSubscribeRSS Feed
mmagnuson
Quartz | Level 8

When running a logistic regresssion model there is an option of Quantitative Variables and Classification Variables.  If variable such as Male/Female has values of 1/0 respectively, should it go under quantitatvie variables since it is a number or classification variables since it is binary?

5 REPLIES 5
Reeza
Super User

I'd put it under CLASS because then the output is exactly the way I want it, and it's a categorical variable so that's clear to myself and everyone else. 

However, since it's coded 0/1 it's unlikely to matter, IF you're using Referential coding for your categorical/classification variables. 

 

IF you're using GLM coding for your parameters then this is not true and you must include it on the CLASS statement.

mmagnuson
Quartz | Level 8

I went ahead and put it under CLASS with Reference coding style.  In the output it showed the MLEs for only the 0 value. To interpret this would it be the 0 value has a negative estimate which would mean that the 1 value would then be a positive estimate? Just making sure I understand this completely.


output.jpg
ballardw
Super User

Thats what the REF option is for

 

class var (ref=1)

mmagnuson
Quartz | Level 8

From the info above my code is the following: Where would the var ref=1 go?  I tired before the i.v.s and after the i.v.s in the first line but it errored. (also I Bolded the variables for clarification purposes) 

 

PROC LOGISTIC DATA=WORK.SORTTempTableSorted
PLOTS(ONLY)=ALL
;
CLASS BEC (PARAM=REF) "Marital Status"n (PARAM=REF) Gender (PARAM=REF);
MODEL Donor (Event = '1')=BEC "Marital Status"n Gender /
SELECTION=NONE
AGGREGATE SCALE=NONE
RSQUARE
LINK=LOGIT
CLPARM=WALD
CLODDS=WALD
ALPHA=0.05
;
RUN;

Reeza
Super User

@mmagnuson wrote:

I went ahead and put it under CLASS with Reference coding style.  In the output it showed the MLEs for only the 0 value. To interpret this would it be the 0 value has a negative estimate which would mean that the 1 value would then be a positive estimate? Just making sure I understand this completely.


I don't think this is correct. 

A referential estimate means it's set as the baseline, the estimate is then essentially a component of the intercept. 

 

Maybe this can clarify it:

http://stats.idre.ucla.edu/other/mult-pkg/faq/general/faqwhat-is-dummy-coding/

 

 

sas-innovate-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 5 replies
  • 2122 views
  • 2 likes
  • 3 in conversation