Programming the statistical procedures from SAS

Logistic Regression Quantitative vs Classification variables

Reply
Contributor
Posts: 23

Logistic Regression Quantitative vs Classification variables

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?

Super User
Posts: 18,569

Re: Logistic Regression Quantitative vs Classification variables

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.

Contributor
Posts: 23

Re: Logistic Regression Quantitative vs Classification variables

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
Super User
Posts: 10,871

Re: Logistic Regression Quantitative vs Classification variables

Thats what the REF option is for

 

class var (ref=1)

Contributor
Posts: 23

Re: Logistic Regression Quantitative vs Classification variables

[ Edited ]

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;

Super User
Posts: 18,569

Re: Logistic Regression Quantitative vs Classification variables


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/

 

 

Ask a Question
Discussion stats
  • 5 replies
  • 135 views
  • 2 likes
  • 3 in conversation