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?
Any chance that you can share some of your data, and the MODEL code that you're generated using the Logistic Regression task?
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.
There’s no variables in your model statement?
Did you add variables to your model?
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.
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 😉 ]
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.
"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.
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.