BookmarkSubscribeRSS Feed
relish
Calcite | Level 5

I am using the sas enterprise guide to analyze the relationship between three numerical variables(explanatory ones) and one binary variable(response one), while by using the logistic regression, all the result shows these three variables having the same p value and intercept and standard error, so I do not know why this goes wrong?

7 REPLIES 7
ChrisHemedinger
Community Manager

Any chance that you can share some of your data, and the MODEL code that you're generated using the Logistic Regression task?

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
relish
Calcite | Level 5

PROC SQL;
CREATE VIEW WORK.SORTTempTableSorted AS
SELECT *
FROM WORK.QUERY_FOR_TELCODATA_EXTRACT_0002
;
QUIT;
TITLE;
TITLE1 "Logistic Regression Results";
FOOTNOTE;
FOOTNOTE1 "Generated by the SAS System (&_SASSERVERNAME, &SYSSCPL) on %TRIM(%QSYSFUNC(DATE(), NLDATE20.)) at %TRIM(%SYSFUNC(TIME(), TIMEAMPM12.))";
PROC LOGISTIC DATA=WORK.SORTTempTableSorted
PLOTS(ONLY)=NONE
;
MODEL churn (Event = '0')= /
SELECTION=NONE
INFLUENCE
LINK=LOGIT
;

OUTPUT OUT=BIGDATA.PREDLOGREGPREDICTIONS(LABEL="Logistic regression predictions and statistics for WORK.QUERY_FOR_TELCODATA_EXTRACT_0002")
PREDPROBS=INDIVIDUAL
UPPER=upper_churn
LOWER=lower_churn ;
RUN;
QUIT;

/* -------------------------------------------------------------------
End of task code
------------------------------------------------------------------- */
RUN; QUIT;
%_eg_conditional_dropds(WORK.SORTTempTableSorted);
TITLE; FOOTNOTE;
ODS GRAPHICS OFF;

 

 

 

 

 

and the target variable is churn. the value is 0,1.

For the explanatory variables, they are income(just the normal money),and other charges.But the separate logistic regression for these three, Analysis of Maximum Likelihood for estimate. standard error and chi are the same. I do not know where goes wrong.



Reeza
Super User

There’s no variables in your model statement?

Did you add variables to your model?

relish
Calcite | Level 5

Thanks for your reply.

Yes, I used the automatic function of SAS enterprise guide, the task----regression---logistic regression, than select the dependent variable and independent variable. while the result for three x is all the same.

ChrisHemedinger
Community Manager

You might need to visit the Model->Effects page and add those vars as main effects.  This will add them to your MODEL statement.  There are also many options to nest/combine these effects if you need to analyze those.

 

Should result in code like:

 

	MODEL __RESPONSE=Horsepower MPG_City MPG_Highway		/
		SELECTION=NONE
		LINK=LOGIT

[Disclaimer: not a statistician -- just familiar with this how these task options work 😉 ]

Check out SAS Innovate on-demand content! Watch the main stage sessions, keynotes, and over 20 technical breakout sessions!
relish
Calcite | Level 5

Thanks a lot for your reply.

MODEL Churn=household_income		/
		SELECTION=NONE
		LINK=LOGIT

This is the new code, while it can not work. I can not find the reason. 

ballardw
Super User

"It can not work" is awful vague.

Are there errors in the log?: Post the code and log in a code box opened with the {i} to maintain formatting of error messages.

No output? Post any log in a code box.

Unexpected output? Provide input data in the form of data step code pasted into a code box, the actual results and the expected results. Instructions here: https://communities.sas.com/t5/SAS-Communities-Library/How-to-create-a-data-step-version-of-your-dat... will show how to turn an existing SAS data set into data step code that can be pasted into a forum code box using the {i} icon or attached as text to show exactly what you have and that we can test code against.

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!

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

Find more tutorials on the SAS Users YouTube channel.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

Discussion stats
  • 7 replies
  • 1046 views
  • 4 likes
  • 4 in conversation