Hi!
I have been asked to work on a dataset where P needs to be greater than ChiSq.
However, every time I run the code my P is <0.0001.
Is thee any method using which my P can be greater than ChiSq?
The code which I ran is:
PROC LOGISTIC DATA=CSD.DEV descending;
MODEL INS=
/*DDABAL_WOE*/
SavBal_WOE
ATMAmt_WOE
CDBal_WOE
/*MMBal_WOE*/
/*Dep_WOE*/
DepAmt_WOE
/*DDA_WOE*/
/*Sav_WOE*/
/*CD_WOE*/
/*MM_WOE*/
/LACKFIT RSQ;/*H.L. test*/
OUTPUT OUT = CSD.OUT P = PRED;
QUIT;
RUN;
P.S.: I'm new!
Paige,
I think OP want to do Goodness Of Fit test (H-L Test) in option LACKFIT.
From OP's code , it apparently is doing Credit Score Card.
Improving GOF is a very broad and difficulty topic.
You can do this from two aspects( variables and outliers).
Check X variables is multicollinearity ? by using corrb option(drop correlation coefficient is bigger than 0.8) :
MODEL INS=
............
/LACKFIT CORRB ;
Check if there are some outliers by option
output out=output h=h c=c cbar=cbar predicted=PredProb;
And use FIRTH option of MODEL to improve GOF .
I'm afraid the question doesn't make sense to me.
P (probability) > Chi-squared might mean that you are performing one of many different statistical tests. (Which test?)
Prob > Chi-squared is a standard statistical output from PROC LOGISTIC and many other SAS procedures.
But really, you need more explanation to help us understand what you want. Or maybe you need to understand the question better before you explain it to us.
Paige,
I think OP want to do Goodness Of Fit test (H-L Test) in option LACKFIT.
From OP's code , it apparently is doing Credit Score Card.
Improving GOF is a very broad and difficulty topic.
You can do this from two aspects( variables and outliers).
Check X variables is multicollinearity ? by using corrb option(drop correlation coefficient is bigger than 0.8) :
MODEL INS=
............
/LACKFIT CORRB ;
Check if there are some outliers by option
output out=output h=h c=c cbar=cbar predicted=PredProb;
And use FIRTH option of MODEL to improve GOF .
@Ksharp wrote:
Paige,
I think OP want to do Goodness Of Fit test (H-L Test) in option LACKFIT.
I do not get that understanding from the original question. I wait for the original poster to clarify his/her question.
In OP's post . Here is :
/LACKFIT RSQ;/*H.L. test*/
@Ksharp wrote:
In OP's post . Here is :
/LACKFIT RSQ;/*H.L. test*/
Given the OP doesn't understand a P>CHISQ I wouldn't assume that s/he understands this code or wants that test and would also wait for clarification.
"P > ChiSq" is the name of the statistic resulting from the analysis. You need a basic course in statistics to understand what this means. When the statistic takes a value < 0.0001 for a model parameter estimate, that parameter is considered highly statistically significant, i.e. important to explain the dependent variable on the left of the = sign.
I am not sure of what you want. However, here is a silly example of a contingency table to test the proportion of M:F in 60:40 per cents.
Are you interested in such an example?
data have;
input gen $1. yes no;
datalines;
M 3 2
F 2 3
;
run;
proc freq data=have;
tables gen/
nocum chisq testp=(60 40);
run;
The Chisquare = 0.0833
DF = 1
Prob = 0.7728
By the way, If you have a big table (like a million) , You will always get P is <0.0001.
That is the drawback of GOF .
Actually any GOF in statistical test is going to fail for big table .
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!
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.